DelphiFAQ Home Search:
General :: Programming :: Delphi :: Printing
Find a solution for issues with printing from Delphi applications.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

How to print an image (JPEG, BMP.. any)

Question:

How can I print a TGraphic, especially an image?

Answer:

You need to use the global Printer instance from unit Printers - see the code below:

uses 
   Printers; 
 
 procedure PrintBitmap(aGraphic: TGraphic; Title: string); 
 begin { PrintBitmap } 
   Printer.Title := Title; 
   Printer.BeginDoc; 
   Printer.Canvas.Draw(0, 0, aGraphic); 
   Printer.EndDoc
 end; { PrintBitmap } 
 
You don't like the formatting? Check out SourceCoder then!
Generated 4:01:25 on Oct 20, 2017