Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

2DBarCode SaveToFile

edited May 2017 in General
How can I save Barcode's image (DataMatrix) to a file (jpeg or bitmap) using
ReportBuilder 16.02 and Delphi XE7?
I have to transfer this barcode to another application.
Thanks.
Daniele

Comments

  • edited May 2017

    All barcodes are rendered as Metafiles before being displayed in the
    preview/viewer. You can utilize the AsMetafile routine of the
    TppDraw2DBarCode class to save this image to file as well using the
    OnDrawCommandCreate event.


    uses
    ppBarCode2dDrawCmd;

    procedure TForm1.pp2DBarCode1DrawCommandCreate(Sender, aDrawCommand:
    TObject);
    begin
    TppDraw2DBarCode(aDrawCommand).AsMetaFile.SaveToFile('c:\MyBarCode.emf?);

    end;

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.