Description
Adds a page to the PDF document.
Applies to
Syntax
long AddPage(PDFPage page)
Argument |
Description |
---|---|
page |
The PDFPage object to add in the document. The page will be added to the end of the document. |
Return value
Long. Returns 1 if it succeeds, or -1 if an error occurs. For more errors, see the Error Codes.
Usage
Call the function to add a PDFPage object, which is a page, to a PDF document. The page will be added to the end of the document. If you want to add it to certain position in the document, call the InsertPage function instead.
Note that one PDFPage object can only be added or inserted once in any PDF document. If you want to add or insert the PDFPage object again, clone the object first.
Examples
This example adds an empty page to a PDF document.
PDFdocument lpdf_doc PDFpage lpdf_page lpdf_doc = create PDFdocument lpdf_page = create PDFpage //Add an empty page lpdf_doc.addpage(lpdf_page) lpdf_doc.save( "D:\none.pdf")
See also