Keep order of bookmark to page when merging PDFs


We use PDFNet to merge PDF documents together.

When we copy one PDF file with book marks into another PDF with bookmark, not at the end but in the middle of the document. The pages end up in the right place but regarding the book mark form the file that is copied the bookmarks end up at the end of the existing book marks. Clicking on the book marks the right page is shown. We would like to know how can the book mark be inserted between book marks too not just the pages.


There is no built in option for this, however you could disable bookmark merging in doc.InsertPages() or ImportPages(, … false) and then merge bookmarks yourself (using Bookmarks API) to read existing and create new bookmarks and destinations. Bookmark sample project includes some relevant code:

Will this matter be treated in future releases?

Tks for the fast reply!