I will purchase the Products of Aspose Total for .Net. But I need to show PDF in asp.net online.
I don’t find the method for this. Can you tell me some functions or codes to show a PDF file online in an asp.net web application?
I will purchase the Products of Aspose Total for .Net. But I need to show PDF in asp.net online.
I don’t find the method for this. Can you tell me some functions or codes to show a PDF file online in an asp.net web application?
Hi Moto,
Hi,
I’ve been a bit mystified why Aspose does not offer a more integrated solution for the actual viewing of PDFs myself. Most of Aspose’s stuff is so good, I’d love to see that in the future.
Hi Jim,
Thanks for sharing the details.
Aspose.Pdf for .NET supports the feature to create and manipulate PDF documents and currently we do not have any plans to introduce any feature regarding PDF viewing.
A quick glance at the viewer app recommended by codewarrior does not appear to be a very good solution. The licensing seems to be more for corps and less for development, and the control itself seems to be missing critical functionality (downloading) the PDF for example.
You may use GroupDocs API’s to accomplish more requirements and in case you do not find any solution for downloading PDF files, you may create a request to support staff taking taking care of this venture.
The only problem with those approaches is that I’ve not found a good way to handle rendering a PDF from the database. I’d love a recommendation there if anyone has one.
You may read the PDF contents from a database using a Byte array, convert the array to a Stream object and instantiate a new Document object. Manipulate the PDF file using Aspose.Pdf for .NET and then use the View App to display the PDF file.
[C#]
// read an example file to new byte array
Byte[] exampleByteArray1 = File.ReadAllBytes(@"C:\pdfnew.pdf");
// write data to the new stream
MemoryStream mStream = new MemoryStream();
mStream.Write(exampleByteArray1, 0, exampleByteArray1.Length);
// instantiate Document class object
Document pdffile = new Document(mStream);