PdfBookmarkEditor.ExtractBookmarks() throws System.NullReferenceException exception

I am trying to extract bookmarks from existing pdf doc. The pdf doc could have no bookmarks, if so, ExtractBookmarks function throws exception "System.NullReferenceException" with normal error message: "Object reference not set to an instance of an object.".

Source Aspose.Pdf.Kit
StackTrace
at x22bcffa34b42a390.x93baed8933778e80.xe71110dda7bbe6cd()
at Aspose.Pdf.Kit.PdfBookmarkEditor.ExtractBookmarks()

My code is pretty simple:

PdfBookmarkEditor pdfBookmarkEditor = new PdfBookmarkEditor();

pdfBookmarkEditor.BindPdf(fullFileName);

Bookmarks bms = new Bookmarks();

bms = pdfBookmarkEditor.ExtractBookmarks();

Anyone has idea about it?

Hi Jason,

Please share the problematic PDF file with us, so we could test the issue at our end. You’ll be updated with the results accordingly.

We’re sorry for the inconvenience.
Regards,

Attached the pdf file I am trying to extract bookmarks from.

Hi Jason,

I have reproduced this problem at my end and logged it as PDFKITNET-16344 in our issue tracking system. Our team will look into this issue and you’ll be updated via this forum thread once it is resolved.

We’re sorry for the inconvenience.
Regards,

I am running into this problem too. Is there a timeframe for a resolution? Is there a work around - for instance is there away of checking if a document has any bookmarks before calling this function?

thanks!
Ken

Hi Ken,

This issue is resolved in our upcoming monthly release, which will be available tomorrow. You’ll be notified via this forum thread. Please try using our latest version once it is released. If you still find the same issue then please do let us know.

If you have any further questions, please do let us know.
Regards,

The issues you have found earlier (filed as 16344) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
aspose.notifier:

The issues you have found earlier (filed as 16344) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

I downloaded Aspose.Pdf.Kit for .NET 4.4.0 and I have confirmed that this exception is no longer occurring. Thanks for the update!