
Knowing how to embed a PDF in WordPress, is vital if you want to share important documents on your site without making people download them. Instead of just linking to a file, you can display it right on the page. This organizes your web content and facilitates it, so visitors can read without leaving your site.
For example, let’s say a restaurant owner wants to show a business owner’s menu, as he needs to present a detailed report. Instead of forcing users to download the files, he can embed the PDFs directly into the page. This not only improves the user experience, but also ensures everything appears neat and professional.
This guide shows you how to embed PDF in WordPress via plugins or manually. We’ll explain both methods so you can pick the one that works best for your WordPress site.
KEY TAKEAWAYS
- Embedding PDFs in WordPress helps you display important documents directly within posts and pages without requiring downloads.
- You can use plugins like EmbedPress and PDF Embedder to add PDFs with customizable settings.
- For a simple, no-plugin method, use the Media Library and HTML iframe code to display PDFs directly on the page.
- Google Drive is a great option for embedding large PDFs without impacting server space.
- Always optimize PDF file size before embedding to ensure fast loading and a more pleasing user experience.
- Add alt text and descriptive links to make embedded PDFs accessible for all users.
- Test the PDF display across multiple devices and browsers to confirm proper formatting and functionality.
- Regularly update plugins and monitor embedded links to prevent broken files and improve site security.
- Include a download link or call-to-action alongside the embedded PDF for easy access and additional user engagement.
TABLE OF CONTENTS
Use a Plugin to Embed A PDF in WordPress
If you want to embed PDFs in WordPress without complicated code, using a plugin is a simple and effective option. Plugins provide several features, including customizable viewers, responsive displays, and easy PDF management. With plugins, you can also adjust how PDFs appear, add toolbars, and control file access.
Here are some commonly used plugins to embed PDF in WordPress:
- PDF Embedder
- EmbedPress
- Embed PDF Viewer
For this section example, we use the EmbedPress plugin because it’s a versatile option that allows you to embed PDFs using a simple URL. It’s ideal if you want a responsive and scrollable PDF viewer.
With this plugin, you can also add branding to embedded documents. This includes adding logos, call-to-action buttons, and custom colors to match your WordPress website’s design. These customization options enhance user engagement while keeping the embedded content aligned with your brand.
To use this plugin, you must first install and activate it. Once done, you can follow any of the following methods to embed PDF in WordPress based on your requirements and ease:

Embed PDFs in Gutenberg Editor
The Gutenberg Editor allows you to insert PDFs as blocks, making it easy to control where the PDF appears and how it looks. Here’s how to do it using the EmbedPress PDF block:
Open the post or page where you want to embed the PDF. Type /embedpress pdf and choose the EmbedPress PDF block.

Once the block is added, click Media Library.

Now, you can upload the PDF from your local computer or select one from the Media Library. To do this, pick the file and click Select to embed PDF in WordPress. EmbedPress will automatically create a viewer for the PDF.

After that, you can adjust settings like width, height, viewer style (modern or flip book), and toolbar position. You may also add custom CSS for further styling.

When you’re satisfied with the setup, save and publish the post or page. The PDF will appear in the content, and visitors view it without leaving the page.
Embed PDFs in Elementor Using PDF Widget
If you’re using the Elementor plugin, you can embed PDFs using the EmbedPress PDF widget. This method provides design control and allows you to place a PDF precisely within your layout.
To do this:
Open your post/page with Elementor editor and select the section where you want to insert the PDF. Next, find the EmbedPress PDF widget and drag it into the desired area.

In the widget settings, upload the PDF or paste the PDF link. The widget will automatically generate a viewer for the PDF. This step is useful if you want to embed a PDF from an external source link.

You can now revise the viewer settings, including dimensions and alignment. This ensures the PDF fits well within the content area. You can also upload a custom logo if you’re using the paid EmbedPress plugin.

Additionally, under Advanced, you can set margin, padding, and the document’s width. If you scroll down, you can also add custom CSS IDs and classes for further customization.

Once you’re done, click Publish in the top-right corner to save the page and make it live. The embedded PDF will be interactive, allowing users to scroll through pages and download the file.
Note: If your WordPress theme supports widgets, you can also use the EmbedPress PDF widget without the Elementor plugin.
Hosted®’s WordPress Hosting is built for performance, offering SSD storage, built-in caching, and 99.9% uptime.
With features like a free SSL certificate, malware protection, and scalable plans, you’ll have everything you need to launch and grow your WordPress website.
Embed PDF in WordPress Classic Editor
If you’re using the Classic Editor, you can still embed PDFs using the shortcode method. Here’s how:
First, go to Media → Add Media File and click Select Files to upload the PDF to the media library.

Now, click Copy URL to clipboard to copy the PDF file’s link.

After that, go to EmbedPress → Shortcode. Paste your link and click Generate. Doing so will create a shortcode you can use to embed PDF in WordPress posts/pages.

Now, click Copy Link to copy your newly created shortcode.

Navigate to the post/page where you want to embed the PDF, and paste the shortcode in the editor:

Save and preview the content. The PDF viewer will appear where the shortcode is placed, allowing users to view the document directly on the page.
By embedding documents and PDFs, you’re not just displaying content; you’re creating an interactive experience for your visitors. This method keeps your pages looking clean and professional while allowing users to access important information without having to leave the page.
So far, we’ve learned how to add PDF to WordPress using a plugin. Is there a way to do this without using any plugin? Let’s see in the following section.
Using iFrame with Media Library & Google Docs
This method is for those who want to keep things simple and want to embed PDF in WordPress without using a plugin. Here’s how you can use an iframe with Media Library and Google Drive:
WordPress Media Library
Go to WordPress Dashboard → Media → Add Media File. Next, click Select Files or drag and drop your file. Then, click Copy URL to clipboard to copy the uploaded file’s URL (this is what we did in our example above, in the Embed PDF in WordPress Classic Editor section).
However, if you forget to copy the link, navigate to Media → Library. Click your PDF file to open its media details. Here, click Copy URL to clipboard to copy the link. This link will be used in the next step.

Now, open the post or page where you wish to embed the PDF. Type /Custom HTML and choose this block once it appears. This is the block where you’ll add the <iframe> code.

Now, paste the following code inside the block:
<iframe src="PDF_URL" width="100%" height="600px" style="border: none;"></iframe>
Ensure you replace the PDF_URL with the actual link to the PDF file. You can also adjust the width and height values to control how the PDF appears on the page. The style=”border: none;” part removes the border, keeping the viewer clean and professional.

Now, save and preview the post or page.
IMPORTANT CONSIDERATIONS:
- Cross-Browser Compatibility: Some browsers may block the embedded PDF from displaying if the source URL is not secure http vs https).
- PDF Size & Performance: Large PDFs may take time to load. Consider optimizing the PDF before embedding.
- Mobile Responsiveness: Ensure the width is set to 100% to make the viewer responsive on mobile devices.
- Security Concerns: If the PDF is sensitive, consider restricting its access with WordPress settings or membership plugins.
iFrame with Google Drive
If you don’t want to upload PDFs directly to your WordPress site, you can use Google Drive to embed them. This method is simple and keeps your server space free. It’s ideal for users who want to share large PDFs or frequently update documents without re-uploading files to WordPress.
Here’s how to do it:
Open your Google Drive and click New.

Next, select File upload and choose the PDF you want to embed.

Wait for the upload to complete. Once the PDF is uploaded, right-click on the file and select Open with → Open in new tab.

In the PDF viewer, click the ⋮ and then select the Embed item…option.

A pop-up will appear with the embed code. Copy the iframe embed code, as you will need it for the next step. Then, click OK.

Now, go to your WordPress Admin Dashboard and open the post or page where you wish to display the PDF. Insert a Custom HTML block and paste the iframe embed code you just copied.

TIP: If you’re using Classic Editor, open your post/page, switch to Code view, and add the iframe code.
Best Practices for Embedding PDFs in WordPress
Here are some best practices and tips to ensure optimal PDF embedding:
- Reduce the PDF file size before uploading to avoid slow loading times. You can use the Smallpdf tool to compress PDFs without compromising quality.
- Ensure the text is clear and readable after compression.
- Set the width of the PDF viewer to 100% to ensure it adjusts to all screen sizes.
- Use plugins that support responsive display, especially if your audience accesses content on mobile devices.
- Test the PDF on multiple devices and browsers to confirm optimal viewing.
- Add alt text to the PDF link to describe the content for visually impaired users.
- Provide a download link for users who prefer to save the PDF for offline reading.
- If the PDF contains sensitive information, consider:
- Password protection to restrict access.
- File permissions to limit access to specific users or roles.
- Content restriction plugins (e.g., MemberPress) to control visibility.
- Use descriptive file names and URLs that reflect the PDF content (e.g., 2025-WordPress-Guide.pdf).
- Include keywords in the surrounding content to help search engines understand the PDF context.
- Add a brief PDF description or summary below the embedded file to provide context for readers.
- Regularly check PDF links to ensure they’re still accessible and not broken.
- Monitor page speed after embedding PDFs, as large files can slow down the page.
- If performance is impacted, consider lazy loading the PDF viewer or linking to the PDF instead of embedding.
- Regularly update plugins used for embedding PDFs to ensure compatibility with the latest WordPress version.
- Monitor plugin reviews and support forums for potential security risks or bugs.
- If you’re embedding important PDFs (e.g., reports, case studies), track user interaction using Google Analytics or a plugin.
- Monitor metrics like clicks, downloads, and time spent viewing the PDF to gauge user engagement.
Following these best practices ensures that your embedded PDFs are user-friendly, mobile-responsive, and well-optimized for performance.
![Our WordPress Hosting servers are optimized for top WordPress website performance Strip Banner Text - Our WordPress Hosting servers are optimized for top website performance. [See Plans]](https://www.hosted.com/articles/wp-content/uploads/2025/05/embed-pdf-inwordpress-2-1024x229.webp)
FAQS
What’s the difference between embedding a PDF and linking to it?
Embedding a PDF displays it directly within the content area, allowing users to view and interact with the file without leaving the page. Linking to a PDF, on the other hand, opens the file in a new tab or triggers a download. Embedding is ideal for interactive content, while linking is better for large files or downloadable resources.
How can I restrict access to embedded PDFs?
You can restrict access to embedded PDFs by using membership plugins or password protection. Some plugins also allow you to disable download options, preventing users from saving the file locally.
Are There Security Risks When Embedding PDFs in WordPress?
Yes, there can be security risks when embedding PDFs in WordPress, especially if the PDF contains sensitive or confidential information. Directly embedding such files may expose them to unauthorized access or downloads. To protect sensitive content, consider hosting the PDF on a secure platform like Google Drive or Dropbox, where you can set specific access permissions. This way, you can control who can view, download, or share the PDF without compromising your site’s security. Additionally, you can use password protection or content restriction plugins to protect the embedded files further.
Can I embed multiple PDFs on a single WordPress page?
Yes, you can embed multiple PDFs on a single page by repeating the embedding process for each file. If you’re using a plugin like EmbedPress, you can add several blocks or widgets, each displaying a different PDF.
How to add a downloadable PDF to WordPress?
To add a downloadable PDF in WordPress, follow these steps:u003cbru003eGo to Media → Add Media File and upload the PDF. Click the PDF to open its media details. Copy the File URL from the URL field. Open the post or page where you want to add the download link. Highlight the text you want to use as the link. Press Ctrl + K, paste the PDF URL and hit Enter. Finally, save the post or page. You can also use plugins like Download Monitor to track downloads or add download buttons for better visibility.
Other Related Tutorials
– How To Add Schema Markup In WordPress: 2 Easy Methods
– WordPress Pagination: How To Add It Manually Or With Plugins
– How To Upload HTML Files To WordPress: 3 Easy Methods
– How To Create A WordPress Sticky Header: 4 Easy Ways
– How To Add Featured Posts In WordPress: 6 Easy Ways