Is it possible to get a preview af a pdf in a online application? So yes: how? Because I get the next error if I try to open a PDF with pdfViewer. openPdfFile.
Line 20: PdfViewer pdfviewer = new PdfViewer(); Line 21: //open a Pdf file. Line 22: pdfviewer.openPdfFile(filePath);
Now get the URL path from HtmlInputFile control. Open the file, decode its first page and then save the image to disk and then set the Image URL to the PDF Image. Please refer to the following code:
Currently we don't support sneding the image directly into web browser in our interface. But you can easily save the bitmap into a memory stream and then send it to browser.
You can’t save the image in smaller size by setting arguments in Save function. You need to resize the image. Please refer to the code attached with the post.
Thanks.
Adeel Ahmad
Support Developer
Aspose Changsha Team http://www.aspose.com/Wiki/default.aspx/Aspose.Corporate/ContactChangsha.html