Import Bookmarks from XML to an Existing PDF File (facades)
Contents
[
Hide
]
The importBookmarksWithXml method allows you to import bookmarks into a PDF file from an XML file.
To import bookmarks:
- Create a PdfBookmarkEditor object and bind the PDF file using the bindPdf method.
- Call the importBookmarksWithXml method.
- Save the updated PDF file using the save method.
The following code snippet shows how to import bookmarks from 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 imported from a stream object.