I have a PDF created by DocuSign, that I would like to merge into a larger PDF. However, whenever I attempt to do this, I receive a NullReferenceException
I attempted to remove the signature but still received the null exception.
The merge process I’m using works with all other PDFs, but for whatever reason it cannot deal with the DocuSign PDF.
Could you please share your sample source PDF document along with the code snippet. We will test the scenario in our environment and address it accordingly.
Aspose.Pdf.Document mergeDoc = new Aspose.Pdf.Document();
Aspose.Pdf.Document docA = new Aspose.Pdf.Document("docusign.pdf");
mergeDoc.Pages.Add(docA.Pages);
// add other docs to merge
mergeDoc.Save("merge.pdf");
I add other docs to the “mergeDoc”, but the error should throw with just that.
We tested the scenario in our environment while using Aspose.PDF for .NET 21.1 and your code snippet. We did not notice any issue. Please check the attached output PDF generated at our end.
@asad.ali Thanks for your help. I am embarrassed to say I thought I had “Just My Code” debugging enabled (but did not), and didn’t even notice the NULL exceptions could be stepped through without issue; so there must just be some normal exception handling occurring in the library.
Thanks again for your help and sorry for the confusion.
It is good to know that your issue has been resolved. Please keep using our API and feel free to create a new topic in case you need further assistance.