Free Support Forum -

Error concatenating pdf's using Aspose.Pdf.Kit for .NET 3.8.0 & 3.9.0

Using Aspose.Pdf.Kit for .NET 3.8.0 & Aspose.Pdf.Kit for .NET 3.9.0, Combining the attached pdf files causes the following error.

"Unable to cast object of type 'xeb116a323308e2f7.x0b25947bdf0fba40' to type 'xeb116a323308e2f7.xe3033695b7f6d53d'."

Please advice.

Hi Rakesh,

Thank you very much for considering Aspose.

I have noticed that your PDF files contain PDF Forms, so you can use ConcatenateForms method as shown in the following code snippet:

Aspose.Pdf.Kit.PdfFileEditor editor = new Aspose.Pdf.Kit.PdfFileEditor();

editor.ConcatenateForms(“EGA_Met_Business_Class_Fax_Cover_Sheet.pdf”, “EGA_Authorization_Form.pdf”, “output1.pdf”);

editor.ConcatenateForms(“output1.pdf”, “COMPDISC-ID_LiveCycle_030909.pdf”, “output2.pdf”);

editor.ConcatenateForms(“output2.pdf”, “COMB-89216-HI.pdf”, “output3.pdf”);
I have tested the files using above sample and the concatenation was successful.

If you have any further questions or find some other issue, please do let us know.