ImageEn, unit iexBitmaps

TIOParams.PDF_PaperSize

TIOParams.PDF_PaperSize


Declaration

property PDF_PaperSize : TIOPDFPaperSize;


Description

Provides a quick way to set PDF_PaperWidth and PDF_PaperHeight or interpret their current values.
You can also specify the layout as portrait or landscape.

If this is set to iepAuto then each page will be output at the size of the image. Note: This may create huge pages!

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
 If you are using a TIEMultiBitmap or TImageEnMView, you can use DuplicateCompressionInfo to propogate the parameter to all frames


Example

// Save using "US Letter" paper size
ImageEnView1.IO.Params.PDF_PaperSize := iepLetter;
ImageEnView1.IO.SaveToFile('D:\output.pdf');

// Which is the same as...
ImageEnView1.IO.Params.PDF_PaperWidth  := 612;
ImageEnView1.IO.Params.PDF_PaperHeight := 792;
ImageEnView1.IO.SaveToFile('D:\output.pdf');

// 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');


See Also

 IEPaperSizeToStr
 IEStrToPaperSize
 IEPointsToPaperSize
 IEPaperSizeToPoints