I have been using Aspose.PDF.Kit to generate PDF’s and merge data into PDF fields. See code below:
SetAsposeLicense();
using (MemoryStream tempStream = new MemoryStream())
{
// Load input file to Pdf Kit form object
Kit.Form PdfForm = new Kit.Form(renderingInfo.DocumentTemplateFilePath, tempStream);
InsertDataIntoPdf(PdfForm, renderingInfo.DocumentFields);
using (MemoryStream outputPdfStream = CreateOutputFileFromTemplate(tempStream))
{
StreamFileToClient(outputPdfStream, renderingInfo.CustomDocumentName);
}
I have recently started getting the following error: Read pdf error:Trailer object is null.: v4.1.0.0
On examining the stack trace, the error is thrown in the constructor of the pdf form.
We have recently upgraded our websites from vs 2005 to vs 2008, and moved from .Net 2.0 to .Net 3.5 - could that have caused the problem?
I have looked at this issue on your forums: http://www.aspose.com/community/forums/190955/pdf-kit-concatenate-fails-trailer-object-is-null/showthread.aspx#190955 however the version of PDF.Kit that I have installed is more recent than the October 2009 fix release date. It also appears to be a slightly different error / usage case.
I can find no further information regarding the Trailer object.
Any information would be greatly appreciated.