Create PDF file from bytes in AWS Lambda using Aspose.PDF for .NET - getting an error at saving

Hi: We are trying to create PDF from bytes using Aspose.pdf in AWS Labmbda .Net and gettting error on “at Aspose.Pdf.Document.Save(Stream outputStream, SaveFormat format)”.

code
MemoryStream pdfStream = new MemoryStream( pdfBytes );
Document pdfDoc = new Document( pdfStream );

MemoryStream outStream = new MemoryStream();
// Save the document
pdfDoc.Save(outStream, SaveFormat.Pdf);

Please help to fix this issue.

@sathia

Could you please share a sample PDF document with us along with the complete stack trace and exception message you are facing. Also please try to use Document.Save() method without passing file format type in it and share the result with us. We will further proceed to assist you accordingly.