Welcome Guest Search | Active Topics | Sign In | Register

System.NullReferenceException on Merge of array of Pdf Documents Options
Sit3coreD3v
Posted: Monday, August 24, 2015 2:27:38 AM
Rank: Newbie
Groups: Member

Joined: 6/29/2015
Posts: 9
Hi,
I am using EO.PDF, this code below has been working but it now doesn't. The error message is not very helpful.
I am creating Pdf documents using ConvertHtml and can see all my documents are created successfully when i debug (and when each one is saved as doc), as each one is created i add them to the Pdfdocs List (which below is then converted to Array). In debug i check page numbers and doc count etc to ensure the docs are all there, i then want to merge all of the docs in the Pdfdoc list.

It fails on this line:
PdfDocument mergedContent = PdfDocument.Merge(Pdfdocs.ToArray<PdfDocument>());

The error message is:

Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: EO.Pdf
at EO.Pdf.Internal.ev..ctor(ev A_0)
at EO.Pdf.Internal.ev..ctor(ev[] A_0, akf[] A_1)
at EO.Pdf.Internal.qa.a.a(aqc A_0, a[] A_1)
at EO.Pdf.Internal.qa..ctor(amp A_0)
at EO.Pdf.Internal.amp.c()
at EO.Pdf.PdfDocument.Merge(PdfDocument[] docs)

Using EO.pdf.dll version: 6.0.36.2
eo_support
Posted: Monday, August 24, 2015 9:20:26 AM
Rank: Administration
Groups: Administration

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

This usually occurs when the PDF files being merged has minor errors or used some rarely used syntax that our product can not parse correctly. I would recommend you to try the latest build first and see if the problem still exists. If it still exists, you can try to isolate the problem into a test project and send the test project to us (including the files that are causing the problems). Once we have that we will be able to investigate further here. See here for more information on how to send test project to us:

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

Thanks!
Sit3coreD3v
Posted: Tuesday, August 25, 2015 11:36:37 AM
Rank: Newbie
Groups: Member

Joined: 6/29/2015
Posts: 9
Hi,
I tried the latest build and the error still occured. As mentioned above i can generate each PDF Ok but merging them together is the problem so not sure how syntax errors come into play there when the individual pdf's are ok? Does the merge command behaving differently to the ConvertHTML command which is correctly generating my pdfs?
Thanks
eo_support
Posted: Tuesday, August 25, 2015 12:13:03 PM
Rank: Administration
Groups: Administration

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

You just need to send a test project to us. We can't shoot in the dark and hope that it would magically hit the exactly problem you are experiencing.

Thanks!
Sit3coreD3v
Posted: Tuesday, September 1, 2015 11:18:19 AM
Rank: Newbie
Groups: Member

Joined: 6/29/2015
Posts: 9
Hi,
I have sent a test project that replicates the error. Your assistance is appreciated.

Thanks
eo_support
Posted: Wednesday, September 2, 2015 3:07:58 PM
Rank: Administration
Groups: Administration

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

We have looked into the test project you sent to us and found a bug on our side. The issue is related to the custom font you used in your page. We will fix this and post an update build as soon as possible and reply here again once the new build is posted.

Thanks!
Sit3coreD3v
Posted: Monday, September 7, 2015 7:43:39 PM
Rank: Newbie
Groups: Member

Joined: 6/29/2015
Posts: 9
Hi,
Is there an eta on when this fix will be available?
Thanks
eo_support
Posted: Monday, September 7, 2015 7:50:16 PM
Rank: Administration
Groups: Administration

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

We have already fixed this issue internally. The new build will be posted this week.

Thanks!
eo_support
Posted: Wednesday, September 9, 2015 8:54:49 PM
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 with the fix. Please see your private message for the download location.

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.