Do you want to embed a PDF file in WordPress?
You might have easily embedded an image, audio, or video in WordPress. But the question arises when we have to insert a PDF file. PDF files are used whenever we need to display the content with the same layout unresponsive to the device they are viewed on.
By chance, if you embed a PDF file link in WordPress, your visitors need to either download them or view them in a web browser leaving the site. This means visitors cannot directly access the data. This might lower the ranking of the site.
Here, in this article, we have presented two handy ways to embed a PDF file in WordPress. By doing so visitors are allowed to read, download as well as print the PDF. So, without further delay, let’s learn how to embed PDF in WordPress
Embed PDF in WordPress using plugin
Using plugins to embed PDF into the page or post is the fastest and easiest method to work with. It provides accurate results allowing the visitor to view the file properly. We advise you to follow this method for excellent performance.
WordPress provides both free and premium plugins to meet our requirements. Some of the plugins with their significance are:
- PDF poster: This user-friendly free plugin embeds PDF files in posts, pages, themes, and templates.
- Google Drive Embedder: The free plugin enables you to access your google drive document within your WordPress dashboard.
- PDF Viewer for WordPress: it is a premium plugin that is full of selective features such as Google tracking, advanced control of display, etc.
You can choose any of the above plugins as per your need, but we recommend you to use PDF Embedder as it is reliable, free, and directly embed files into a page, and post. Stating with the step by step instructions to embed PDF using plugins in WordPress:
1. Install PDF Embedder
First of all, you need to install PDF Embedder on the WordPress site.
- Login to your WordPress admin area.
- Click Plugins >> Add new, after the opening of the WordPress dashboard.
- Type PDF Embedder in the plugin search function, once it is shown on the screen click on the “Install now” button and activate the plugin.
2. Setting up of the plugin
You need to modify the setting of the plugin for better performance although it starts to function after activation. In order to view the setting page of the plugin. Click Setting >>PDF Embedder of WordPress dashboard.
This free plugin will allow you to make the following changes:
- Height and width: The height and weight of the PDF file are modified here. This is useful when you want to display PDFs of specific sizes.
- Toolbar location: This allows you to choose if you want to present the toolbar either at the top or at the bottom. Also, it helps to zoom out the PDF.
- Toolbar Hover: It allows you to select if you want to display the toolbar permanently or to just appear whenever the user hovers over the PDF.
Make sure you click on the Save Changes button after you finish your requirements of setting.
3. Embed PDF
Finally, we can upload and embed the PDF through a PDF embedder. This plugin works smoothly both in the Classic Editor and Gutenberg Editor and provides you best results. The process is simple like the way we insert audio and videos on the page in the case of Classic Editor.
Here, are the steps you need to follow to embed a PDF file:
- Select the page either by creating a new page or opening the existing one where you wish to embed PDF.
- Click on the Add Media button.
- After the opening of the media library. Click on Upload files >> Select Files. Here you need to upload a PDF file from the desktop.
- Click on the “Insert into post” after the PDF has been uploaded to the media library.
- You will see a short form of the PDF within the post editor.
Hence, in this way you can easily embed PDF on the page with the help of the plugin.
Embed PDF in WordPress without using the plugin
This is the method exactly suitable for the ones who prefer to embed PDFs without the use of plugins. We can embed PDFs without installing plugins via Google Drive. Yes! It is the fastest and easiest way to embed PDF.
Even beginners can easily work through Google Drive without having a problem. The only problem we face is it uses iframes while embedding. Moving further with the detailed step-by-step instruction to embed PDF through Google Drive.
- Login to your Google Drive. Simply log in for the free Gmail account.
- Click on New >> Upload file. Select the PDF file you desire to upload to the page.
- After the file has been uploaded, double click on the file to preview. Click on the three vertical dot buttons on the right top corner and select “Open in new window”.
- Share the file by clicking on the three vertical buttons at the right top corner.
- A popup will appear on the screen entitled “Share with people and groups” and “Get link“.
- Click on Change to anyone with the link in the “Get link”. Due to this step, anyone can view the file else the file will remain private. Your screen should match with the screenshot below:
Click on the Done button after you have finished.
- At present, you need an embed code for the page. For this avenue three vertical dot buttons and click on “Embed item“.
- Copy the HTML displayed on the screen.
- Return back to the WordPress dashboard, open the page or post you wish to embed the file. Switch into Text and paste the HTML link.
Lastly, you need to publish the page in order to check the appearance of the PDF.
Without a doubt, all the ways we mentioned above are easy and simple. You can use the one that fulfills your requirement. Surely, it would help you to embed a PDF file easily without causing trouble in WordPress.
You can check out our other article “How to Embed a Twitter Feed in your WordPress Website?” if you have problems regarding embedding Twitter feed in the WordPress site.