Invalid character was detected while reading an object identifier number

Hello Gembox Team,

We have recently come across an issue with the document loading.

using var source = PdfDocument.Load(sourceFilePath, new PdfLoadOptions { ReadOnly = true });

We receive the following:
Message:
 : Invalid character was detected while reading an object identifier number (either object number or generation number).

Stack Trace:
e.(String , Int32 , String , Int32 )
e.(String , String , Int32 )
e.()
.()
.(Int64 )
.(Int64 ,  , Boolean )
.e()
.()
.e()
.()
PdfDocument.( )
PdfDocument.Load(String path, PdfLoadOptions options)

I believe it might be file-specific and would like any input from your side if we can move forward with it.

The file will be shared via email shortly!

Thank you,
Oleksandr

Hi Oleksandr,

If you open that PDF in Adobe and immediately try to close it, you’ll get a pop-up message asking if you want to save changes:

This indicates that Adobe had to silently repair this file to read it successfully.

GemBox.Pdf can repair some irregularities, but I’m afraid we currently don’t cover all the cases. However, note that we do have an internal support ticket in which we keep track of these kinds of invalid content, and I’ve added your report to it as well to increase its priority.

But at this moment, I cannot tell you exactly when it will be implemented.
Please note that we prioritize feature request implementations by the number of users requesting them and currently, we are working on some other features that have greater priority (more user requests).

Regards,
Mario