Wondering how to upload PDF files to your WordPress posts and pages? Learn how to upload and embed PDF files to WordPress in this series of complete beginner’s guide to WordPress.
Uploading and embedding media such as images and videos are really easy in WordPress. PDF files, however, takes some effort to upload and insert into WordPress posts and pages.
PDFs are one of the most popular file formats and their size and flexibility make them easier to share around on the web. While it is easy to upload and share the links for PDF files, embedding or displaying them on WordPress websites isn’t quite straightforward.
Let’s look into few ways that you can easily upload PDF files and insert or embed them on WordPress websites.
Table of Contents
- Default Way to Upload PDF Files to WordPress
- Upload PDF Files using Media Library
- Embed PDF Files using Gutenberg Editor
- WordPress Plugins to Embed PDF Files
- How do you embed PDF files in WordPress?
Default Way to Upload PDF Files to WordPress
This is the easiest way to upload PDF files to your WordPress website.
Similar to how you upload photos, you can select and upload PDF files using the default media uploader in WordPress.
Step 1: Go to the Add New Post or Page screen of WordPress editor. You can also choose to edit your previous posts or pages.
Step 2: When you are in WordPress editor, click on the Add Media button.
Step 3: You will see WordPress upload window. Click on Select Files button or drag and drop your PDF file in this window.
WordPress will start uploading the PDF file and you should see an icon preview of your PDF file once it is fully uploaded.
Don’t worry about filling in the caption and Description for the PDF file.
Step 4: Click on Insert into Post button and WordPress will insert a link to your uploaded PDF file in your Post or Page that you’re editing.
Go ahead and preview the post or page. Your website visitors should be able to click on the link to view and download your PDF file on their browser.
(Additionally, you can also upload the first page of the PDF as a thumbnail and link it to your original PDF file link.)
Upload PDF Files using Media Library
You can also use the Media Library in WordPress to upload a PDF file and get a direct link to the PDF file.
Step 1: From your WordPress dashboard, click on the Media > Add New.
Step 2: You can now click on Select Files button to select the PDF that you want to upload or drag-and-drop the PDF to the outlined upload area.
Step 4: Once uploaded, you can grab the URL of your PDF file. Copy the URL of the PDF file from the first URL box in the upload window.
This might be useful if you don’t want to insert the PDF file in your post or page. Or if you wanted to upload and share the PDF file link using your website URL address.
Either way, once you have the URL to your uploaded PDF file, you can link from anywhere you like on your WordPress website – Post, Pages or even Widgets.
Embed PDF Files using Gutenberg Editor
For those using the WordPress Gutenberg Editor, please note that you won’t be able to select PDF files when you click on “upload” from Image block.
Instead, you will need to click on Media Library before you can select and upload PDF file. See the detailed instruction.
Step 1: Insert an Image block using Add Block or clicking on Add Image from your editor.
Step 2: Click on Media Library and click Select Files to choose and upload PDF file.
Step 3: Click on Insert into Post button to insert a link to your PDF file inside the block.
Your website users will then be able to open the uploaded PDF file or save the PDF file.
WordPress Plugins to Embed PDF Files
Okay, that’s the easiest way to upload PDF files on your WordPress website but what if you need to embed it within your post or page?
Embedding PDF files within WordPress post or page will help your users to view the PDF within your website, unlike a PDF link that will take away your visitors to a separate tab.
1. PDF Embedder Pugin for WordPress
PDF Embedder plugin is one of the most popular plugins that can help you embed PDF files directly inside your WordPress posts or pages.
The plugin also comes with its own settings page where you can define general settings such as width and height as per your requirements.
Step 1: From your WordPress dashboard go to Plugins > Add New and Search for the PDF Embedder plugin. Install and Activate the plugin.
Step 2: Go to Settings > PDF Embedder and make the adjustments as required.
Step 3: After you have installed the plugin, try uploading and inserting the PDF file using the media uploader.
As you have the plugin installed, when you click on insert into post, the plugin now inserts a pdf-embedder shortcode with URL property attached to it instead of a simple hyperlink.
Step 4: Go ahead and preview the post and you should see the embedded PDF with a toolbar at the bottom.
The plugin also has a paid version with several other premium features.
2. Embed Any Document for PDF Files Embed
Embed Any Document WordPress plugin allows you to upload and embed several file formats including PDF files. The plugin uses Google Docs Viewer and Microsoft Office Online to display the files embedded on your website.
In addition to PDF files, you can easily embed and display PDF, Microsoft Word, Excel and PowerPoint files. Let’s see how you can upload PDF Files.
Step 1: From your WordPress dashboard go to Plugins > Add New and Search for the Embed Any Document. Install and Activate the plugin.
Step 2: Go to Settings >> Embed Any Document to configure settings as per your requirements. You can leave as it is for now and come back when you need to change anything.
Step 3: Back in your WordPress Editor when you add new post or page, you will now see an “Add Document” button added by the plugin (Just beside the Add Media button).
Click on the Add Document button and you will get an option to either upload your PDF file or Add from another URL. Choose upload document and it will use the default media uploader to let you upload and select the file.
Step 4: Change the options as necessary and click on the insert button. The plugin will insert the required sortcode for the PDF file in your post editor.
You can now preview your post and see the file embedded in your post or page.
3. Google Doc Embedder Plugin for PDF Files
You will need to install the plugin Google Doc Embedder available to download and install for free from the official WordPress repository.
The plugin allows embedding PDF files for inline viewing (and optional downloading) within your WordPress posts and pages.
Step 1: Go to Plugins > Add New and Search for Google Doc Embedder. Install and Activate the Google Doc Embedder plugin.
Step 2: The plugin has a complete settings page where you can define settings as per your need. Visit Settings » GDE Settings page to configure the Google Doc Embedder plugin settings.
You might want to change the height and width of the embedder to match the width of your page/post area on your website.
Step 3: Now back to the post and page where you want to embed the PDF file, use the Media Uploader button to upload the PDF file.
Step 4: Once uploaded, copy the PDF file URL and exit the upload window. Don’t insert the PDF at this point.
Step 5: In your WordPress editor, you should see an additional icon for the Google Doc Embedder. Click on the icon and it will open a window where you will need to paste the PDF file URL you copied earlier.
Step 6: Paste the PDF file URL in the URL or file name box, which is the only required field and click the insert button towards the left end of the window.
The embedder will insert a shortcode to your post or page in the editor area.
You can now click on the preview to see if the PDF has been embedded properly.
Please note that the plugin is available in different languages and supports several other file formats in addition to PDF files.
3. Other PDF Embedder WordPress Plugins
There are several other WordPress plugins in the repository but the above-listed ones are the most popular available to download from the WordPress repository for free.
If you’re interested in checking out some of the other plugins in the repository, feel free to explore these plugins.
- Radeet pdf Embed – (Enables embedding similar to oEmbed for PDF Files).
- WordPress PDF Light Viewer Plugin
- Embed PDF Viewer
Please check if the plugins are compatible with your WordPress version and avoid using plugins that haven’t been updated for a long time.
How do you embed PDF files in WordPress?
Or do you use an image thumbnail linking to the PDF file URL? Let me know in the comments below.