Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
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=""]

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 lovers 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 »
  • Tanay Talesra

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

    • WPBeginner Support

      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.

  • anand kjha

    awsm post sir!

  • shamsher khan

    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

      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.

  • arthur c van wyk

    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?

  • Ryan

    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

      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

        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?

  • Ryan

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

    • Editorial Staff

      Which version of IE is this not working in?

  • Alison Genet

    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

      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.

  • Emily

    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

      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 :)

  • Crysislevel

    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! :)

  • wpbeginner

    @smseleem remove the menu item –

  • smseleem

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

  • jkretch

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

  • jasonfox_me

    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.

  • After9Design

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

  • Heather Hapeta

    good stuff

  • Connor Crosby

    Looks like an excellent read, thanks :)