The Complete Developer’s Guide: How to Embed a PDF in WordPress

|

InstaWP Makes you work 900% Faster

Build, manage, host, and migrate using just one tool. Apply GRAB50 to get started.

50% OFF for 6 months

Embedding PDFs in WordPress is one of those tasks that seems simple—until you try to make it look good, load fast, and work across all devices. Whether you’re working with restaurant menus, product catalogs, academic materials, eBooks, or marketing brochures, embedding PDFs properly can greatly enhance the user experience without disrupting the flow of your website.

In this comprehensive, step-by-step guide, we’ll cover everything you need to know about how to embed a PDF in WordPress, from plugin-based solutions to manual methods. Whether you’re building your own site or delivering for a client, this guide is designed to help WordPress developers execute PDF integration seamlessly.

We’ll use terms like: embed WordPress PDF, upload PDF, embed a PDF in WordPress, WP PDF, and add PDF to WordPress, throughout to help you understand the various ways PDFs can be handled in a WordPress environment.

Why Embed PDFs in WordPress?

Embedding a PDF directly on a page enhances accessibility and keeps users engaged without forcing them to download and open a separate file. It’s a user-friendly way to share:

  • Restaurant menus
  • Tour itineraries
  • Instructional manuals
  • E-books
  • Product datasheets
  • Class materials
  • Brochures and flyers

Rather than simply offering a download link, you can embed PDF in front of the user so they can preview or scroll through the file directly on your webpage.

What Are the Main Ways to Embed a PDF in WordPress?

There are three main methods to embed a PDF:

  1. Using a WordPress plugin (Beginner-friendly)
  2. Using Gutenberg Blocks (Block Editor)
  3. Embedding without a plugin using HTML <iframe>
  4. Embedding via Google Drive
MethodPlugin RequiredBest ForSEO-FriendlyMobile Responsive
PDF Embedder✅ YesBeginners, quick setup✅ Yes✅ Yes
Embed PDF Viewer✅ YesGutenberg users✅ Yes✅ Yes
iFrame HTML❌ NoDevelopers, performance✅ Yes✅ With CSS
Google Drive❌ NoPublic docs, collaborative content✅ Yes✅ Yes

Let’s explore each method in detail.

If you’re not keen on writing code or handling HTML, using a WordPress PDF plugin is the easiest route.

Best Plugins to Embed PDF in WordPress

PluginKey Features
PDF EmbedderJavaScript-based viewer with customizable size and toolbar
Embed PDF ViewerGutenberg block support, URL-based embedding
PDF Viewer for WordPress (Premium)Advanced controls, analytics, and Google Drive integration

We’ll walk you through PDF Embedder, one of the most popular free options.

Step 1: Install the Plugin

  • Go to your WordPress Dashboard → Plugins → Add New
  • Search for “PDF Embedder”
  • Click Install Now and then Activate
Click Install Now and then Activate a   WordPress PDF plugin to embed PDF in WordPress.

Step 2: Configure Settings

  • Navigate to Settings → PDF Embedder
Navigate to Settings → PDF Embedder to embed PDF in WordPress
  • You can customize:
    • Viewer width and height
    • Toolbar visibility (top/bottom/hover)
    • Mobile responsiveness
Customize the settings

Step 3: Upload PDF to WordPress

  • Edit the page/post where you want the PDF embedded
  • Click Add Media
  • Upload your PDF and select Insert into post
Upload your PDF and select Insert into post

🔁 A shortcode like [pdf-embedder url=”your-url.pdf”] will appear. When you preview your post, the PDF will display as an inline document—scrollable, zoomable, and polished.

Not sure which PDF plugin works best for your layout? Use InstaWP to spin up a staging site in seconds and test plugins like PDF Embedder, Embed PDF Viewer, or iframe methods side-by-side—without risking your live site.

Method 2: Embed PDF in WordPress Using Gutenberg Blocks (Block Editor)

If you’re using the Gutenberg editor, you can use plugins that support Gutenberg blocks for embedding.

  1. After installing the Embed PDF Viewer plugin.
embed a PDF in WordPress
  1. In your post editor, click “+” → Embeds → PDF Viewer
  2. Upload your PDF or paste a URL
  3. Resize and position the block visually
  4. Hit Publish to go live

The PDF will appear front and center, embedded directly into the content area with native scrolling and viewing controls.

Method 3: Embed a PDF in WordPress Without a Plugin (HTML iFrame Method)

For developers or performance-focused users, this is the cleanest route—no plugin overhead.

  1. Upload your PDF via Media Library (Dashboard → Media → Add New)
Upload your PDF via Media Library (Dashboard → Media → Add New) to embed PDF WordPress
  1. Copy the file URL
Copy the file URL to embed PDF in WordPress
  1. Paste the following code into your page/post in HTML view:

<iframe src=”https://docs.google.com/viewer?url=YOUR_PDF_URL&embedded=true” width=”100%” height=”800″ frameborder=”0″></iframe>

Adjust width and height as needed. This renders a sleek, scrollable, zoomable PDF viewer powered by Google Docs Viewer—perfect for public documents.

Method 4: Embed WordPress PDF from Google Drive (No Plugin Needed)

This method works well if you already store assets on Google Drive.

  1. Upload the PDF to Google Drive
Upload the PDF to Google Drive to embed PDF in WordPress
  1. Right-click → Open in New Window
Right-click → Open in New Window
  1. Click the 3-dot menu → Select “Embed Item”
Click the 3-dot menu → Select “Embed Item”
  1. Copy the generated iFrame HTML
Copy the generated iFrame HTML
  1. Paste into your WordPress post in HTML/Text view

Want to restrict downloading, printing, or copying? Click Advanced > Disable options before embedding.

Best Practices for WordPress PDF Embedding

To make your embedded PDFs more effective:

✅ Keep file sizes under 2MB for performance
✅ Use descriptive file names for SEO
✅ Enable lazy loading via plugins to preserve speed
✅ Embed PDFs above the fold only if absolutely necessary
✅ Always use responsive viewers to keep mobile users happy

Making Embedded PDFs Mobile-Responsive

Responsive design matters, and you need to make sure that you’re embedding PDFs the right way and making them mobile responsive. And, here is what you can do to make it happen. 

  • Use 100% width in iframe or block settings
  • Avoid fixed width/height unless required
  • Use plugins that include responsive settings or CSS wrappers
  • Test on various devices using InstaWP’s preview tools or DevTools

🔄 Pro Tip: Want to test responsive display before going live? Spin up a staging site on InstaWP, try different PDF plugins, and optimize mobile display without touching your production site.

Securing Your Embedded PDFs

Want to control who can download or interact with your PDF?

Here’s how:

  • Disable downloading in Google Drive’s share settings
  • Use PDF plugins with permission controls
  • Prevent indexing of PDFs in robots.txt (especially gated content)
  • Watermark your PDFs if they’re proprietary

Developer Workflow Tip: Use InstaWP for Testing PDF Embed Plugins

If you’re managing multiple sites, you know how risky it is to install new plugins on a live site.

Here’s where InstaWP can transform your workflow:

  • Instantly launch staging sites to test PDF embedding
  • Compare plugin performance, styling, and mobile behavior
  • Use the Config Manager to modify PHP settings or enable shortcodes
  • Share staging links with clients or team members for approval
  • Push changes to live with 1-click sync

Want to see if your PDFs load slower with a plugin? Run speed tests and tweak settings inside your InstaWP-powered staging before going live.

Final Thoughts: Make PDFs a Seamless Part of Your WordPress UX

Embedding a PDF in WordPress isn’t just about adding files—it’s about enhancing the visitor experience. Whether you’re a developer working on client sites or a site owner uploading lead magnets or catalogs, there’s a method for you.

To recap:

  • Use plugins if you want a fast setup and design control
  • Use iFrames or Google Drive for performance or external hosting
  • Optimize for responsiveness, speed, and accessibility
  • Secure and track your PDFs as you would any content

✅ Want to test multiple methods to embed a PDF in WordPress side-by-side? Try InstaWP to spin up instant test sites, run performance audits, and pick the best PDF embedding strategy—before pushing to production.

InstaWP Makes you work 900% Faster

Build, manage, host, and migrate using just one tool. Apply GRAB50 to get started.

50% OFF for 6 months

Neha Sharma

Content Writer Excecutive, InstaWP

Neha loves creating content for the InstaWP from her lazy couch. With a passion to learn and deliver, she aspires to be a dynamic content strategist, constantly honing her skills to inspire and engage her audience. When she’s not writing, she’s likely brainstorming new ideas, always aiming to craft stories that resonate.
Like the read? Then spread it…
Facebook
Pinterest
LinkedIn
Twitter

Leave a Comment

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


Ready to build
WordPress sites?

InstaWP is an all-one-in developers toolbox where you can get started 
on WordPress in an instant, build the site and host it anywhere.

Request demo

Wondering how to integrate InstaWP with your current workflow? Ask us for a demo.

Contact Sales

Reach out to us to explore how InstaWP can benefit your business.