This tutorial will demonstrate how to embed a PDF (with and without a plugin) in a WordPress post or page, which will make it easier for all your visitors to view the displayed content.
An example of an embedded PDF would be to display listed documents such as purchase menus, class materials, catalogs, floorplans, etc.
An embedded PDF file into your WordPress post enables your viewers to open, view, and then download and print what they are interested in. This article created by our team at wpDataTables will explain how to use two distinct WordPress plugins to embed a PDF.
- From Media
- Using Google Drive to embed a PDF
Both methods are fast and will help you embed a PDF file in WordPress. If you need to convert your files, raw file converters can help. We will also explain how to embed a PDF in WordPress without a plugin.
How to Embed a WordPress post using a Plugin
Embedding a PDF in a WordPress post using a plugin will give the website creator a better view of the downloads received for each offered PDF. All the downloads are visible, as well as the stop downloads of certain PDF files.
WordPress does give you certain embedding options, but it does not yet allow embedding PDF files.
Add PDF file:
- Media option
- Add File
- Create Link to File
It can now be viewed either as a download or on a separate web browser.
Please see below 7 easy steps using the first plugin option for embedding a PDF in WordPress.
Embed PDF Viewer plugin
Step 1: Install/Activate the Embed PDF Viewer plugin.
Step 2: Embed a PDF document: Make a new post/edit an active one.
Step 3: While in the edit screen choose (Insert New Block Icon).
Step 4: Choose the PDF block below the (Embeds section).
Step 5: Upload a new PDF from the Media library or add from URL).
Step 6: Find and click the file you embedded; you should now see the file in your post.
After completion of the 6 steps, using the block choices on the left, you can insert CSS if necessary, as well as resizing the embedded area.
Step 7: SAVE post and preview on your live website
The 3 additional steps are for customization of the appearance and function of your PDF.
Step 1: Go Dashboard of your WordPress – Plugins and then Add New.
Step 2: Search for PDF Embedder (Install and activate the plugin).
Step 3 (optional): change Width and Height of PDF viewer.
Step 4 (optional) Toolbar Location/Hover: – Used to zoom the PDF viewer and change pages.
The toolbar can be on the top, bottom, or you can show it on both the top and bottom of the PDF. Choose the hover option to display a toolbar only when a visitor hovers over the document with a mouse.
Step 5 (optional) Change the setting for a specific file only: Use shortcodes. Review our example below.
[pdf-embedder url=”http://yourwebpage.com/wp-content/uploads/2020/01/March.pdf” width=”600″ toolbar=”bottom” toolbarfixed=”off”]
Using this plugin with the Classic Editor which is also used for a video or an image.
Create a new post/revise current – click the Add Media button – Upload your PDF -Insert into post button. (A shortcode will appear in your post).
Embedding a PDF in WordPress (No Plugin needed)
Embedding a WordPress PDF is possible without a plugin. Although they’re quick, sometimes plugins are unnecessary. Instructions are provided below on how to create a PDF in WordPress without a plugin
Embedding a PDF without a plugin using the Media Section
WordPress gives you a wonderful option for problem-free inserting and embedding images and videos. As a webpage creator using the Media Library, you can also insert PDF’s to show on your post or webpage.
Using this option, visitors to your page see only the file name and link which gives them a download option.
To give your visitors this option without using a plugin please follow the steps below:
Prior to embedding a PDF file on your WordPress, it needs to be added to your page, using the Media Library provided by WordPress.
- Find the post you want to embed with a PDF
- Select the Add Media option
- Go to the tab called “upload files”
- Choose “select file” this will upload your PDF to the WordPress Media Gallery
- Preview by returning to your post
Some people prefer to use the Gutenberg editor, which also requires you to upload your PDF file.
You can enter the file block to your webpage or post, which will reveal the name of the file and a download option for your visitors. You can also revise the name of the link and choose whether or not you will allow downloads.
You can also use the image block. To insert your PDF file using this method, first select the media library button to upload your file. If you choose to select the ‘insert into post’ option, a link will appear on your page that visitors can choose to see or download the file.
To now embed the PDF in a post, visit the Media Library, copy the URL of the file uploaded.
Copy this code below, replacing the URL part with the URL you just copied.
`<iframe src="http://docs.google.com/viewer?url=<file_url>&embedded=true" width=“800" height=“1200” frameborder="0"></iframe>`
Do not hesitate to play with the width and height to customize the size.
After inserting your URL, you should notice that it has embedded the PDF file you had chosen. This was how to embed a PDF on WordPress without a plugin, quickly and easily.
To make it more convenient for your visitors to view the PDF, format it so that the file loads in a separate browser tab.
- Select anywhere on your linked text
- Select the Edit button (pencil icon).
- Select the Link options button (cog icon).
- Mark ‘Open link in a new tab’ and click Update.
- Update the post to complete the action.
How to embed a PDF in WordPress using Google Drive
This alternative to the above is a very simple way to embed a PDF in WordPress without a plugin. Google Drive is a useful tool for all file-based activities.
With any tool, you need a log-in. To do so please follow the simple guidelines below.
- Create a google account or use an existing one.
- Add your PDF file to Google Documents
- Once uploaded simply click twice on your file and it should open.
- Using the 3-dot drop-down menu,open your file in a separate window.
Go to the separate window, use the same menu, and click Share. You should see a pop-up called Share with others.
- Select Get shareable link. Once you do this your PDF will be visible to all.
Once the PDF has opened, click on the three dots icon again and this time select Share.
If you want to prevent visitors from making any additional actions on your PDF, simply mark Disable options to download, print, and copy for commenters and viewers, which is available in the advanced section.
Finally, select DONE.
FAQs about embedding a pdf in WordPress
1. How can I embed a PDF file in a WordPress post or page?
You can use the built-in Media Library in WordPress or a plugin like PDF Embedder or Google Doc Embedder to embed a PDF file in a post or page.
You can upload your PDF file to the Media Library and then link to it in your post or page by using the Media Library. Users can view the PDF without leaving your website if you use a plugin to embed it right into your content.
2. Is there a WordPress plugin that can help me embed PDFs?
Indeed, there are a number of WordPress plugins that allow you to embed Documents. Embed Any Document, Google Doc Embedder, and PDF Embedder are a few well-liked choices.
These plugins have a variety of capabilities, such as responsive design, compatibility for various file kinds, and fully customized PDF viewers.
3. Are there any limitations to embedding PDFs in WordPress?
There can be some restrictions to take into account while embedding PDFs in WordPress. For instance, certain users might have trouble accessing your Documents if they do not have the necessary software installed on their device or some browsers might not support the PDF player utilized by your plugin.
Large PDF files could also take longer to load, which could have an impact on user experience.
4. Can I customize the appearance of the PDF viewer in WordPress?
You might be able to alter the PDF viewer’s appearance depending on the plugin you use to embed PDFs in WordPress.
For instance, some plugins let you change the viewer’s size, color, and design. This might assist you in making sure the PDF viewer blends well with your website’s general design.
5. How can I ensure that my embedded PDFs are accessible to all users?
It’s crucial to adhere to recommended standards for PDF accessibility to make sure that your embedded Documents are available to all users. This involves making sure the PDF can be accessed with the keyboard and including alternative text for images and descriptive file names.
To assess the accessibility of your PDFs, you may use use a plugin like PDF Accessibility.
6. What file size limits should I be aware of when embedding PDFs in WordPress?
It’s critical to be aware of file size restrictions when embedding PDFs in WordPress. Large files may take longer for users to load on some hosting providers’ servers since they have size restrictions on the files you can upload. Consider compressing your PDFs or hosting them on a different server to reduce these problems.
7. Can I embed a PDF from an external source, such as Google Drive or Dropbox?
Sure, you can use a plugin like Embed Any Document or Google Doc Embedder to embed a PDF from an external source in a WordPress post.
You may insert Documents using these plugins from places like Google Drive, Dropbox, or OneDrive. If you need to collaborate on a PDF with others or if you want to free up space on your own server, this can be a helpful choice.
8. Are there any security concerns I should be aware of when embedding PDFs in WordPress?
When embedding PDFs in WordPress, there are a few security issues to be aware of. For instance, you can be vulnerable to malware or other security risks if you let visitors upload PDFs to your website.
Use a reliable PDF embedding plugin, and only permit verified users to upload files to your website, to reduce these hazards.
9. How can I track how many times my embedded PDFs are viewed or downloaded?
You can use a plugin like Google Analytics for WordPress to monitor how frequently your embedded Documents are viewed or downloaded.
You can use this plugin to keep track of user activity on your website, such as how frequently a certain File has been downloaded or read. Understanding how consumers engage with your material through this might be helpful.
10. Can I embed multiple PDFs on a single page or post in WordPress?
Sure, you can use a plugin like PDF Embedder or Embed Any Document to embed numerous PDFs on a single page or post in WordPress.
These plugins allow you to embed several PDFs into a single post or page or create a gallery of PDFs that viewers may browse through. If you want to present a lot of PDF content on your website, this can be a helpful alternative.
If you enjoyed reading this article on how to embed a pdf in WordPress, you should check out this one about how to add meta tags in WordPress without a plugin.
We also wrote about a few related subjects like how to embed excel in html, how to hide a featured image in a WordPress post, how to tell if a site is WordPress, how to uninstall WordPress from cPanel, how to optimize CSS delivery in WordPress and how to create a website like Amazon.