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.pdfWe 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?