Export Bookmarks to XML from an Existing PDF File (facades)

[ ]

To export bookmarks:

  1. Create a PdfBookmarkEditor object and bind the PDF file using the bindPdf method.
  2. Call the exportBookmarksToXml method.

The following code snippet shows you how to export bookmarks to an XML file.

From Aspose.PDF for Java 9.0.0, the PdfBookmarkEditor class implements the exportBookmarksToXML and importBookmarksWithXML methods with Stream arguments. As a result, extracted bookmarks can be saved to a stream object.