ImageEn, unit iepdf

TIEPDFBuilder.AddPage

TIEPDFBuilder.AddPage


Declaration

function AddPage(PaperWidth: integer; PaperHeight: integer; InsertIndex: Integer = -1): integer; overload;
function AddPage(Size: TIOPDFPaperSize; Layout: TIEPageLayout = ielPortrait; InsertIndex: Integer = -1): integer; overload;


Description

Creates a new page of size PaperWidth x PaperHeight (in Adobe PDF points).
1 Adode PDF point = 1/72 of an inch, so a page of 595 x 842, equates to 8.26 x 11.69 inches, i.e. A4.
Alternatively, you can set a specific page size and layout.
If InsertIndex > -1, the new page will be inserted at the specified page index of the document. If -1, it will be appended to the end of the document.

Result will be the index of the new page (which will be the same as CurrentPageIndex


Demos

Demo  Demos\PDF\PDFBuilder2\PDFBuilder2.dpr


Examples

// Add a new page of 595 x 842 (each point is 1/72 of inch, so you are creating a page of 8.26 x 11.69 inches, which is an A4 page)
pdf.AddPage( 595, 842 );

// Which is the same as:
pdf.AddPage( iepA4 );


See Also

AddPageWithImage
AddPageWithLayers
IEPointsToPaperSize
IEPaperSizeToPoints
IECalcPaperSize