Obj.GetType() throws an exception: Document is not attached to a file (Apryse SDK)

Product: Apryse SDK .NET

Product Version: 10.9.0

Obj.GetType() throws an exception while looping a large bookmark set.

I have a large bookmark set (about 18k bookmarks).
My product business requires looping each bookmark object and then extracting the Destination information.
This issue happens after looping through about 30 to 60 bookmarks. Then there is an exception as below:

obj.GetType() throws error message: Exception: Message:
Document is not attached to a file
Conditional expression: m_obj_parser.get() != NULL
Version      : 10.9.0-274970b356
Platform     : .Net Framework
Architecture : AMD64
Filename     : SDFDocImpl.cpp
Function     : trnSDFDocImpl::LoadObj Linenumber   : 1281

I tried to sleep 1-1.5 seconds while looping for each bookmark object, but it still happens.

1 Like

You are using an older version of the PDFNet SDK, 10.9. The latest version is 11.3. Can you update to the latest and see if that resolves the issue?

If updating to the latest version does not resolve the issue we will need additional information to assist you including a sample code we can run that duplicates the error you are seeing as well as the sample file itself. It would be preferrable to create a support ticket via our support portal if that is the case.

1 Like