3
votes

Is there any alternative way to view PDF files on the web instead of using Acrobat Reader? I need to control the viewer to programmatically trigger the printing of the document.

The source of the PDF should come from a webservice URL / AspX

3
have you considered slideshare / scribd?bhups
i am current looking at scribd. do i need to subscribe to it before could print right? thanksleka

3 Answers

12
votes

The easiest I would think is to use the Google Doc Viewer:

<iframe src="http://docs.google.com/viewer?url=**PathToMyPdfFile.pdf**&embedded=true" width="600" height="780" style="border: none;"></iframe>

You need to host your PDF files somewhere online, may be in a file in your public website ( it needs to be a public site) and put the link to the PDF file in "PathToMyPdfFile.pdf" in the iFrame above. Then set the width and height you need.

Google even generates this code for you here:

https://docs.google.com/viewer

Then simply put this iframe anywhere in the body of your page where you want to display your PDF. This also supports many other file formats too.

4
votes

There are quite a few options for document views online, some open source others proprietary. Personally, I've had good experiences with Flex Paper. This will allow you to include the document view on your website, and there are some developer resources which will allow you to integrate it with the functionality you're looking for.

For demos, see here: http://flexpaper.devaldi.com/demo/

1
votes

You can use FoxIT PDF viewer. It's free and programmable.