I am trying to pull the binary of a PDF from the database and display a prompt to the screen. I am having trouble getting this to work. I am getting the error:
You are in direct-to-file mode,please use Close() instead of Save().
Please explain what I need to do in order to get this functionality.
Here is my sample code:
//ConvertBytesToPDF method is just sending the byte array to a MemoryStream
MemoryStream tempStream = ConvertBytesToPDF(PDFFiles.Data);<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Pdf temppdf = new Pdf(tempStream);
temppdf.Save("output.pdf", Aspose.Pdf.SaveType.OpenInAcrobat, HttpContext.Current.Response);