Welcome Guest Search | Active Topics | Sign In | Register

EO.Pdf - Exception in PdfDocument constructor Options
Moazzam Ahmad
Posted: Tuesday, August 22, 2017 10:42:19 AM
Rank: Newbie
Groups: Member

Joined: 8/17/2017
Posts: 4
We are observing a potential issue with the EO.Pdf library for .NET C#. We are currently using a licensed v15.3.31.0 in our production environment, but the issue also seems to exist in the latest version v17.2.43.0.

To elaborate, the library works quite well for our purposes and we are only observing the issue with some PDF files.

In our product, the flow is such that PDFs are available in the process memory as bytes, from which "stream" objects are created and passed to the stream-based PdfDocument constructor. The intention is to eventually pass the PdfDocument objects to the Merge() method for stitching them together. We get a NullReferenceException in the stream-based PdfDocument constructor.

To demonstrate the issue, I have prepared a simple application in which PDFs are read from the file-system and constructed as PdfDocument objects, which are then passed into the Merge() method. In this case too, we get a NullReferenceException in the PdfDocument constructor for some files.

I found a seemingly similar issue discussed on the forums quite some time ago:
https://www.essentialobjects.com/forum/postst9304_SystemNullReferenceException-on-Merge-of-array-of-Pdf-Documents.aspx

However, ours might be new issue because we have tried with the latest version too.

We cannot publicly share the PDF files that are causing the issue but we can share the sample project and PDF files privately with your support team.

Exception with v15.3.31.0
at EO.Internal.pd.d()
at EO.Internal.aap.a(f5 A_0)
at EO.Internal.f5.a(akw A_0)
at EO.Internal.f5.a(Stream A_0, Boolean A_1, Boolean A_2)
at EO.Internal.f5.a(String A_0)
at EO.Internal.f5..ctor(String A_0, PdfDocumentSecurity A_1)
at EO.Pdf.PdfDocument..ctor(String fileName)
at ...(I've omitted our code's portion of the call stack)

Exception with v17.2.43.0
at EO.Internal.pl.d()
at EO.Internal.aai.a(gb A_0)
at EO.Internal.gb.a(akq A_0)
at EO.Internal.gb.a(Stream A_0, Boolean A_1, Boolean A_2)
at EO.Internal.gb.a(String A_0)
at EO.Internal.gb..ctor(String A_0, PdfDocumentSecurity A_1)
at EO.Pdf.PdfDocument..ctor(String fileName)
at ...(I've omitted our code's portion of the call stack)
eo_support
Posted: Tuesday, August 22, 2017 10:44:49 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

You can send the files to us and we will be happy to investigate further. See here for more details on how to send the test files to us:

https://www.essentialobjects.com/forum/test_project.aspx

Thanks!
Moazzam Ahmad
Posted: Wednesday, August 23, 2017 7:28:32 AM
Rank: Newbie
Groups: Member

Joined: 8/17/2017
Posts: 4
Thanks for the prompt reply. I've just emailed a test project to support. Please have a look and let us know the way forward. Thanks!
eo_support
Posted: Friday, August 25, 2017 9:25:10 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

This is just to let you know that we have resolved the NullReferenceException error but we are still working on the other one. We will reply here again once we have an update.

Thanks!
Moazzam Ahmad
Posted: Monday, August 28, 2017 11:26:07 AM
Rank: Newbie
Groups: Member

Joined: 8/17/2017
Posts: 4
Hello,

Thanks for the update. Hopefully you will find and correct the remaining exception too. Just out of curiosity, what was the cause of the NullReferenceException? Does it have something to do with font handling? Or something else?

Once again, thanks for the wonderful support!
eo_support
Posted: Monday, August 28, 2017 11:35:38 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

There is a section in a PDF file that's called a reference table. Inside this table contains a list of pointers. In the file you sent to us this list does not exist --- which can be interpreted as an empty list, even though such a table with no entry contains no useful information thus does not need to exist. Our code was expecting this list and throw an exception when it does not exist. We have changed our code to treat this scenario as empty list. So this new build should be able to tolerate such files.

Thanks!
Moazzam Ahmad
Posted: Tuesday, September 12, 2017 10:15:42 AM
Rank: Newbie
Groups: Member

Joined: 8/17/2017
Posts: 4
Hello,

Thanks for the explanation about the first exception, really quite informative. Any update about the second exception? Do let us know when we can evaluate the fixed version of the library.

Thanks!
eo_support
Posted: Tuesday, September 12, 2017 1:46:55 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

The second error is a bug on our side that is related to AES encryption. We have already fixed this bug internally and we are trying to publish the new build later this weekend. However we have been affected by hurricane irma and some of our systems are still down due to power outage. We will try our best to post the new build this week.

Thanks!
eo_support
Posted: Thursday, September 14, 2017 9:28:54 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

This is just to let you know that we have posted a new build that should fix these issues. You can download the new build from our download page. Please take a look and let us know how it goes.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.