Printing real dimensions of an image

后端 未结 3 1871
半阙折子戏
半阙折子戏 2021-01-06 21:23

Hi mates i want to print a picture i generated i use the following code

  Printer.BeginDoc;
  Printer.Canvas.Draw(0,0,img1.Picture.Bitmap);
  Printer.EndDoc         


        
3条回答
  •  生来不讨喜
    2021-01-06 21:31

    IIRC (I don't have Delphi in front of me to check right now), TPrinter has a PixelsPerInch or similar property that has to be set so printing is at the correct resolution. The default value does not match the screen, which is why the image gets printed so small. Most newbies to using TPrinterdon't know to set the property.

提交回复
热议问题