We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to merge PDF Files with Complete the bookmark

I want to merge some PDF files with nested bookmarks. The goal is to preserve the existing bookmark structure after the merge.

For example:
Merge PDF1.pdf and PDF2.pdf to Merge.pdf
(The original file may contain multiple nested bookmarks)
PDF1.pdf Contain bookmarks
bookmark A from Page 1
bookmark B from Page 3
child bookmarks B-Chart from Page 4
bookmark C from Page 5

PDF2.pdf Contain bookmarks
bookmark D from Page 1
bookmark E from Page 3
child bookmarks E-Chart from Page 4
bookmark F from Page 5

Merge PDF1.pdf and PDF2.pdf to Merge.pdf:
PDF.pdf Contain bookmarks
–bookmark PDF1 from Page 1
bookmark A from Page 1
bookmark B from Page 3
child bookmarks B-Chart from Page 4
bookmark C from Page 5
–bookmark PDF2 from Page 6
bookmark D from Page 6
bookmark E from Page 8
child bookmarks E-Chart from Page 9
bookmark F from Page 10
For more details see the attached.
How to …?
Thank!

Hi Huang,


Thanks for our inquiry. Please use Concatenate() method of PdfFileEditor class for PDF file concatenation, it will preserve the bookmarks of source files in merged PDF file. Please check following documentation link for the purpose, it will help you to accomplish the requirements.


Please feel free to contact us for any further assistance.

Best Regards,