You Are Here: Home » Articles » Blogging » How-To » Web » Web Design

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

By on September 13th, 2009     

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.




         Submit to Reddit     Stumble


Related Posts by Tags: , , , ,



  • Ujjwol

    cool

  • http://aniri.ro Irina

    Hello

    Do you know if you can remove the print and download options?

    Thanks

    • Anonymous

      It is a Google option, and cannot be removed. But if we find something we will get back to you!

  • http://www.becomingyourownbank.com Nick D.

    thanks for the post it helped..my question is is there anyway to remove the top portion of the viewer…for example the calendar, gmail links etc.



How to embed PDF documents in your website using Google Docs viewer? was originally published on Digitizor.com on September 13, 2009 - 10:23 pm (Indian Standard Time)