How to Add a PDF Viewer in WordPress

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.

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, restaurant owners often publish their 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. For example, someone who is planning to visit your restaurant may prefer to read the PDF menu on your website rather than downloading a copy to their computer.

Instead, you can add a PDF viewer in WordPress and then show the PDFs directly on your website. This allows visitors to see the document without downloading it to their computer, which is often quicker and easier. This is particularly true for visitors who are using smartphones or tablets.

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 plugin instead.

To get started, simply open the page or post where you want to add the PDF viewer in the content editor 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.

The WordPress built-in File block

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.

Uploading a PDF file to WordPress

WordPress will automatically choose a size for the embedded PDF.

Note that the default view may not show the full document, but the ‘File’ block includes a toolbar that allows visitors to zoom in and out of the document. They can also scroll through the PDF to see more content.

How to add a PDF viewer in WordPress

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.

Changing the height of an embedded PDF

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.

How to allow visitors to download a PDF in WordPress

The ‘Download’ button beneath the PDF is useful for visitors who are unfamiliar with the different PDF toolbar icons. By showing a ‘Download’ button, visitors will immediately understand that this file is not tied to your site alone.

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.

Hiding the Download button in a PDF viewer

When you’re 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.

A PDF viewer, created with the built-in WordPress File block

Method 2. Add a PDF Viewer in WordPress Using a Plugin (More Customizable)

The built-in WordPress File block should be a good fit for websites that simply want to embed a few PDFs. However, if you want more control over the viewer then it often makes sense to use a plugin instead.

PDF.js Viewer is one of the best PDF plugins for WordPress. It allows you to change the height and width of the PDF viewer, and remove buttons from the PDF toolbar.

It also comes with a fullscreen mode, which is perfect for showing longer documents such as ebooks and user manuals.

A PDF viewed in fullscreen mode

First, you’ll need to install and activate PDF.js Viewer. If you need help, then please see our guide on how to install a WordPress plugin.

Upon activation, go to Settings » PDFjs Viewer to configure the plugin’s settings.

The PDF.js Viewer plugin settings

Most of the time, you can override these default settings when embedding each PDF. For example, you can change an individual PDF’s settings for 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.

By default, the plugin includes Download, Print, and Search buttons in the PDF toolbar. If you want to remove any of these buttons, then simply uncheck the box next to it.

Hiding buttons from the PDF viewer toolbar

You can also change the default embed height and width, and the ‘Viewer Scale.’

Out-of-the-box, PDF.js Viewer shows the PDF without any sidebar so visitors can see the full document when they arrive on the page. They can open the sidebar at any point by clicking on the ‘Toggle Sidebar’ button, as you can see in the following image.

Adding a sidebar to the PDF viewer in WordPress

If you plan to include longer documents or multi-page PDFs then it may be helpful to show the sidebar by default.

To do this, simply open the ‘Page Mode’ dropdown menu and select either Thumbs, Bookmarks, or Attachments.

Changing the mode in a PDF viewer

PDF.js Viewer allows visitors to open the PDF in fullscreen mode. By default, visitors can open this mode by clicking on a ‘View Fullscreen’ link above the embedded PDF.

To replace the text with your own custom messaging simply type into the ‘Fullscreen Link Text’ field.

Customizing the PDF's fullscreen mode

You can also choose whether the link opens in a new tab using the ‘Fullscreen Links in New Tabs’ box.

Launching a new tab will help to keep visitors on your website, but it can be annoying for mobile and tablet users.

Customizing the PDF viewer's fullscreen mode

Fullscreen mode makes it easier to read long documents so we recommend leaving this feature enabled. However, if you don’t want to use it then you can uncheck the box next to ‘Show Fullscreen Link.’

When you’re happy with how the plugin is set up, click on ‘Save Changes.’

You’re 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 ‘Embed PDF.js Viewer’ and select the right block when it appears.

Adding a PDF to your WordPress website using a plugin

After that, click on ‘Choose PDF’ to open the WordPress media library.

You can now either choose a PDF from the library or upload a file from your computer.

Embedding a PDF on your WordPress website using a block

The plugin will use 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, and scale. You can also remove or customize the ‘View Fullscreen’ link.

Customizing the PDF embed block using a WordPress plugin

Finally, you can choose to remove or show the ‘Download’ and ‘Print’ buttons.

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.

A PDF, embedded directly on a WordPress blog or website

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 will then need to buy a membership 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 and allows you to turn any page or post into exclusive subscriber-only content, including embedded PDFs.

Make money by selling PDFs online

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 PDFs 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 and sell online courses with WordPress or check out our list of the best email marketing services for small businesses.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Add a PDF Viewer in WordPress first appeared on WPBeginner.

9 Best PDF Plugins for WordPress (Viewer, Embed, & Downloads)

Are you looking for the best PDF plugins for WordPress but don’t know where to get started?

By default, WordPress cannot generate or embed PDF files in posts or pages. This is where a PDF plugin comes in handy. You can create, edit, and embed documents with ease using a plugin.

In this article, we will show you the best PDF plugins for WordPress that you can use on your website.

Best WordPress PDF Plugins

Why Do You Need a PDF Plugin for WordPress?

WordPress does not support PDF embedding, or downloading blog posts as PDF by default.

If you have a PDF document and try to embed it in WordPress, then it will show your file as a downloadable link. This way if someone clicks on the link, they will leave your website.

A WordPress PDF plugin allows you to display your documents on your WordPress site. Your website visitors can then view them in a PDF viewer while staying on your site.

A PDF plugin also helps your users to download any blog post or page as a PDF document. It ensures that the page is neatly formatted, so people can save it or print it with ease.

With that said, let’s look at the best PDF plugins for WordPress.

1. EmbedPress

EmbedPress WordPress Plugin

EmbedPressis a complete plugin that allows you to add and display PDF files in your WordPress posts and pages. It’s easy to use and you can upload your PDF documents through the media library and place them anywhere on your site.

EmbedPress also lets you upload other types of media to your WordPress website. You can use it to add videos from YouTube, Vimeo, or Twitch.

Besides that, EmbedPress lets you upload Google Maps, docs, forms, sheets, Facebook posts, audio files, and much more.

2. E2Pdf

e2pdf-best-wordpress-pdf-plugin

E2Pdf is a clean and simple WordPress PDF plugin that lets you create, edit, and display PDF documents to your visitors.

You can show static or dynamic PDF files to your audience. It lets you create and edit PDF documents and forms without having to leave your WordPress site.

The plugin also lets you auto-generate PDF forms based on your WordPress posts, pages, or web forms.

3. WPForms

The WPForms website

WPForms is the most beginner-friendly WordPress contact form plugin used by over 3 million website owners. With WPForms, you can allow users to submit PDF files to your website through a file upload form.

This way you don’t have to give access to your website’s backend to others in order to collect PDF files.

If you want to share your contact form submissions with someone else, then WPForms lets you download them as a PDF document as well.

You can check out our guide on how to create a file upload form in WordPress.

4. PDF & Print by BestWebSoft

PDF and Print by bestwebsoft

PDF & Print by BestWebSoft, as the name suggests, this plugin adds a PDF download and print button to your WordPress posts, pages, and custom post types.

You can add your website title, featured image, custom styles, and fonts. The plugin can also execute shortcodes when generating PDFs or creating a printer friendly version.

5. WooCommerce PDF Invoices & Packing Slips

WooCommerce PDF Invoices

WooCommerce PDF Invoices and Packing Slips is a PDF plugin for WordPress that allows you to generate, download, and send PDF invoices with order confirmation emails on your WooCommerce store.

You get basic templates with the ability to customize them according to your business needs. The plugin also helps you handle your packing slips and invoices from your WooCommerce admin area.

You can follow our step by step guide on how to start an online store to get started.

6. PDF Poster

PDF Poster plugin for WordPress

PDF Poster is another user-friendly WordPress plugin to embed PDF files on your website.

Using a shortcode, you can add PDF documents in your WordPress posts, pages, widget area, and theme files. Plus, you can add a download button, so people easily get hold of your PDF file.

And when you embed a file, it removes the black viewer frame, so visitors get a clean experience.

7. PDF.js Viewer

pdf js viewer

PDF.js Viewer lets you show PDF files inside your WordPress posts and pages through a simple shortcode or Gutenberg block.

It uses Mozilla’s PDF.js to display PDF documents in a browser. Users get all the functionality such as scrolling through the document, search, print and download PDF files.

Besides that, the plugin lets you password protect your PDF documents, setup advanced zoom settings, show a loading bar, and display partially loaded PDF documents.

8. PDF Embedder

PDF Embedder WordPress Plugin

PDF Embedder is a WordPress plugin that allows you to embed PDF files in WordPress posts and pages.

The plugin uses JavaScript to embed files with a fully functional toolbar allowing users to zoom, navigate, and even download the PDF file. This makes the plugin different from others on our list.

Javascript allows you to have more flexibility on how your PDF documents will appear. The plugin also automatically adjusts the size of your PDF files. You can also enter the width manually and the plugin will automatically calculate the height.

9. MonsterInsights

The MonsterInsights website

MonsterInsights is the best WordPress analytics plugin used by over 2 million website owners. It helps you see how people find and use your website.

It comes with a built-in download tracking feature that helps you monitor how many PDF downloads you get from your WordPress site.

Aside from download tracking, it also lets you see how many people are clicking on specific PDF files, links, buttons, or any other element on your site. You also get to see other important items such as real-time analytics, top referral sources, page level analytics, custom dimensions, and more.

The PDF tracking feature is also available in MonsterInsights Lite, which is the free version of the plugin.

Bonus WordPress PDF Plugins

These plugins do not offer a way to generate or embed PDF files. However, if you serve PDF files on your WordPress site, then you may find them helpful.

10. SearchWP

SearchWP

SearchWP is a paid WordPress plugin. It allows you to add a better search experience to your WordPress site.

One of the features of this plugin is the ability to search the text inside PDF files. However, it cannot search PDF files that are encrypted, stored outside the media library, or have images as text. See our guide on how to improve WordPress search with SearchWP

11. OptinMonster

The OptinMonster homepage

OptinMonster is the best lead generation and conversion optimization plugin for WordPress.

It is a powerful tool that helps you grow your email list. You can convert abandoning visitors into subscribers by using OptinMonster. You can ask users to signup for your email list in exchange for free download PDF resources.

You can also use it to offer content upgrades. See this list of content upgrade ideas to 10X your subscribers.

Which is The Best PDF Plugin for WordPress?

The best WordPress PDF plugin really depends on your needs. If you are looking for a plugin to embed PDF documents and other media files with ease, then we recommend EmbedPress.

If you want to allow users to submit PDF files to your website, then WPForms is the best plugin.

As for creating and editing PDF documents right inside WordPress, then we recommend E2Pdf.

If you want visitors to subscribe in exchange for PDF downloads, then use OptinMonster, and lastly for tracking all PDF analytics, we recommend MonsterInsights.

We hope this article helped you find the best PDF plugins for WordPress. You may also want to see our list of the best WordPress page builder plugins, and our comparison of the best email marketing services.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post 9 Best PDF Plugins for WordPress (Viewer, Embed, & Downloads) appeared first on WPBeginner.