Print Bitmap
From Free Pascal wiki
Revision as of 17:21, 21 December 2014 by Minesadorada (talk | contribs) (How to send an image to the printer (CodeSnippet))
How to send an image to the printer
// uses Printers;
var
Scale :LongInt;
begin
with Printer do
begin
BeginDoc;
Scale := Min(
Printer.PageWidth div Image1.Picture.Bitmap.Width,
Printer.PageHeight div Image1.Picture.Bitmap.Height);
Printer.Canvas.StretchDraw(
Rect(0, 0, Image1.Picture.Bitmap.Width*Scale, Image1.Picture.Bitmap.Height*Scale),
Image1.Picture.Bitmap);
EndDoc;
end;
end;