I am working on a production support issue. We are using C# with Aspose.PDF (24.1.0). I do not have the file unfortunately. I realize that you cannot duplicate the issue without the PDF, but may I please know some common reasons for the error below? I cannot debug because the stack trace is obfuscated. Here is the scenario:
- The user uploads a file.
- We verify that the file is a content type of application/pdf.
- We move that pdf to a memory stream.
- An Aspose.Pdf.PdfDocument is instantiated with that memory stream.
- We combine multiple pdfs in that document if there are any more (in this case it was only the one pdf, so no combining happened).
- We use Aspose.Pdf.PdfDocument.Save to move the completed document to a new memory stream.
When we do that, this error below occurs:
System.NullReferenceException: Object reference not set to an instance of an object.
at Aspose.Pdf.Document.#=zdW1b$Ypt2eJ1()
at Aspose.Pdf.Document.#=zV9gkdScQ52R41SUKfg==()
at Aspose.Pdf.Document.#=zmScjVlWaug$v(Stream #=zi7IuvFA=, SaveOptions #=zMUYxo6mTQ6TK)
at Aspose.Pdf.Document.Save(Stream output)