Home » Web Tutorials » WordPress » 4 Ways to Insert PDF Files in WordPress Site

4 Ways to Insert PDF Files in WordPress Site

People use PDF file format for sharing information on the web due to compact size and flexibility. Besides, the PDF files are broadly acceptable, easy to use and allow a variety of document formatting and protection options. These features allow you to share documents on your website while locking users from editing or copying its content. In this post, we will show you various methods of uploading and sharing PDF files in WordPress site.

Preparing Your PDF File

The first thing should be getting your file ready for uploading. You can use one of the many available online or offline tools to create your PDF file. In our case, we will use Microsoft Word to prepare the PDF file.

  • Open a new Microsoft Word document.
  • After typing and formatting your document, click the “File” menu and select “Save As”.
  • It is advisable to give the file a simple name and select PDF from the dropdown.
  • Click “More options…” link to open additional options.
Save Word Document as PDF
Save Word Document as PDF
  • Select the “Minimum size” option to optimize the file for web publishing. This compresses the file to offer faster loading to your viewers.
  • Then click the “Save” button.
PDF Options in Microsoft Word
PDF Options in Microsoft Word

If you do not use Microsoft Word app, you can also simply save your file as PDF from the print dialog box. You can use Word and print dialog options in both Windows and Mac systems.

Insert PDF Files in WordPress Page or Post

You can add a PDF file in WordPress posts or pages in various ways including:

  • Upload PDF to Media Library.
  • Using WordPress File block.
  • Linking custom text or image to the PDF.
  • Using a WordPress plugin.

Method 1: Upload PDF Files in Media Library

Now that you have a PDF file which could be a brochure, eBook or user manual to help your users. The next step is to upload the file on your WordPress site.

  • Login to your site’s admin panel. On the left sidebar menu, go to “Media” and choose “Add New Media File” option.
Add New Media File in WordPress
Add New Media File in WordPress
  • You can drag and drop the file or click “Select Files” to browse and find a file from your computer.
  • After uploading the file, you may click “Edit” to modify the file settings.
Edit Uploaded PDF in WordPress
Edit Uploaded PDF in WordPress
  • You can edit the title, caption and add a description for your file.
Edit Attributes of PDF in WordPress
Edit Attributes of PDF in WordPress
  • Click “Copy URL to Clipboard” button to get the file URL which you can share with anyone.

In this method, PDF file will not be embedded or inserted anywhere on your post or page content. However, you can only share the file URL which will open the file in a browser’s PDF viewer.

Method 2: Add PDF in WordPress with Gutenberg File Block

Gutenberg WordPress editor offers many blocks and you can use the File block to insert PDF on your site.

  • Add a new post or edit an existing post and choose the position you want to insert the PDF.
  • On the top left corner of the post editor, click the “+” (plus) sign and under “common”Media” blocks, select “File” option. Alternatively, you can simply type /file to find the block and insert.
Insert File Block in Gutenberg
Insert File Block in Gutenberg
  • Click the “Media Library” button to select the file.
Open Media Library
Open Media Library
  • Select a previously uploaded PDF file under “Media Library” tab or go to “Upload Files” tab and upload a new file. When the file is selected, click on the “Select” button at the bottom right corner. Note that, you can add title, caption and description to your file from here also.
Select PDF to Insert
Select PDF to Insert
  • By default, WordPress will insert the file and show its content in a built-in PDF viewer. You can use this option allowing users to read the content online and retain the users longer time on your site.
Show Embedded PDF in Reader View
Show Embedded PDF in Reader View
  • If you do not like to show the content, disable “Show inline embed” option from right sidebar block’s settings. This will insert the file’s title and link the PDF file. You can enable “Show download button” option to show a button next to text link.
Show PDF Embed as Text Link with Button
Show PDF Embed as Text Link with Button

Method 3: Link PDF File to Custom Text or Image

You can use text or an image in your post to link to the PDF file.

  • Copy the URL of the PDF file, for the custom text-linking, highlight the text and click the “Link” icon on the paragraph toolbar.
  • Paste the URL in the text field and click the arrow to apply.
Link PDF to Text
Link PDF to Text
  • For the image, select the image and click on the “Insert Link” icon in toolbar.
  • Paste the URL in the box and press enter key.
Link PDF to Image
Link PDF to Image

Clicking on the image or text link will open the linked PDF file in browser’s in-built PDF viewer.

Method 4: Add PDF with PDF Embedder Plugin

If you want to customize the display of PDF file on your site then you can go for plugin option. This will help you to set the appearance of the display as per your requirements.

Install and Configure PDF Embedder Plugin

PDF Embedder
PDF Embedder
  • To configure the plugin settings, go to “Settings” on the main menu and click “PDF Embedder”.
  • Modify the settings to your preferences. The free version allows you to specify the PDF size of the PDF viewer, position and the appearance of the toolbar.
  • Once you have configured the settings, click the “Save” button at the bottom of the page.
Embedder Settings
Embedder Settings

Embedding a PDF File in your Post or Page

  • Add a new page or post and type /pdf to find and insert the “PDF Embedder” block.
  • Click the text inside the newly added block to select your PDF file.
Select File
Select File
  • You can view the result by clicking the page/post preview.
Viewer Result
Viewer Result

Though the free plugin offers functionalities similar to default file embed in WordPress, premium version offers more features such as allowing you to add a download button at the bottom of the view, track the number of views and downloads, or opening in a new browser tab/ window among others.

Summary

PDFs are very helpful when you want to share information in a format that is not ideal for normal web pages. You can password protect your PDF document to prevent copying, modification or printing that carry sensitive information. Moreover, the PDF format is widely acceptable and easy to share on the web. Remember, search engines like Google will index the file as well as the content inside the file. So. avoid publishing private information in PDF files that you do not want to share with the public audience. Using the methods listed above, you can easily upload and insert a PDF file in your WordPress page or post with or without a plugin.

Leave a Comment

Your email address will not be published. Required fields are marked *