Skip to content

ASP .net PDF privew

vinit rai

Asked Jan 4, 2015, 7:16 PM EST1 answer
Share
LinkedInX
I created a PDF file and save it to the disk.
 
But my requirement is that i need to view that document before saving it to the disk. basically i want the priview of PDF before saving it to the disk.
Please help ASAP.

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Vinit,
     
    Who is going to be viewing these PDFs before saving it to disk? Also, are you trying to prevent from saving on the client-side or server-side?
     
    How are you generating the PDF? Is it some type of report?
     
    Web browsers don't natively support PDF, although there are several plug-ins for browsers that support displaying PDF within the browser itself. If you are looking to prevent from having to save the PDF on the server & allow the client to point to a file there, perhaps the solution you are after is to convert PDF to a browser-native format like JPEG or PNG. This would allow the browser to display the preview without needing any plug-in or saving the PDF on the server-side. Such a conversion would require a service on the server-side or a rich-client for the user. Since you are developing in ASP.NET, a service likely makes more sense.
     
    I did a quick Google search and came across this solution dealing with multi-page PDFs and displaying them with an HTML5 viewer. This might be along the lines of what you're looking for.
    0