How to Embed PDF in WordPress

Written by WordPress Expert

January 28, 2023
How to Embed PDF in WordPress

So, you have a website, but also have some PDF files to add to the pages. However, you want them to be able to view the PDF while on the site. How can you do that? Well, in this article, you’ll learn all about how to embed PDF in WordPress.

What is a PDF?

A PDF is short for Portable Document Format. It’s a unique type of document that Adobe created, so you can display links, information, and even audio and video. The PDF is not a web page, so it’s not coded in PHP, HTML, or CSS. PDFs are most commonly used for things like restaurant menus, brochures, ebooks, and printable newsletters.

Why would you offer a PDF for viewing or downloading on your site?

The reason why you’d offer a PDF for your website visitors to either view from the site, or download, is that it’s another way for them to gain information from you. In some cases, they can opt to download and read at their own leisure.

When it comes to viewing PDFs that are embedded on the site, it may be a detailed legal policy. The other reason for embedding a PDF on your site, is to increase a visitor's average time on page, which is the same reason you’d want to embed video on a page. Visitors with that spend a longer time on the site, won’t leave or bounce, and will more than likely interact or buy from you.

As for PDF downloading, as a website owner, you can use PDFs as a means to attract newsletter subscribers. To do this, you just need to put together information on a subject that your readers will find super valuable enough to sign up for your newsletter.

How to Embed PDF in WordPress

While you can upload a PDF directly into your WordPress Media Library, and link it within any post or page, embedding it is a bit different. By default, WordPress will only add a download link to your page, when you add a PDF to it, which means they’d have to visit the PDF, and end up leaving your website.

So, if you want them to view the PDF while on your site, here’s how:

  • Install and activate the PDF Embedder plugin.
  • Configure the plugin
  • Embed PDF

Install and activate the PDF Embedder plugin.

PDF Embedder plugin

Install and activate the PDF Embedder plugin.

PDF Embedder is simple and you can use it in Classic Editor mode or with the Gutenberg content block editor. Out of the box, you can just display the PDF on the page, and it will show up in a view box that visitors can scroll. The great thing about this plugin, even at being free, is that it adjusts to the page size.

If you want to offer the PDF for download using the plugin, or allow people to click on links or track the downloads, you’ll have to pay for the premium version of the PDF Embedder plugin, which is about $20 per year. There’s also a secure version of PDF Embedder that costs about $30 per year, and has the option to place some type of watermark on the PDF, in order to prevent stealing.

Configure the plugin

Once you’ve installed and activated the plugin, you can find the settings for the plugin under Settings in your WordPress admin.

pdf embedder settings

The settings are super simple, and pretty much the default selections should suffice. You can configure it as you wish. In the case you need more options, you will need to purchase the premium version.

Embed PDF

With the PDF Embedder plugin, there are two methods in which you can embed a PDF, with Classic Editor or with the Gutenberg editor. This is great in case you prefer the older editor over the newer one, or vice versa.

Embed PDF - Gutenberg Content Block Editor

  • Open a post or page.
  • Click to add a new block.
  • Click to open the Media Library.
  • Select a file or upload a PDF.

Open a post or page

You can either open a post or page to edit, or create a new page.

Click to add a new block

embed pdf gutenberg

Within the Gutenberg content block editor, click on the square that has a plus sign, to add a new block. Search for PDF, and it should turn up the option to select PDF Embedder.

Click to open the Media Library.

embedding pdf in gutenberg

Select a file or upload a PDF.

When you click, the Media Library will pop up. You can either select an existing PDF or upload a new one.

uploading a PDF

After selecting the PDF that you want to display, click the blue Select button, and the Media Library screen will close. You’ll see a simple content editor block that has a link to your PDF.

content editor block

Don’t be discouraged if you only see a link. Once you publish the page, you will be able to see that the embedder works when you view the page.

Embed PDF - Classic Editor

  • Install and activate the plugin named PDF Embedder.
  • Open a new page or post.
  • Click on the Add Media button.
  • Select PDF file or upload a new one.

Install and activate the plugin named PDF Embedder.

Open a new page or post.

Click on the Add Media button.

Embed PDF in Classic Editor

In Classic editor, users can either use the Visual editor mode or the Text editor mode. This uses the text editor due to the fact that either method will display the shortcode, and the Add Media Button is the same in this editor.

Select PDF file or upload a new one.

The Add Media button opens the Media Library, so you can either select a PDF you’ve already uploaded, or you can load up a new one.

Select PDF file in classic editor

Once you’ve selected the PDF file you’d like to display on the page, you’ll see that it inserts a shortcode to the Classic editor.

To see that the PDF embed works, you can either save the page as a draft and preview it, or publish the page.

In Summary

Now that you know how to embed PDF in WordPress, you can either try this tutorial out, or just upload and link your PDFs into your content. The alternative is to offer both viewing and the ability to download, in case your visitor doesn’t have a lot of time to spend online. That method is a win-win, as it still allows people to stay on your site longer, but also gives the opportunity for them to return later after viewing the PDF that they had downloaded.

Frequently Asked Questions

Is WordPress free?

All you need to do to use WordPress is to invest in a web hosting plan since the software itself is free.

Are WordPress plugins free?

WordPress has loads of plugins you can install, some of them are free, but some of them you will need to pay for. You can learn how to use WordPress Plugins on our blog.

What is WordPress hosting?

WordPress hosting involves housing your website on servers dedicated to CMS WordPress. You can learn more about WordPress Hosting on our blog.

Why choose Verpex for WordPress?

As the leading CMS out there, we’ve made it our mission to offer the most comprehensive and streamlined WordPress solutions on the market. Backed by a responsive customer care team and reliable site enhancement tools, we ensure our users get the full WordPress value and support for a reasonable price.



with the discount code


Jivo Live Chat