Print Bitmap
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;From the Free Pascal wiki, page "Print Bitmap", as it stood on 2020-02-23 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.
Talk about this page
Nobody has opened a bench for this page yet. Sign in to open one.
