Do you want to add a PDF viewer in WordPress?
By embedding PDF files in your website, you can make sure those files always have the same layout, no matter what device the visitor is using. These files can also keep people on your website for longer and add value for your uses.
In this article, we will show you how to add a PDF viewer in WordPress.
Why Do You Need a PDF Viewer in WordPress?
Many websites use PDF files to share information about their services and products. For example, if you have a restaurant website, then you might publish your menu as an online PDF.
You can always upload a PDF to your website and then add a download link in WordPress. However, this isn’t the best user experience for people who want to quickly look at a PDF document or don’t want to download the full file.
Instead, you can add a PDF viewer in WordPress and then show PDFs directly on your website. This allows visitors to see the document without downloading it, which is particularly useful for smartphone and tablet users.
It also keeps visitors on your website, which may increase your pageviews and reduce your bounce rate.
With that being said, let’s see how you can easily add a PDF viewer to WordPress. Simply use the quick links to jump straight to the method you want to use:
Method 1: Add a PDF Viewer Using the Block Editor (Easy)
The easiest way to show PDFs on your WordPress website is by using the built-in File block.
This method doesn’t require a special plugin, but you can only customize the viewer in a few ways. If you want more advanced customizations and features, then we recommend using a WordPress plugin instead.
To get started, simply open the page or post where you want to add the PDF viewer and then click on the ‘+’ button to add a new block.
After that, start typing in ‘File’ and select the right block when it appears.
If you’ve already uploaded your PDF to the WordPress media library, then click on the ‘Media Library’ button. You can then select the PDF that you want to embed.
If you haven’t already uploaded the PDF, then click on ‘Upload’ and then choose a file from your computer.
WordPress will automatically choose a size for the embedded PDF.
Depending on the size of the file, the default view may not show the full document. However, visitors can zoom in and out and scroll through the PDF using the toolbar settings.
If you prefer, then you can change the PDF viewer’s height to show more or less of the embedded document.
To do this, simply use the ‘Height in pixels’ slider in the right-hand menu.
Sometimes, visitors may want to download a PDF, so they always have it close by. For example, customers may want to download the user manual for your most popular product or the programming schedule for an upcoming event or conference.
By default, WordPress shows a ‘Download’ icon in the toolbar and a button below the PDF.
The ‘Download’ button may be helpful for visitors who are unfamiliar with the different icons in the PDF toolbar.
With that in mind, you may want to leave the ‘Download’ button enabled. However, if you don’t want to include this duplicate content, then you can click to disable the ‘Show Download Button’ toggle.
When you are happy with how the PDF is set up, either click on ‘Update’ or ‘Publish’ to make your changes live.
Now if you visit your WordPress website, you’ll see the PDF viewer in action.
Method 2: Add a PDF Viewer in WordPress Using a Plugin (More Customizable)
The built-in WordPress File block is a good option if you simply want to embed a few PDFs. However, if you want more control over the viewer, then we recommend using a plugin instead.
WP PDF Embedder is one of the best PDF plugins for WordPress. It automatically adjusts the size of your PDF files, or you can specify a width and the plugin will automatically calculate the height for you.
It also comes with a PDF viewer that includes Next / Previous buttons and zoom buttons for easy navigation and viewing. This is perfect for showing longer documents, such as reference materials for online courses.
Note: There is a free version of the plugin that lets you easily embed mobile-friendly PDFs in WordPress. However, we’ll be using the premium version for this tutorial because it comes with more advanced features.
Upon activation, go to Settings » PDF Embedder to configure the plugin’s settings.
From the ‘Main Settings’ tab, you can set the width and height for your PDFs. Most of the time, you can override these default settings when embedding each PDF. For example, you can change an individual PDF’s size or scale.
However, we still recommend changing the default settings to better match your own requirements, as this can save you a lot of time and effort.
Out-of-the-box, PDF Embedder shows the toolbar at the top when visitors hover their mouse over the document.
However, if you plan to include longer documents or multi-page PDFs, then it may be helpful to show the toolbar by default. To do this, simply select the ‘Toolbar always visible’ option.
You can also set your toolbar location to the top, bottom, both locations, or disable it completely by clicking on the dropdown menu.
When you scroll down the page, you can configure more settings for your PDF viewer. For example, you can display scrollbars, enable continuous page scrolling, add a PDF search button in the toolbar, and more.
In addition, you can allow visitors to download documents by showing a PDF Download button in the toolbar. You can also enable views and downloads tracking so that you can measure how popular your PDFs are with visitors.
When you are happy with how the plugin is set up, click on ‘Save Changes.’
You are now ready to add a PDF viewer in WordPress. Simply open the page or post where you want to show the PDF and then click on the ‘+’ button.
You can now start typing in ‘PDF Embedder’ and select the right block when it appears.
Next, click on the link to open the WordPress media library and select a PDF. Then, choose a PDF from the library or upload a file from your computer.
The plugin will display the PDF using your default settings, but you can fine-tune how this PDF looks and acts using the settings in the right-hand menu.
Here, you can change the PDF’s height, width, toolbar location, toolbar hover, external links, and search button.
When you’re happy with how the PDF is set up, simply click on ‘Update’ or ‘Publish.’ You can now visit your WordPress blog or website to see the embedded PDF viewer.
Visitors can easily view your PDF documents and use the toolbar to enter fullscreen mode, zoom in, navigate pages, download the PDF, and more.
Bonus: How To Make Money From Your Embedded PDFs
If you have quality, useful PDFs, then you can use them to make money online with WordPress.
After embedding a PDF document in your website, you can turn that page or post into exclusive members-only content. Visitors can then buy a membership in order to access that page or post and see the embedded PDF.
The easiest way to turn WordPress into a membership site is by using MemberPress. It is the best WordPress membership plugin that allows you to turn any page or post into exclusive subscriber-only content, including embedded PDFs.
We have a complete guide on making a WordPress membership website with step-by-step instructions to help you get started.
We also suggest using Easy Digital Downloads to manage and sell PDF documents on your website. You can sell all kinds of digital goods easily and embed PDFs in the product pages as previews, too.
We hope this article helped you add a PDF Viewer in WordPress. You may also want to take a look at our guide on how to create an email newsletter or check out our list of the best email marketing services for small businesses.