How to Embed PDF in WordPress9 min read
If you’ve written an ebook for the users of your website, chances are you may also need to know how to embed PDF in WordPress.
Of course, there are way more reasons to want to embed a pdf in your website, than the one mentioned above. You may want to promote your ebook by embedding a few sample pages, or there is a report that you want to share with your audience.
Whatever your reasons are, you’ll need to perform a few steps to embed the file directly for the users to see.
Bear with me, it is easy. Really easy.
Upload PDF to WordPress
To be able to embed a PDF file in your WordPress based website, you need to know how to upload it to the website.
Uploading a PDF file is a task that you already should know how to achieve. It goes the same way as when you want to upload media to a post in WordPress. Still, for the sake of comfort, let’s go through the process.
Once you enter the WordPress Admin Panel and see the familiar interface, you need to direct the mouse in the upper left corner, where the Media button is located.
Once you hover it, you can either click it directly or click Library or Add New.
Of course, Add New is the button that if chosen will bring you to closest to the file uploading interface, but the mentioned button is present on the Library page, which will load whether you click Library or Media.
I feel more comfortable by clicking directly on the first option that will bring me closer to the desired result. Thus, in the image below, you’ll see the page that will appear before you, if you decided to click on the Media or the Library button.
And by choosing that option, you’ll need to click the Add New button on the already loaded page.
On the image below the latest mentioned button is already clicked.
For this tutorial, I’ve chosen to upload a PDF file that is shared freely by Google. It is called ‘Our progress through 2016’. The report could be found here.
Now that the PDF is uploaded to the website, it is time to embed it.
Start your blog in less than 20 minutes!
Prices starting at $1.99$2.391.99€2.39€/year!
How to Embed PDF in WordPress
If the PDF that you want to embed in your WordPress website is publicly available (as mine) and you know the exact URL to find it, you can always use the <iframe> </iframe> HTML tag, to, in a way, embed it, so it is viewable and usable directly through your website.
Yet, doing so will definitely lead to possible issues, when there is a problem with the service, where the file was originally uploaded, or their website gets discontinued.
To prevent that from happening, or if you have access to the file only locally on your computer, you’ll need to upload the PDF to your WordPress, which we explained in the previous step.
When your file is successfully uploaded, what you need to do is to install a plugin.
The plugin that I trust most is the PDF Embedder.
It is simple, works nicely, and gives you a few very nice to have options. Changing the maximal Width and Height, for example. Which could prove extremely valuable, if your website has a wider or narrower design.
When you install and activate the plugin it already works. You can, if you want, enter the settings page of the PDF Embedder plugin, which you’ll find under Settings on the sidebar menu of your admin panel.
The beauty of the plugins is that it is the simplest way to embed a PDF in a WordPress website.
What you need to do now that the plugin is installed and activated, is to go to the post, where you want to embed the file or Add a new post, and add the pdf that you want, the same way, you would with a photo or video.
On the top of the WYSIWYG click Add media and you’ll see the familiar option window.
Choose the pdf file, you want to show to your users, and click Insert into post.
Once you get back to the WYSIWYG, you’ll see something like this:
Write the content that you want (if you need any) around the embedded PDF, and click publish.
And you’ll see an interactive PDF Viewer directly in your post.
Remember, that if you need, you can tune the width and height of the viewer, so it fits perfectly with your design. You can as well align the embedded pdf – left, right and to the center, so it looks even more nicely.
This is what you may see when you insert the PDF file in your blog post(or page).
And this is how to embed a PDF in WordPress.
Hope you’ve chosen the right WordPress Hosting.