4

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? Commented Sep 12, 2011 at 5:33
  • i am current looking at scribd. do i need to subscribe to it before could print right? thanks Commented Sep 12, 2011 at 7:13
  • Relevant: Embedded File Viewer: Google Drive, OneDrive (mirror) Commented Nov 14, 2018 at 10:31

3 Answers 3

12

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.

Sign up to request clarification or add additional context in comments.

2 Comments

This is a good solution, but you can download the file. But if I do not want to leave download?
4

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 Comment

Thanks ShaneC. Ill try to look at flexpaper :)
1

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

2 Comments

Thanks AmitApollo. But i am looking for a viewer that does not require client installation. ( if there is somthing like that ). Thanks :)
Hmmm Scribd has an API, I'm not sure if it'll facilitate your needs though:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.