Re-organizing bookmarks during merge

Re-organizing bookmarks during merge

Forum member · Oct 3, 2013
I need to merge a set of pdf documents, and as part of the merge I would like to re-organize the bookmarks. I want to add a bookmark in the final document for each merged document at the first page of that document. In addition, any bookmarks found in the source document should appear as branches in the tree under the new bookmark for the document. I think I can memorize all existing bookmarks in the source documents, then merge the documents but drop all bookmarks, then add a complete set of new bookmarks. Is that my only option in DynamicPDF? In other libraries I can slide a new Bookmark object into a tree. Thanks, JR VanMechelen Below is an ASCII drawing of , which may not survive the posting. before, doc a: -b1-+-b1a | +-b1b -b2-+-b2a etc. after, final doc -doc a-+-b1-+-b1a | | | +-b1b | +-b2-+-b2a -doc b -doc c-+ etc.

Re: Re-organizing bookmarks during merge

Support · Oct 4, 2013
Hello, You can achieve your requirement without any problem using our DynamicPDF Merger for .NET product. You will need to add new outlines with desired tree structure to the merged PDF by reading the bookmark information from the input PDF. It is not possible to rearrange the already existing bookmarks using our DynamicPDF Merger API. You will need to load the each PDF using PdfDocument class and read the already existing bookmark information using PdfOutline class and set the calculated page number to the outline and add it to the MergeDocument. You can refer the documentation on reading outline information from an already existing PDF document here . Please note that you will need to set the Boolean Outlines property of the MergeOptions class to false and apply this options to MergeDocument object at the time of appending input PDF to avoid duplication of the bookmarks in the final merged PDF document. You can send an email to our [^a|mailto:support@cete.com|opennewwindow|support^] team asking for the sample code for adding new bookmarks to the final merged PDF by reading the bookmark information from an already existing PDF. Thanks, ceTe Software Support Team.