How to embed PDF documents in your website using Google Docs viewer?

Advertisements

google docs embed pdfGenerally when you have to share a PDF document with users on your website, you choose various techniques such as upload the file to your server and share the link with your readers or may be upload the file to Google Docs and share the link to the document with readers. In this article we will tell you yet another method which you can use to embed PDF files right on your website using the Google Docs viewer.

First, You have to upload the PDF Document (PDF file) on some server or any file storing service so that the PDF Document is accessible online. Now you can use this html <iframe> code below to embed the PDF document on your website and show it to users / readers using the Google Docs Online viewer.

<iframe src=“http://docs.google.com/gview?url=URL_OF_YOUR_PDF_DOCUMENT&embedded=true” style=“width:500px; height:500px;” frameborder=“0″></iframe>

In order to embed just copy and paste the above code snippet on your website. You should replace the line URL_OF_YOUR_PDF_DOCUMENT with the URL of your PDF document. You can also change the values of the width and height properties to suit your website’s needs. Below we have embedded a PDF document as an example.

Code

<iframe src=“http://docs.google.com/gview?url=http://digitizor.com/Fedora_11_Cheat_sheet.pdf&embedded=true” style=“width:500px; height:500px;” frameborder=“0″></iframe>

Embedded Document

Via GOS. Link to the PDF Document above.



September 13th, 2009 Written by The Digitizor    

Free subscription: Subscribe RSS feed or get daily tips in your email
* Click confirmation link sent in email * Don't see the email? check spam folder

  Facebook 


Liked it? Share...   Digg It!   Submit to Del.icio.us   Submit to Reddit   Stumble   Submit to Identica   Slashdot It   Send to a friend via email


blog comments powered by Disqus

Trackbacks