TImageEnMIO.PrintImagePos
Declaration
procedure PrintImagePos(ImageIndex: integer; x, y: double; Width, Height: double; GammaCorrection: double = 1.0; PrintAnnotations: boolean = False); overload;
procedure PrintImagePos(ImageIndex: integer; PrtCanvas: TCanvas; x, y: double; Width, Height: double; GammaCorrection: double = 1.0; PrintAnnotations: boolean = False); overload;
Description
Print the specified image at an absolute position and size.
Parameter | Description |
ImageIndex | Index of the page/image to print (0 = first image) |
PrtCanvas | The printing canvas. Specify nil to use the Printer.Canvas |
x | Left position to print image (in inches) |
y | Top position to print image (in inches) |
Width | Width to print image (in inches) |
Height | Height to print image (in inches) |
GammaCorrection | Level of gamma correction, use 1 to disable gamma correction |
PrintAnnotations | If true and the image contains imaging or ImageEn annotations they will be printed |
Note:
◼IEM_SELECTED_IMAGES and
IEM_ALL_IMAGES are NOT supported for
ImageIndex. Use
PrintImage to print all or selected images
◼You do not need to call Printer.BeginDoc/Printer.EndDoc unless you want to print a batch of images. However if you specify a custom PrtCanvas you MUST call Printer.BeginDoc/Printer.EndDoc)
◼PrintImagePos does not support
OnPrintPage
◼By default,
Width or
Height will be adjusted to maintain the image's aspect ratio. Set
PrintingMaintainAR to false to prevent this
◼If you are
printing a PDF, you should use
Print
// print the image first page at the position 2, 2 and height 10 and width 10 (stretch the image)
ImageEnMView1.MIO.PrintImagePos(0, 2, 2, 10, 10, 1);
Compatibility Information
Prior to v8.0.0, if you specified a width and height for
PrintImagePos it would not adjust the output to ensure the image aspect ratio was maintained (i.e. image may print stretched). With 8.0.0, the aspect ratio is maintained by default. To restore the older functionality, set ImageEnMView1.MIO.PrintingMaintainAR := False;
See Also
◼DoPrintPreviewDialog
◼PrintImage