Embed A PDF Into A Web Page

by Tom Mullaly on September 11, 2009

I’m sure there are 20 ways to embed a PDF or a PPT file into a web page but this tip is so easy that it’s worth a post. Just paste in this code, with the URL of the document you want to embed in place of the bold text:

<iframe src=”http://docs.google.com/gview?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true” style=”width:600px; height:500px;” frameborder=”0″></iframe>

With this we’ll get:

The PDF/PPT doesn’t have to have been uploaded to Google Docs, it just needs to be online. What uses can you think of for this functionality? It’s one thing to post a link to another page that you found helpful in a blog post but when you can display a PDF right on your site-without having to host it-you certainly get a much richer site. Via googlesystem.blogspot.com.

Be Sociable, Share!

{ 7 comments… read them below or add one }

angelinajones18

You may use a pdf to html converter to upload the webpage directly. Then the users can read the page without installing pdf viewer.

Deborah

I tried, but could never get the code above to work on a PDF published to my website. I used Scribd, which embeds the PDF. But from what I can see above, and on Scribd, there’s no way to display the bookmark panel for the PDF. Is that correct?

Which means someone has to scroll or page through lots of pages, rather than clicking on the bookmark to navigate directly to a specific PDF page.

Tom

Hi Deborah– if you paste the code above into a page on your site, and replace the bold portion of the code with the web address of any pdf that is on the web (it doesn’t have to be your own page, the link can point anywhere), then this should work. I’m not sure what you mean by ‘bookmark panel’. Please explain, and let’s see if we can get it to work for you. Regardless of how you published the page the pdf has an http address and that should be all you need.
There is a small navigation bar at the top of the pdf frame that this gives you, thogh it is pretty basic and I see no bookmark functionality at all. –T

Ammar

On my chorme browser i got the pdf file.
But when i try to get the same pdf in Ipad i gives me only first page of my Pdf file.
And also it doesnot appear first time,it appears when i change orentation of the Ipad.
Plz help me.
I stuck in this problem for 14 days.

gabe

Too easy!! Thank you very much for this post! Other sites and methods complicated the heck out of it but your method is the quickest and easiest. Appreciate it…

Tom

You’re welcome Gabe! I also was blown away at how easy this method was.

Bim

Is it possible to use a PDF that was saved on the website, instead of PDF that is online?

Leave a Comment

Previous post:

Next post: