I’ve been working with modifying a PDF document with Aspose.pdf and I am able to save it properly with Response headers, but I’m having an issue with opening the saved PDF in Adobe Reader. I can open and view the modified PDF in programs like Windows Reader and Google Chrome, but if I try to open it with Adobe Reader then this message appears with a blank document:
Issue.PNG (6.6 KB)
In my code, all I do is fill in some form fields of a previously existing PDF file. The original PDF can be opened without a problem in Adobe Reader; it is only after I save it that it malfunctions.
Here is my code for saving the PDF:
private void SendPdfToSave(Aspose.Pdf.Document finishedPdf)
MemoryStream ms = new MemoryStream();
Response.Charset = “UTF-8”;
Response.AddHeader(“content-disposition”, "attachment; filename= " +
Response.ContentType = “application/pdf”;
I am using Aspose.PDF for .NET 18.7 and Adobe Reader XI.
Any feedback on this would be great.