ImageEn, unit iexBitmaps

TIOParams.PDF_PaperWidth

TIOParams.PDF_PaperWidth

Declaration

property PDF_PaperWidth: Integer;

Description

Specifies the width of the page in Adobe PDF points (1 point = 1/72 of inch). Default values are width: 595 and height: 842 (A4 format).
Alternatively, you can use PDF_PaperSize and PDF_PaperLayout.

Note:
◼If you set PDF_PaperWidth or PDF_PaperHeight to 0 the page will be output at the size of the image. Note: This may create huge pages!
◼If you are using a TIEMultiBitmap or TImageEnMView, you can use DuplicateCompressionInfo to propagate the parameter to all frames
◼Setting the PDF page width only instructs the viewing application what size to display or print the page. It does not affect file size. To reduce the size of a PDF file you need to change your PDF compression or reduce the size of the images it contains
◼This property is NOT used when saving files from an PdfViewer

Common values:
Paper Size PDF_PaperWidth PDF_PaperHeight
A0 2380 3368
A1 1684 2380
A2 1190 1684
A3 842 1190
A4 595 842
A5 421 595
A6 297 421
B5 501 709
US Letter (8.5 x 11") 612 792
US Legal (8.5 x 14") 612 1008
US Ledger (17 x 11") 1224 792
US Tabloid (11 x 17") 792 1224

Default: 595

Examples

// Save image in TImageEnMView as PDF with "US Letter" paper size
ImageEnView1.IO.Params.PDF_PaperWidth  := 612;
ImageEnView1.IO.Params.PDF_PaperHeight := 792;
ImageEnView1.IO.SaveToFile('D:\output.pdf');

// Save multi-frame image in TImageEnMView as PDF with "US Letter" paper size
for i := 0 to ImageEnMView1.MIO.ParamsCount - 1 do
begin
  ImageEnMView1.MIO.Params[i].PDF_PaperWidth  := 612;
  ImageEnMView1.MIO.Params[i].PDF_PaperHeight := 792;
end;
ImageEnMView1.MIO.SaveToFile('D:\output.pdf');

// Convert a TIFF to PDF with "US Letter" paper size
mbmp := TIEMultiBitmap.Create();
mbmp.ParamsEnabled := True;
mbmp.LoadFromFile('D:\Input.tif');
for i := 0 to mbmp.Count - 1 do
begin
  mbmp.Params[i].PDF_PaperWidth  := 612;
  mbmp.Params[i].PDF_PaperHeight := 792;
  mbmp.Params[i].PDF_Compression := ioPDF_JPEG;
  mbmp.Params[i].JPEG_Quality    := 90;
end;
mbmp.SaveToFile('D:\Output.pdf');
mbmp.Free();

See Also

◼PDF_PaperHeight
◼PDF_PaperSize
◼PDF_PaperLayout