blogs , Uncategorized , Tutorials ,

3 Useful Methods to Embed PDF Files in WordPress Websites

By admin > No Comments

3 Useful Methods to Embed PDF Files in WordPress Websites

Embed PDF files on WordPress Websites: WordPress pitches itself as one of the most flexible platforms in the world. Well, that cannot be denied as well. As it holds a vast range of features, all of which contribute to a well-functioning website.

But what matters in matching the energy of this digital world is the usage of media content. Although WordPress excels in almost every function. Unfortunately, it lacks in delivering PDF files.

Then the only way to add PDF files is through embedding. However, users find it more difficult than uploading directly to the website. Uploading is easy and fast, but it can slow down your website’s performance.

Embedding a PDF file can be crucial for your website to run. You don’t have to directly upload it, so it will consume less space.

So here, we will help you find the best ways to Embed PDF files on your WordPress Themes.

Why Embed PDF files on WordPress websites?

You must be on the trip of various questions that uploading is the fastest way, so why embed PDF files? Here's the powerful answer to this. 

Embedding PDF files can be a game-changing step in your website's development. When you embed files, it generally saves time to download them from the website. Downloading can fill your website or device with space.

However, by embedding the file, it can be viewed on the website itself. You can even attach various files without directly reaching them. And this will ultimately boost the performance of your website.

Methods to embed

Method 1: Embed a PDF file in WordPress using a plugin.

Method 2: Embed a PDF file in WordPress using Google Drive

Method 3: Embed a PDF file in WordPress using the Gutenberg Editor.

Method 1: Embed a PDF file in WordPress using a plugin.

Getting started with this guide to embedding PDFs in WordPress using a plugin This method is quite easy when you have an automated tool.

And so, we will use one of the finest plugins called the PDF embedder. The plugin is said to be simple and user-friendly. And that too comes with easy installation, and here’s how you can implement it using the below steps:

  • First things first, we need to get this PDF embedder plugin on the website.
  • Simply hover your mouse pointer over the WordPress dashboard and tap the Plugins option.
  • You need to tap the Add New button on the next page to enter the plugin search page. Here, type the plugin and search for it. Once found, tap the install button and then the activate button. This will easily install the plugin on your website.
  • Next, move your mouse pointer to the Settings section under the dashboard area, then select the PDF embedder.
  • This will help you reach the customization page of the plugin and configure vital settings. Here, you can customize the PDF previews and decide on the visuals of the PDF file. Also, you can customize the mobile device setting for the PDF. Lastly, you must tap Save Changes after making all the changes.
  • The next step is to finally embed images in WordPress in PDF format.
  • For this, visit the WordPress dashboard and visit the Posts or Pages section. You tap the page or post where you wish to embed the PDF. We are going with the post editor for this guide.
  • So, under the desired post, you will find the Edit link. Simply tap, and it will open the post editor.
  • Tap the Add Media button at the top of the page, which will take you to the Media Library. Here, you have to tap the Upload Files option and then the Select Files button in the centre. This will help you insert the Media file from your device.
  • After uploading the file, tap to select it, and then press the Insert into Post option.
  • Once clicked, the post editor will show you the embed shortcode for the PDF file.
  • Lastly, tap the preview or publish the post button.
  • This will ultimately show the PDF file at the front of the post.

Method 2: Embed a PDF file in WordPress using Google Drive

If you are not choosing the first method to embed PDFs in WordPress, then here’s the second method.

This is also an easier way when you can embed the PDF file on your website using Google Drive.

Here’s how we are going to use the steps to embed a PDF file:

  • Firstly, you need to log in to your Google Drive. In case of no account, you must create it. 
  • The next step is to upload the media file to Google Drive. For this, simply press the "New+" button at the top left corner of the page. This will open a drop-down list, allowing you to add stuff to the drive.
  • You need to select the File Upload option, and this will direct you to the media library of your device. Select the file you wish to upload, and it will be seen in the form of a popup while uploading. Once uploaded, it will show you the message "Upload Completed".
  • In the next step, double-click the uploaded file and select "Open in New Window".
  • After the PDF is opened, tap the three dots, and now you have to tap the Share button. This will open a popup in which you need to select "Share with anyone".
  • After this, you need to copy the shareable link to the page by tapping the "Copy Link" button. This will enable anyone to view the document with the link.
  • In case you don’t want others to access the file, you can simply restrict access by staying in the same sharing popup. You just need to tap the Settings icon and disable all the checkboxes. And then finally tap the Done button.
  • Now, the next step is to copy the embed code and place it on the website. To do this, you need to tap the Three dots icon again and tap the "Embed item" option.
  • This will display a popup with the embed code of the file you are currently on. Copy the whole code and head back to the original document.
  • Now, visit the WordPress dashboard and tap the page or post where you wish to place the embed code. Once you reach the page, switch on its text section and simply place the copied code in it.
  • Once done, you can see the preview by switching on the Visual tab of the editor and finally tapping the Publish button.
  • Your PDF file has been uploaded to the website successfully.

Method 3: Embed a PDF File in WordPress using Gutenberg

And now the last method to embed PDF files in WordPress is through the Gutenberg editor. This one’s also easier for a non-developer to use. As we are going to use the blocks to add PDF files in WordPress.

However, when embedding PDF files, this method will not be able to view the file. You will need to download the file to view it on your device.

For this method, we are going with the newly designed Gutenberg Block named "File Block." So, let us initiate with the steps:

  • To start with, reach the WordPress dashboard and tap the Media option.
  • Then, on the Media page, tap the Add New button at the top of the page.
  • This will immediately take you to the page where you can select files to upload from your device. Simply tap the Select Files button and click to choose the files from your device. Not just a single file; you can even select Bulk files to be uploaded on the website.
  • After the file has been uploaded, hover over the dashboard area and select the page or post where you wish to embed the PDF.
  • We are selecting the post and tap the Edit link under it. On the editor page, tap the "+" icon that is the Block Inserter to add the file block.
  • Search for the File block by typing in the search bar. You can either double-tap to add the block or simply drag and drop it onto the editor.
  • tap
  • Once the block is inserted, tap the "Media Library" link to add the media file. Then this will take you to the media page, where you need to select the uploaded file. It will be seen in the first place; simply select Upload it and tap the Insert button.
  • This will finally embed the PDF file in the editor with its respective name and download link.
  • And finally, you can tap the Publish button to save the changes.


Wasn’t it helpful to know that embedding the PDF file can be beneficial for the website? I hope you have understood all the methods on how to Embed PDF files in the WordPress Website.

Back to blog