In this article, I will show how you can embed PDF files in your WordPress blog or website.
Embedding PDFs in your blog posts could boost user engagement on your website. It stops the reader from continuously reading and encourages participation with it.
It could be anything you want your readers to engage with, for example, courses, infographics, menus, ebooks, or stuff like codes and script, etc.
It’s worth adding as long as it provides value, and users can relate it to post content. Moreover, you can also convert long articles into PDFs and ask your audience to download them to read again.
Now, let’s see how you can embed PDF files in your WordPress posts.
Embed PDF Files in WordPress
There are three methods that I have discussed below. You can choose anyone based on the level of quickness.
1. Link Method
Adding a link is the most straightforward way to add PDF files to your content. All you have to do is to upload the file through your local computer, copy the file URL, and add it to your content.
However, there are a few cons to the link method.
- This will redirect the reader to the new tab or the same – depending on where you want the link to open.
- Maybe they left reading your content – reducing the page’s dwell time.
- It’s just a link, and users might not click on it if you don’t ask them to do it.
Yes! It’s not embedding PDFs precisely, but you can use it when you want to provide PDF format of your articles for offline reading.
Otherwise, continue reading below.
2. Plugins – Problem Solved
There are tons of plugins available to make your life easy. You can use anyone to embed PDF files straight to your post and pages.
Why use a plugin?
- Users don’t have to leave the page; this helps in increasing session time.
- You can customize the height and width of the file.
- See the number of downloads through the dashboard.
- Overall, you have full control over the presentation of the PDF.
These are some recommended plugins to embed PDFs.
1. PDF Embedder
You may want to avoid this plugin if you want users to download your PDFs, as there is no option for that in the free version. The paid version is more helpful; readers can download it, scroll between pages, embedding is mobile-friendly, etc.
2. PDF Poster
PDF Poster is another great plugin that you can use to embed PDF files in WordPress. You can customize the presentation in the backend of the plugin.
To embed a PDF, just upload it to the plugin through your local computer, customize it, copy the code, and paste wherever you want to show it.
3. DearFlip – PDF Flipbook
DearFlip is another excellent choice to make Flipbook using PDFs and images. It uses WebGL technology to convert PDFs and images into realistic digital books that will not only help beautify your content but boost user retention time as well.
All you have to do is to create a Flipbook post, upload your PDF(s), save and copy the shortcode. Now, you can paste the shortcode through Shortcodes Ultimate. Free features contain features like table of contents for PDF, downloading files, partial loading, deep linking, etc. while paid version provides more freedom in displaying pop-ups, Google Analytics tracking, text translation, and much more.
EmbedPress is all in one solution for embedding PDFs, videos, images, docs, posts, audios, forms, sheets, maps, PPT, etc. with a single click.
The plugin is simple to use, and intuitively takes almost no setup; no coding knowledge is required. Also, more than 75 sites are supported.
5. PDF viewer for Elementor
In case you use Elementor for editing your blog posts, then you may use PDF viewer for the Elementor WordPress plugin. The plugin is specially created to embed PDF(s) using Elementor.
You can also forbid downloads or opening in an external tab, change the border color, and assign height and width as you want.
For the tutorial, I’ll use PDF Poster WordPress Plugin.
1. Go to Plugins > Add New > PDF Poster > Install and Activate it.
2. Click PDF Poster in the left sidebar and select Add New Pdf.
3. Add PDF Title, and upload it through local computer.
4. Customize height, width, select other options (optional) and click Save in the bottom right.
5. In the left sidebar, select PDF Poster, search title and copy Shortcode.
6. Now, go to the page which you want to edit and paste the Shortcode using any Shortcode Plugins.
3. Google Drive To Embed PDF
You can also use Google Drive to embed PDFs, and you don’t need to use plugins for this.
But how do you do this?
“Upload PDF file to Google Drive, get the iFrame code, embed it your site.”
1. Head over to Google Drive and sign in to your account.
2. Click New in the left sidebar and choose File upload, now select the PDF from your local computer.
3. After uploading, preview the PDF and click on the three dots at the top right corner and select Open in the new window.
4. In the new window, click Three dots at the top right corner and select Share.
5. Now, you can copy the sharable link (best for the Link Method as discussed). You can also select “Disable options to download, print, and copy for commenters and viewers” through the Advanced option.
6. To get the iFrame code, select three dots again, and click Embed Item.
7. Finally, go to your WordPress site, select the post or page in which you want to edit and paste the iFrame code.
Classic Editor: Switch to Text tab and paste the code.
Gutenberg: Type Custom HTML, select it, and paste the code.
8. Finally, preview the post to check if the PDF file has been successfully embedded or not.
So, these are simple methods to embed PDF files in WordPress. I would probably use a plugin if I have to deal with tons of PDFs or would choose Google Drive to add a single PDF via iFrame code simply.
So, which method are you going to use?