How to Embed a PDF in WordPress

How to Embed a PDF in WordPress

People worldwide use PDF because it is durable, preserves file format, and is very secure. Moreover, it uses less space and delivers a large amount of content. So, popularity is evident! 

However, adding a PDF file to your WordPress page or post is not as easy. 

Other media files, like images, videos, audio files, and more, are effortless to include. Unfortunately, you cannot add a PDF file to your site the same way.

Just because WordPress does not feature a built-in feature to embed PDF files does not mean it’s not possible. With the right tool, it’s just a piece of cake!


Here, I introduce you to two different ways to embed PDF to your WordPress. 

  1. Embedding a PDF File into WordPress with a Plugin
  2. Embedding a PDF File without a Plugin

Both ways are quick, easy, and will help you embed a PDF file in WordPress. 

Embed a PDF in WordPress With a Plugin

The quickest way to embed a PDF into a WordPress post is by using a plugin. This method saves time and lets you customize the looks of your PDF all at once. 

Here is how to embed a PDF file in WordPress with a plugin in three steps:

  1. Download and Install the PDF embedder plugin.
  2. Configure plugin settings.
  3. Embed the PDF into your WordPress page or post.

Step 1: Install the PDF Embedder Plugin.

You can choose from various PDF plugins. But I suggest PDF Embedder. 

PDF embed

With over 200,000 active installations, this plugin is the best there is. With this plugin, uploading and embedding PDF files in WordPress is effortless. It uses JavaScript to embed PDF files eliminating the need for third-party apps and iframes.

  • Go to the plugins and select ‘Add New Option.’
add new plugin from dashboard
  • Search for ‘PDF Embedder.’
  • Click the ‘Install Now’ button followed by ‘Activate.’
Install and Activate PDF Embedder


  • Download the plugin from the WordPress directory.
  • Go to plugins and select ‘Add New.’
  • Select ‘upload plugin’ and choose ‘File.’

Step 2: Configure Plugin Settings.

After installing the plugin, the next step is to configure plugin settings. It ensures your PDF file appears just the way you want it to.

Go to settings and select the ‘PDF Embedder’ option.

Configure PDF Embedder Plugin Settings

Under the default viewer setting, you get several options. As per your needs, either choose to locate your PDF viewer toolbar upon hovering or keep it visible all the time.

PDF Embedder Setup

Once you are satisfied with the customization settings, save your changes.

Step 3: Embed the PDF into your WordPress page or post.

Now to embed the PDF into your WordPress, go to pages you wish to add PDF file.

Click the ‘Add’ icon on the top left corner and go to PDF Embedder.

Add pdf in post

Then select the pdf file to upload.

upload pdf file in post

Once the file is uploaded, you can preview the changes to check how it appears on the front end of your site.

preview embedded file

Once you are happy with your PDF, save and publish your changes.

Embed a PDF File in WordPress Without a Plugin 

If you do not want to get another plugin for your WordPress site, this section is for you. You can easily add embedded PDF files in WordPress without installing yet another plugin. 

Add your PDF file to your Google Drive account and use the iframe code to embed the file to your site.

Step 1: First, Go to Google Drive and log in to your account.

Step 2: Upload the PDF file you want to embed in your WordPress post. 

Click on ‘New’ at the top left side of your Google Drive account.

add new file to google drive

Select the ‘File Upload’ option and upload the file from your computer.

file upload to google drive

Step 3: After uploading the file to your drive, double click and preview the file. 

Click the three vertical dots (More actions) on the top right corner. Select ‘Open’ in a new window.

In the new window, click on the three vertical dots in the top right corner (More actions) and choose Share.

share uploaded file

Step 4:  You will see a pop-up called ‘Share with people and groups’ and ‘Get link.’ 

In the ‘Get link’ section, change to anyone with the link. This way, those who have the link can view the PDF file. (If you don’t change, it will remain private, and it will be impossible for your visitors to access it.)

Changing the link accessibility to anyone

Once you change it, click on ‘Done.’

Step 5: Now, to get the embed code, again click on three vertical dots (More actions) and select Embed item.

embed pdf file code

Step 6: You will get a pop-up form where you can copy the iframe code.

iframe code

Step 7: Next, go to the WordPress page or post where you wish to add a PDF file.

In case you use the Classic Editor, click on the ‘Text’ tab and paste the code.

If you use the Block Editor, add a new Custom HTML block and insert the code there.

add a new Custom-HTML block

Step 8: You can easily preview your PDF and check how it looks on the front end. 

Paste the iframe code

Once you are done, save changes and publish your content.


WordPress lets you link to your PDF files – but not embed them. However, this tutorial helps solve that problem. 

If you require assistance, please add a comment below.

We also recommend you to check How to Embed a Google Form in WordPress, this article might be helpful for you.

About the Author

Nabin Jaiswal

Nabin Jaiswal is the co-founder of CoachPodium, WP Delicious, and other WordPress products. With over six years of experience in WordPress, he is passionate about writing and sharing his insights with the community. Nabin is committed to contributing to the community through knowledge-sharing and innovation. He has also had the privilege of being a speaker at multiple WordCamps, sharing his expertise and experiences.

View All Posts

Leave a Reply

Your email address will not be published. Required fields are marked *