Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display PDF within web browser

Tags:

html

browser

pdf

How can I display a pdf within a web browser on an .html page?

like image 455
CodeGuy Avatar asked Jan 31 '11 17:01

CodeGuy


People also ask

How do I display PDF in browser instead of downloading?

At the top right, click More Settings. At the bottom, click Show advanced settings. Under “Privacy”, click Content settings. Under “PDF Documents," check the box next to "Open PDF files in the default PDF viewer application.” (Uncheck this box if you want PDFs to open automatically when you click them.)

Can you embed a PDF in a Web page?

Using an iframe tag is the second way to embed a pdf file in an HTML web page. In web development, web developers use the iframe tag to embed files in various formats and even other websites within a web page. Due to its wide compatibility, the iframe tag is widely used for embedding pdf.

How do I set Adobe to Display PDF in browser?

In the Preferences window, click Security, and then click Website Settings next to Internet plug-ins. Select Adobe Reader in the list of plug-ins. Under When Visiting Other Websites, in the drop-down list choose Allow Always and click Done. The browser is now set to use the Adobe Reader plug-in to display PDFs.


2 Answers

I use Google Docs embeddable PDF viewer. The docs don't have to be uploaded to Google Docs, but they do have to be available online.

<iframe src="http://docs.google.com/gview?url=http://path.com/to/your/pdf.pdf&embedded=true"  style="width:600px; height:500px;" frameborder="0"></iframe> 
like image 68
bradenkeith Avatar answered Oct 02 '22 18:10

bradenkeith


instead of using iframe and depending on the third party`think about using flexpaper, or pdf.js.

I used PDF.js, it works fine for me. Here is the demo.

like image 38
navins Avatar answered Oct 02 '22 16:10

navins