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
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?);
Comments
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;
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com