Exception while merging pdfs

Hello,

Our application is facing issues during merging pdf’s, some of the DocuSign integrated pdf’s throwing errors can you please help.

We got this error:

Error while creating document path: 33890\160282\attachments\06A2I00000CCdGgUAL.pdf Error: Unable to cast object of type ’ ’ to type ’
'. trace: at .1
at .[1] 1
at Aspose.Pdf.PageCollection.get_Count()
at Aspose.Pdf.PageCollection.1
at Aspose.Pdf.Document.1
at Aspose.Pdf.Document.[1](Stream [1], String
)

@adityaAmn

Could you please share sample PDF documents with us so that we can test the scenario in our environment and address it accordingly.

Thank you for response, yes am attaching a pdf which gives error.PPDQ (1).pdf (337.2 KB)

@adityaAmn

We used the below code snippet with Aspose.PDF for .NET 21.1 and did not notice any Exception:

Document document1 = new Document();
Document document2 = new Document(dataDir + "PPDQ (1).pdf");
document1.Pages.Add(document2.Pages);
document1.Save(dataDir + "merged.pdf");

merged.pdf (322.1 KB)

Could you please share a sample console application that is able to reproduce the issue so that we can again test the scenario and address it accordingly.