ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

How to Embed a PDF in WordPress Using Google Docs Plugin

Updated on May 19, 2013
Source

In a previous Hub, I showed you how easy it is to insert a PDF into WordPress as a simple text link. This is fine if you just want to create links to some PDF documents.

But what about your visitors who either don't have the Adobe Acrobat PDF reader, or don't have the proper version installed on their computer?

Forcing your website visitors to download and install upgrades to Acrobat can turn into a BIG hassle for them. Always remember the first rule of good web development: make the user's experience as easy, simple, and painless as possible.

In this Hub, I'll show you how to actually embed a PDF in WordPress, rightinto the body of your posts and pages using a Google Docs plugin. Not only does this allow your visitors to read PDFs directly on your webpage (thus eliminating one extra mouse click), it also requires no installations or upgrades of Adobe Acrobat. In fact, the visitor doesn't even have to HAVE Acrobat at all.

And here's the best part: this plugin doesn't require a Google Docs account either. Pretty cool, huh?

Click here for a live example.

Installing the Google Docs Plugin

First off, let's install the plugin that will let us embed a PDF in WordPress.

Login to your WordPress website and head over to the "Plugins" tab at the left of your screen. Click "Add New" and then type "Google Docs Embedder" into the search box. Click "Search Plugins." Your screen should look similar to the one below:

Search for "Google Docs Embedder" to locate the proper plugin.
Search for "Google Docs Embedder" to locate the proper plugin.

Click "Details", then click the red "Install Now" button to install the plugin.

Note: Make sure the plugin is compatible with your version of WordPress. If not, you may need to upgrade your WordPress installation.

Make sure the plugin is compatible with your version of WordPress, then click "Install Now."
Make sure the plugin is compatible with your version of WordPress, then click "Install Now."

Once the plugin has finished installing, click the "Activate Plugin" link.

Click "Activate Plugin" after the installation finishes.
Click "Activate Plugin" after the installation finishes.

Google Docs Plugin Settings

Go back to "Installed Plugins" in the left-hand menu, then click the "Settings" link under Google Doc Embedder.

Click the "Settings" link under Google Docs Embedder.
Click the "Settings" link under Google Docs Embedder.

The settings screen allows you to configure the plugin for your website. You can choose the standard or enhanced viewer, set file types and sizes, integrate the viewer with Google Analytics, and find links to support documentation.

Check out the links below for more support info:

Use the tabs to configure the plugin for your website.
Use the tabs to configure the plugin for your website.

Upload Your PDF Document

Head over to "Media" on the left and click "Add New." Select the PDF you want to upload from your hard-drive and WordPress will automatically upload it. You should see a screen similar to the one below:

Upload your PDF, then click the "Edit" link.
Upload your PDF, then click the "Edit" link.

Click the "Edit" link highlighted in yellow above. Copy the full URL of the PDF on the right of the next screen:

Grab the PDF's URL from the edit screen.
Grab the PDF's URL from the edit screen.

Embed a PDF in Your WordPress Posts or Pages

Now you're ready to embed your PDF. Jump over to the "Posts" or "Pages" section and click into edit mode. Notice the new Google Docs plugin embedder button on the toolbar:

Click the Google Docs icon on the toolbar to open the embedder plugin.
Click the Google Docs icon on the toolbar to open the embedder plugin.

Click the toolbar icon to bring up the embedder dialogue screen. Paste the PDF's URL that you copied into the URL field. The plugin shortcode will display in the "Shortcode Preview" field:

Paste the PDF's URL in the field to generate the plugin shortcode.
Paste the PDF's URL in the field to generate the plugin shortcode.

Now click "Insert." The Google Docs plugin shortcode will appear in the body text of your page or post.

Note: Make sure you remember to "Update" the post or page to save your work.

The shortcode appears in the body text. Don't forget to update your work!
The shortcode appears in the body text. Don't forget to update your work!

Congrats, You're Done!

Ta daaa! That's it. You've now successfully embedded a PDF in WordPress, and your visitors can read it with no Adobe browser extensions whatsoever.

You've just made your website an easier, more user-friendly place to visit!


PS - I'd love to hear suggestions for other ways to embed a PDF in WordPress. Do you have a favorite plugin or other method you like to use? Please share it below.

Thanks!

Comments

    0 of 8192 characters used
    Post Comment

    • profile image

      Phil Chow (Noticedwebsites.com) 3 years ago

      Another way is to convert your PDF into JPEG using say Jing Screen Capture and then inserting that JPEG into your WP page or post via the media insert button.

    • DrivingPeace profile image
      Author

      Greg Weber 3 years ago from Montana

      That's a great suggestion! Thanks Phil!

    • profile image

      Becky 2 years ago

      This worked perfectly, thanks so much!

    • profile image

      samdani 14 months ago

      The topic on embedding PDF in WordPress using Google Docs Plugin is very much tonic . This article is much effective to learn nicely for embedding PDF in wordpress . I convey you thanks a lot for sharing here this nice topic easily . I recommend here some other source for getting another nice and essential plugin https://www.gsamdani.com/product/gs-testimonial-sl...

    Click to Rate This Article