How to Embed PDF Files in WordPress website

Websites related to tours and travels, dealing with eBooks, course materials and restaurant-based sites need to embed a pdf file to display their content.

By default, WordPress does not allow you to embed files directly. You can upload a pdf file in a page/post through the Add File block, but this built-in method just provides a link of the uploaded file. Your visitors have to either download the file or view it in a new browser tab. This affects the site’s pageviews and user engagement.

But what if you want to embed the pdf files in your website just like the images, videos and audios? How can your user’s directly view the pdf files without leaving your website?

In this article, we have explained two methods through which you can embed pdf files in your WordPress website.

Method 1: Using WordPress Plugins to embed PDF files

With the help of WordPress Plugins, you can easily embed PDF files to your WordPress website. This is the quickest and most efficient method for WordPress beginners. There are multiple plugins available in WordPress to embed the PDF files.

Plugin 1. PDF Embedder

PDF Embedder is a free plugin available in WordPress Plugin Directory. It offers a more flexible, customizable and easier method to upload and embed PDF to the website. PDF Embedder uses JavaScript to embed files rather than relying on the third-party services or iframe code.

First, you need to install and activate the plugin in your WordPress website. Go to Plugins >> Add New and search for “PDF Embedder”. Click on Install now, then Activate the plugin.

Upon activation, Go to Settings >> PDF Embedder to modify the plugin settings. You can customize the plugin under the Main Settings tab.

PDF Embedder displays the pdf at their original size. If you want to change the PDF size, you can specify Width and Height in the text fields. Also, you can decide the position of the Toolbar and its visibility. Using the Toolbar your users can zoom in/out of the pdf and toggle between the pages. Select whether you want to permanently display the Toolbar or it just appears only when the user hovers over the document. Don’t forget to click on Save Changes at the bottom of the page.

Now, to embed a PDF file in your WordPress page or post, go to your Block Editor. Click on the + button and select the custom block PDF Embedder.

Click on the block to open the Media Library and upload the file. Select the PDF file from the Media Library. You can preview the pdf in the frontend of your website and then Publish your Page/Post.

The PDF Embedder Premium version has extra features such as:

  1. Continuous scrolling between pages
  2. ‘Download PDF’ button allows users to obtain the PDF to read in their own choice of viewer
  3. Full screen button
  4. Fully functioning hyperlinks
  5. Jump straight to page by typing page number
  6. Track number of views and downloads


Plugin 2. PDF Viewer for WordPress

Plugin 3. Google Drive Embedder 

Plugin 4. Algori PDF Viewer

Method 2: Using Google Drive account and iframe code to embed that file.

You can upload the PDF file to your Google Drive and then embed the file to your website using iframe code. This is a secure method to embed pdf without installing a plugin.

Upload the PDF file to an existing Google Drive or create a new account. You can sign up for a free Gmail account to get 15GB of Drive space. After you Log in to the Google Drive account, Select New >> File upload and browse the file you want to upload from your device.

Preview the uploaded PDF file in your google Drive.Then in the top right corner of the page you will see three vertical dots i.e More actions, Click on it and select Open in the new window.

In the new window again select the three vertical dots >> Share and click on Change to anyone with the link in the ‘Get Link’ pop up. Now, anyone with the file link can view the pdf. Click on Done once you get the following confirmation.

Now to embed the pdf, again click on the three vertical dots and select Embed Item

Copy the iframe code to embed the PDF file in your website. 

Now, Edit the page/post where you want to embed the PDF and paste the iframe code using Custom HTML Block.

Preview to check out how the PDF will appear on your website and click on Publish.

We hope this article helps you to embed pdf files to your WordPress website. In case of queries, please leave a comment and we will get back to you as soon as possible.

Also, if you want us to cover a specific topic you can leave a comment for that as well.

Recent Articles

Standard Display Drivers for Windows 10 FAQ

Drivers act like a translator between the device they control, and the other programs in your system. Google Translate is not support in your...

Pictures Tutorial How to Reset USB Ports on Windows 10 8 7?

If you did not find it, close the window and update a different driver. Authentic and functional files are kept in a compressed cache...

How to properly update device drivers on Windows 10

Windows Update, Device Manager, and Auto-Update Assistants from device manufacturers. In most cases, these methods will keep your device drivers installed and updated properly....

Injustice: Gods Among Us APK OBB Download Install 1Click Obb Installer for Injustice: Gods Among Us

The traitor will need to be found before they can kill everyone else. You can download this game for your phone or tablet from...

Ohjelmien poistaminen Windowsista

Jos Lutriksesta ei ohjeita löydy tai jokin ohjelma ei suostu käynnistymään, kannattaa ensimmäisenä vilkaista Winen tietokannasta, onko sitä lainkaan mahdollista saada toimimaan. Bugiraportteja,...

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here