Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

How to Embed PDF, Spreadsheet, and others in WordPress Blog Posts

Last updated on by
Follow WPBeginner on YouTube
How to Embed PDF, Spreadsheet, and others in WordPress Blog Posts

One of our users asked us how they can embed PDFs in their WordPress blog and make it available for others to download as well. In this article, we will show you how you can embed PDFs, Microsoft Word Documents, PowerPoint slides, Excel Spreadsheets, and other elements in your WordPress blog by using a plugin called Google Doc Embedder. Don’t let the name fool you. It does not require you to have a Google Docs account. It simply uses the Google Docs viewer to display all of those files on your blog.

Video Tutorial

If you don’t like the video or need more instructions, then continue reading.

First thing you need to do is install Google Doc Embedder Plugin. (refer to our step by step guide to installing a WordPress plugin).

Once you have this plugin installed, a new settings panel will be added under Settings » GDE Settings.

Google Docs Embedder Settings Page

You can customize the width. Choose whether you want to show the download links to everyone or just logged in users, and control other options. Once you have done that. Lets come back to the media uploader, and upload a new file (your PDF file or Excel file that you want to display). Then copy the Media File url like its shown in the image below:

WordPress getting the Media File URL

Now open your post editor, and use the shortcode like this:

[gview file="http://url.to/file.pdf"]

You can override other elements in there such as width= or height= etc. For more Usage Notes refer to the developer’s site.

And you are done. You should now have a PDF attached in your WordPress post with a download link if you have that option selected.

Notice: Many folks confuse the plugin with the name Google Docs. The point of this plugin is to display locally hosted files in the blog not embedding from the Google Docs itself.

Download Google Doc Embedder


Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »

Comments

  1. tamy says:

    I have installed the plugin and updated a PDF, then deleted the plugin but now there is a PDF icon on all the pages. I can’t seem to locate the file to delete it. It was google page view plugin. How can I locate and delete it?

  2. Donna says:

    I was searching for a solution to embed a working Excell document in a WP site and this really helped me! Just one thing: there is a button in the document but the button does not show in the WP site. Do you know how to solve this problem?

    Thanks!

  3. Jac says:

    Sorry but it is not working anymore and there is no feedback from the creators. Below is the error message you get and this file is only 1.87Mb.

    This happened as soon as WordPress updated to the latest version.

    You’ve reached the bandwidth limit for viewing or downloading files that aren’t in Google Docs format. Please try again later.

  4. Lily THERESA says:

    Are these embedded documents searchable?

  5. Tanay Talesra says:

    Hi, I want to embed a Google form (doc) on my WordPress website. How can I do this?

    • WPBeginner Support says:

      Simply create your Google Form, and then click on the Send button, this will bring up a popup. Click on the embed button in the popup to get the embed code. Copy and paste this code inside your post or pages.

  6. anand kjha says:

    awsm post sir!

  7. shamsher khan says:

    Thank you for sharing it is informative but on thing i would like to ask we should upload . documents on our host or should upload it on Google drive. which method is good for seo.

    • WPBeginner Support says:

      Uploading them on your site would be better if your PDF files do not contain encrypted text then search engines can read and index them as well.

  8. arthur c van wyk says:

    I embedded an Excel spreadsheet and it embeds as a solid image in the Google Docs Viewer. How do I get it to work as a spreadsheet in WordPress?

  9. Ryan says:

    Okay so I have come a little bit closer to making this work but I havent quite got there yet. The error message i get now is “Sorry, we were unable to find the document at the original source. Verify that the document still exists. You can also try to download the original document by clicking here.” So when I click “Here” the page comes up no problem. Any ideas why this is the case?

    • Bruno says:

      I have the same problem and it seems that the plugin only works when the document is accessible for Google. Behind a firewall in an Intranet the plugin is showing this behavior.

      • Linda Ploszaj says:

        I am having the same problem, I uploaded directly from my computer, not google drive. It shows the error above in the viewer, but the download link works. Any help?

  10. Ryan says:

    Do you know of a workaround for IE? Can’t help but wonder why 49% of my users are using IE…

  11. Alison Genet says:

    Is there a way to add a document on your site that has fill-in areas that later can be printed out?

    For example, a contract where someone can fill in their name and the date and either download it with their name or print it?

    • Editorial Staff says:

      Editable PDFs have to be done on your computer end not on WordPress end. If you upload a PDF that has editable fields, then the web browser will understand that.

  12. Emily says:

    Thanks so much for this tutorial. But I’m wondering — is there a way to make the PDF take up the whole page, rather than showing up as an image within the wordpress site frame? The PDF is of my resume, and I’d like my “resume” tab to open a page that has the resume taking up the full screen…

    • Editorial Staff says:

      Hey Emily,

      You should consider uploading your PDF by going to Media tab and Add New. Then link directly to that PDF. Send us an email using the contact form if you get stuck :)

  13. Crysislevel says:

    thanx for this plugin. i never knew der was a viewer too….i used to simply link the pdf file to the site its available on! :)

  14. wpbeginner says:

    @smseleem remove the menu item – http://wpbeg.in/irllKU

  15. smseleem says:

    @wpbeginner Can you help how can I disable Theme Option in WordPress Admin Panel?

  16. jkretch says:

    @wpbeginner Nice! Thanks for sharing. Cool way to share presentations and the like without going to Slideshare.

  17. jasonfox_me says:

    Thats great! I have always uploaded the document and created a 301 from the page tab. being able to use shortcode to embed them in the page could be very helpful. Thanks for the tip.

  18. After9Design says:

    This was something I’ve been looking for. I’m going to get the plugin and find out where you got that shortcode from.

  19. Heather Hapeta says:

    good stuff

  20. Connor Crosby says:

    Looks like an excellent read, thanks :)

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.