Welcome Guest Search | Active Topics | Sign In | Register

Runtime error when checking a checkbox on PDF Options
Andy Clark (Atlas Code)
Posted: Wednesday, December 10, 2014 8:10:32 AM
Rank: Newbie
Groups: Member

Joined: 12/10/2014
Posts: 5
Hi,

We have an issue while using EO.Pdf library. When setting the value of a Check Box to "1" we get the "Object reference not set to an instance of an object" exception when performing a merge:

Code: C#
var SH03Document = new PdfDocument("PathToForm");
var checkbox = SH03Document.Fields["Check Box10"]

checkbox.Value = "1";

using (var ms = new MemoryStream())
{
	var docArrany = documents.ToArray();
	var merged = PdfDocument.Merge(docArrany);    // Exception is thrown here

	merged.Save(ms);
	PdfDocument.Merge(documents.ToArray()).Save(ms);
	
	return ms.GetBuffer().Shrink(ms.Length);
}


Quote:

Stack trace:

at EO.Pdf.Internal.h4.a()
at EO.Pdf.Internal.hi.a(Boolean A_0, hi A_1, aj A_2, Dictionary`2 A_3)
at EO.Pdf.PdfDocument.Merge(PdfDocument[] docs)
at AngliaRegistrars.Services.FormGenerationService.GenerateShareSplit[T](T viewModel)


The PDF we are manipulating can be found here:
http://www.companieshouse.gov.uk/forms/generalForms/SH03_return_of_purchase_of_own_shares.pdf

We are performing other forms of manipulation on this PDF but we only seem to get this error when changing the check box value. If would like to see the entire code base which is used to manipulate the PDF I can append the code snippet.

Can anyone help?
eo_support
Posted: Wednesday, December 10, 2014 10:04:39 AM
Rank: Administration
Groups: Administration

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

Please check the version of your EO.Pdf.dll. We tested with the latest build (dll version 6.0.26.2) and it seems to work fine.

Thanks!
Andy Clark (Atlas Code)
Posted: Wednesday, December 10, 2014 10:07:51 AM
Rank: Newbie
Groups: Member

Joined: 12/10/2014
Posts: 5
We are using dll version 5.0.50.2


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.