We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Concantenating PDFs generates a null reference

I am having some issues with out of memory errors when combining many large PDFs. We were using 10.4 and I upgraded to 11.5 to see if that would resolve but created other issues. We are also using PDF.Word 15.10.
Now I am getting a null reference when I combine any PDF that is ASPOSE created.
I tried to go back to 10.4 but continue to get the errors.

System.NullReferenceException: Object reference not set to an instance of an object.

Aspose.Pdf.Facades.PdfFileEditor pdfEd = new Aspose.Pdf.Facades.PdfFileEditor();
foreach (var item in ultraListView1.Items)
if (item.CheckState == CheckState.Checked)
aDoc = localContext.ApplicationDocuments.Find(Guid.Parse(item.Key.ToString()));
f = new Aspose.Pdf.Facades.Form();
f.BindPdf(new MemoryStream(aDoc.DocumentBlob));
msDoc = new MemoryStream();
msFinalPkg = new MemoryStream();
pdfEd.Concatenate(msDocs.ToArray(), msFinalPkg);

This worked with 10.4 except for the out of memory errors occasionally.

This seems to be very similar to:
Concatenating PDFs generated by Aspose.PDF fail with NullReferenceException

Hi Marc,

Thanks for contacting support.

Can you please share the resource files, so that we can test the scenario in our environment. We are sorry for this inconvenience.