Issue with ExtractBookmarks()

Apose_PDF.zip (2.4 KB)
We are using ““ExtractBookmarks()”” method of Aspose.Pdf.Facades to retrieve all the bookmarks existing in the PDF. However, the resultant is returning us a random count of first ‘n’ BookMarks of the PDF.

When we try to store the bookmarks in to a XML file with ExtractBookMarksToXML(filePath) of Aspose.Pdf.Facades, we are successfully able to get all the bookmarks in the PDF.

Can you please check and let us know why it is not working with ExtractBookmarks() method or if we are missing anything?

PFA Pdf file, its corresponding ExtractBookMarksToXML(filePath) generated XML file.

Aspose.PDF versions tested with : 21.2.0, 22.3.0, 22.5.0 (Latest)SampleTestFile.pdf (5.1 KB)

@santhoshsas

We tested the scenario in our environment and noticed that the API was able to extract 12 bookmarks from the PDF using ExtractBookmarks() method and same number of bookmarks were exported to the XML file that you have shared. Can you please make sure that you are using the API with a valid license? In case issue still persists, please share a sample console application that is able to reproduce the issue. We will further proceed to assist you accordingly.