ImageGear for C and C++ on Linux v20.0 - Updated
IG_PDF_doc_create_new_page
API Reference Guide > PDF Component API Reference > PDF Component Objects Reference > General Objects > HIG_PDF_DOC > IG_PDF_doc_create_new_page

This function creates a new PDF page for the hMPIDoc.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_PDF_doc_create_new_page(
        HMIGEAR hMPIDoc,
        LONG nAfterPage,
        LPAT_PDF_FIXEDRECT lpMediaBox 
);

Arguments:

Name Type Description
hMPIDoc HMIGEAR The document in which the page is created.
nAfterPage LONG The page number after which the new page is inserted. The first page is 0. Use IG_PDF_BEFORE_FIRST_PAGE to insert the new page at the beginning of a document.
lpMediaBox LPAT_PDF_FIXEDRECT Rectangle specifying the page's media box, specified in user space coordinates.

Return Value:

Error count.

Supported Raster Image Formats:

This function does not process image pixels.

Remarks:

The new PDF page is created at the specified position.

The previous value (if any) is not deleted with the IG_image_delete function. The size of the multi-page image is not changed, so that page arrays is not expanded when nAfterPage is greater than pageCount-1.

To obtain a handle to the PDF page, use the following:

 
Copy Code
HIGEAR hNewPage = NULL;
IG_mpi_page_get(m_hMPDoc, nAfterPage+1, &hNewPage);
HIG_PDF_PAGE hNewPDFPage = NULL;
IG_vector_data_get( hNewPage, (LPVOID*)&hNewPDFPage );
Is this page helpful?
Yes No
Thanks for your feedback.