Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PDF Previewing and viewing

I'm creating a document viewing web application. You log in and it takes you to a screen where you have all your docs listed on the left. I want to make it so that when you roll over a document a preview of the document shows up on the right. From there you can click on it for a full view and printing capabilities. I'm not asking how to do all that but I'm wondering what the best way would be to go about rendering the preview of the document. The documents are all going to be pdfs and stored on a server. I'm working in asp.net 3.5 mvc in visual studios 2008.

like image 452
Dale Marshall Avatar asked Feb 12 '09 15:02

Dale Marshall


People also ask

How do I enable PDF previewer?

Open Acrobat or Acrobat Reader. On the Edit menu, choose Preferences. In the Preferences dialog box, choose General in the Categories list, and then select the Enable PDF thumbnail previews in Windows Explorer check box.

How do I view a PDF in Preview mode?

Right-clickHold down the control key while you click on the download entry for the PDF file you want to open. Click on the context menu item for the system default PDF viewer (for example, click on Open in Adobe Acrobat Reader DC) (for example, click on Open in Preview) to open the PDF file in that application.

Why is my PDF not previewing?

1) You should first go to Settings > Application Settings. Uncheck the box for PDF Viewing. 2) If that does not work, then in Adobe, go to Edit > Preferences > Internet and look under the Web Browser Options you will need to make sure you have it set to "allow web viewing."

How do I change PDF view settings?

You can change the overall look and feel of Acrobat by setting the display themes. To choose the theme, go to View > Display Theme, and then select one of the themes below: System Theme - When you choose System Theme, Acrobat changes the UI as per the OS theme.


1 Answers

For creating the PDF preview, first have a look at some other discussions on the subject on StackOverflow:

  • How can I take preview of documents?
  • Get a preview jpeg of a pdf on windows?

If these don't answer your question, you can try a couple more things:

  • You can get a commercial renderer (PDFViewForNet, PDFRasterizer.NET, ABCPDF, ActivePDF, ...).
    Most are fairly expensive though, especially if all you care about is making thumbnails.
  • There is a CodeProject article that shows how to use the Adobe ActiveX, but it may be out of date, easily broken by new releases and its legality is murky.
  • Install GhostScript on the server and request rendered thumbnails of any page from it.
    I did a small project that you will find on the Developer Express forums as an attachment.
    Be careful of the license requirements for GhostScript through.
    I use it for an internal software and it's working pretty well.

Hope this helps.

like image 91
Renaud Bompuis Avatar answered Sep 19 '22 06:09

Renaud Bompuis