Resources     Blog  

  1. Home
  2. WordPress Tutorials
  3. How to Include a PDF Viewer in WordPress

How to Include a PDF Viewer in WordPress

Does your website distribute a lot of PDF content to visitors? If so, then you might want to add a PDF viewer to your website so visitors can view PDFs directly on the site. Most PDFs will open in a new tab after you download them and are displayed by links on the website. By setting up a PDF viewer you can essentially embed PDF files in WordPress.

This is also a great feature because you can use the embedded PDF as the content of a page. This has many benefits and will also make it very easy for visitors to download or print your website’s content. Because of the many advantages PDFs bring to websites, there are a lot of great PDF plugins available. Today I will demonstrate how to add a PDF viewer in WordPress using the PDF Embedder plugin.

Why Use a PDF Viewer

As I said before you can use the PDF as the entirety of the page’s content. You might ask yourself, why would I want an entire page to be a PDF? Well, the main feature of PDFs is that they do not compromise the content regardless of which system they are opened with. This means you can use formats normally not seen in WordPress inside your PDFs. This will also benefit high-resolution images stored in the PDFs. Since the preservation of the file is the main reason PDFs are so popular, it is important to take full advantage of it.

Another popular reason to use a WordPress PDF viewer is to save your visitors’ time. PDFs are opened in a new tab after they are downloaded. This can be a problem with larger files and slower visitors’ Internet speeds. By embedding PDFs on your website visitors will not need to download the file unless they want to. The last, but possibly most important reason is when the PDF opens in another tab, most visitors will not return to your website, which is a problem that is solved by adding a PDF viewer.

How to Include a PDF Viewer in WordPress

Today I will demonstrate how to add a PDF viewer in WordPress using the PDF Embedder plugin. The plugin is very popular with over 100,000 active installs. There is a premium version that unlocks features like being able to download the PDF file, clickable hyperlinks inside the PDF, a download tracker, mobile friendly options, and security enhancements. The mobile-friendly option is really important because a lot of the web traffic today comes from smartphones. Keep in mind that there is one exception to where you can embed a PDF, which is in a blog. WordPress does not allow embedded PDFs in blogs, so do not try.

Let’s start off by clicking on Plugins and selecting the Add New option on the left-hand admin panel.

Add New


Search for PDF Embedder in the available search box. This will pull up additional plugins that you may find helpful.

Search for PDF Embedder in the available search box.

Scroll down until you find the PDF Embedder plugin and click the “Install Now” button and activate the plugin for use.

click the "Install Now" button

On the left-hand admin panel click on Settings and select the PDF Embedder option. This will pull up the main settings page.

click on Settings and select the PDF Embedder option.

The settings page is very easy to use. The first thing you must pick is the Width and Height of the PDF viewer. You need to pick one that works with the existing width and height on your pages. You may have to adjust this a few times if you are not sure about your pages dimensions. You can also select where you want the toolbar to appear and when it is visible. Click on the “Save Changes” button to save your settings.

Click on the "Save Changes" button

Now it’s time to actually embed some PDFs. Go to a new page or an existing page where you want to embed a PDF. Click on the “Add Media” button to enter the media library. Go ahead and select the PDF file you want to embed. Once you insert the PDF you wiill see the following line:

[pdf-embedder url=”” title=”PDF Test”]

The website in the above example will be your own and the PDF file name will be yours as well, but when you preview the changes, you will see the PDF open on the page where this line is located.

you will see the PDF open on the page where this line is located.

Congratulations, you have successfully added a PDF viewer to the pages of your website. Keep in mind a lot of the functionality is locked behind the premium version of the plugin and free version does include some of the basic features that are expected when viewing a PDF file, like being able to download it or click on hyperlinks.

Additional Plugins

WordPress is full of great plugins available and I’m sure you can imagine there are a lot of plugins that improve how PDFs work on websites. It’s no surprise considering PDFs are the most popular file format in the world since they never change the content of the PDF regardless of which system they are opened with. Here are some plugins I can recommend trying to improve the PDF experience for your visitors.

Print, PDF, Email by PrintFriendly

Print, PDF, Email by PrintFriendly is a cool PDF plugin that specializes in printing your PDFs. Printing PDFs is very common as many forms and applications are stored as PDF documents on websites. It’s no surprise this plugin has gain popularity with over 60,000 active installs. It’s definitely a plugin worth trying.

Google Doc Embedder

Google Doc Embedder

Google Doc Embedder can embed Google doc into your website, but it can also do the same for PDFs. Google Docs is an extremely popular platform made by, you guessed it, Google. This gives it a distinct edge over other PDF embedding tools because it not only embeds PDFs but also Google Docs. I definitely recommend trying this out if you like Google Docs.

Keep Your Website Convenient For Visitors

Adding a PDF viewer on your website should only be done to benefit your website’s visitor interaction. Doing this keeps visitors on your pages longer and they will be more likely to keep exploring your website. It also saves them time by not having to actually download the PDF file to view it. Visitors with slower Internet speeds will really appreciate this because a larger PDF could take them more than a few minutes to download.

Something you definitely need to consider is making your website mobile friendly. The option is available as a premium addition, but there are lots of ways to improve your website for mobile viewing. Remember, if there is a way you can make your visitor’s experience better, then you should be aiming for that and a mobile-friendly website should be a top concern.

What are you using your PDF viewer to show on your website? Do you notice that visitors are now staying on your pages longer with the PDFs embedded on your website?

Author: Chris Racicot

Chris is the Support Manager at GreenGeeks and has been with the company since 2010. He has a passion for gaming, scripting and WordPress. When he’s not enjoying his sleep, he’s working on his guitar skills and fiddling with 3d printing.

Was this article helpful?

Related Articles

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.