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

Free Support Forum - aspose.com

PDF bookmark insertion


is it possible to insert bookmarks into an existing pdf document already containing bookmarks? Appending of bookmarks is possible via the Add-method of Bookmarks class. But for inserting a bookmark between two existing bookmarks i haven't found any proper approach (only to remove and rebuild parts of the bookmark tree of the document but this is not what i'm looking for).

Thanks for your support in advance.


Thanks for considering Aspose.

Your requirement can be accomplished using PdfContentEditor class, using the following workaround.

1 - First exports the Bookmarks of the Pdf file using ExportBookmarksToXML method into and XML file.

2 - Remove the Bookmarks information from the Pdf file using DeleteBookMarks method.

3- Exit the Bookmarks information within the XML (which was generated in step 1).

4- Import the bookmarks information from XML into the Pdf file saved in step 2, using the ImportBookmarksWithXML method.

If it does not satisfy your requirement, please feel free to contact.