ImageGear Professional v18.2 > API Reference Guide > PDF Component API Reference > PDF Component Objects Reference > General Objects > HIG_PDF_DOC > IG_PDF_doc_insert_pages |
This function inserts nPageCount pages from hDoc2 into hDoc.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_PDF_doc_insert_pages( HIG_PDF_DOC hDoc, LONG nAfterThisPage, HIG_PDF_DOC hDoc2, LONG nStartPage, LONG nPageCount, WORD nInsertFlags ); |
Name | Type | Description |
hDoc | HIG_PDF_DOC | The document into which pages are inserted. |
nAfterThisPage | LONG | The page number in hDoc after which pages from hDoc2 are inserted. The first page is 0. If IG_PDF_BEFORE_FIRST_PAGE is used, the pages are inserted before the first page in hDoc . Use IG_PDF_LAST_PAGE to insert pages after the last page in hDoc. |
hDoc2 | HIG_PDF_DOC | The document containing the pages that are inserted into hDoc. |
nStartPage | LONG | The page number of the first page in hDoc2 to insert into hDoc. The first page is 0. |
nPageCount | LONG | The number of pages in hDoc2 to insert into hDoc. Use IG_PDF_ALL_PAGES to insert all pages from hDoc2 into hDoc. |
nInsertFlags | WORD |
Flags that determine what additional information is copied from hDoc2 into hDoc. An OR of enumIGPDFInsertFlags constants:
|
Error count.
This function does not process image pixels.
Copy Code
|
|
---|---|
AT_CHAR* first_filename = "first.pdf" ; AT_CHAR* second_filename = "second.pdf" ; AT_CHAR* combined_filename = "combined.pdf" ; /* Open first PDF */ /* Open second PDF */ /* Insert pages */ /* Save combined PDF document */ IG_mpi_close( first_hmigear ) ; |
All annotations, and anything else associated with the page (such as a thumbnail image) are copied from the hDoc2 pages to the new pages in hDoc. This function does not insert pages, if hDoc is equal to hDoc2. The nInsertFlags controls whether bookmarks and threads are inserted along with the specified pages.