We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Upgrading ASP.PDF Cant open document in Acrobat from page

I am trying to update to newer version os ASPOSE.PDF.

Old version I did this to open document in Acrobat reader.

pdf.Save("Test.pdf", Aspose.Pdf.SaveType.OpenInAcrobat, Response)

But new ASPOSE.PDF does not support this so how do I do it?

Thanks.

I got following code to work but still wondering if there is built in function in new version like before.

Code:

------------------------------------------------------------------

fname = Server.MapPath(".") & "\Test.pdf"

fs = File.Open(fname, FileMode.Open)

Dim data(fs.Length) As Byte

fs.Read(data, 0, fs.Length)

fs.Close()

Response.Clear()

Response.Charset = ""

Response.ContentType = "application/pdf"

Response.AddHeader("Content-Disposition", "inline;filename=" & Session("SearchInvoiceNum") & ".pdf")

Response.BinaryWrite(data)

Response.End()

Hi,


Sorry for the delayed response.

I have tested the scenario using Aspose.Pdf for .NET 8.3.0 and as per my observations, I am able to use pdf.Save(“sample.pdf”,
SaveType.OpenInAcrobat, Response);
method and when executing the code, the file save dialog is properly appearing. Can you please share which version of Aspose.Pdf for .NET you are using. We are sorry for this inconvenience.

<o:p></o:p>

I am upgrading from Aspose.PDF version 5.3 to version 7.0 (This is last version my licence activates.)

I got it to work. Looks like everything got moved from Aspose.Pdf.Pdf class to Apose.Pdf.Generator.Pdf class. So following code will work:

Old Way:

pdf.Save("Test.pdf", Aspose.Pdf.SaveType.OpenInAcrobat, Response)

New Way:

pdf.Save("Test.pdf", Aspose.Pdf.Generator.SaveType.OpenInAcrobat, Response)

Hi,


Since the release of Aspose.Pdf for .NET 6.0.0, all the classes and enumerations of legacy Aspose.Pdf for .NET have been moved under Aspose.Pdf.Generator namespace of new MergedAPI release of Aspose.Pdf for .NET. For further information, please visit Migration from Earlier Versions of Aspose.Pdf for .NET