TIOParams.PDF_ImageOptions
Declaration
property PDF_ImageOptions: TIOPDFImageOptions;
Description
Specifies options for saving of images to PDF.
Value | Description |
iepioShrinkOnly | If not specified, all images will be made to fill the entire page. If specified, only large images are shrunk. Small images are not enlarged |
iepioCentered | Specifies that the image will be centered within the page |
Note:
◼This property is only used when saving PDF files natively, e.g. using
TImageEnIO.SaveToFilePDF or
TImageEnMIO.SaveToFilePDF (and the
PdfViewer is disabled). It is NOT used when saving with
PDFium or for
layers◼If you are using a
TIEMultiBitmap or
TImageEnMView, you can use
DuplicateCompressionInfo to propogate the parameter to all frames
Default: [] (all images are scaled and not centered)
// Dont' scale small images to size of page
ImageEnView1.IO.Params.PDF_ImageOptions := [iepioShrinkOnly];
// Save all pages to PDF (A4) with centered images (and no scaling of small images)
ImageEnMView1.MIO.Params[0].PDF_PaperSize := iepA4;
ImageEnMView1.MIO.Params[0].PDF_PageMargin := Round( 0.25 * 72 ); // 1/4 inch
ImageEnMView1.MIO.Params[0].PDF_ImageOptions := [iepioShrinkOnly, iepioCentered];
ImageEnMView1.MIO.DuplicateCompressionInfo(TRUE);
ImageEnMView1.MIO.SaveToFilePDF('d:\test.pdf');