Insert a PDF in WordPress (Embed or Link)

Want to insert a PDF in WordPress without wrestling with settings? You have two clean options: link to the file or embed it so it displays on the page. The right choice depends on how your visitors will use the document. The techniques below mirror other embeds you might add to your site—like a map—so patterns you learn here also help with things like adding Google Maps to WordPress. If you ever want a modal experience, the same front‑end approach applies to creating a WordPress popup.

Overview

Linking is fast and lightweight. Embedding keeps people on the page and adds context. Here’s a quick comparison before we get hands‑on.

ApproachUXSEOPerformanceGood for
Link to PDFOpens in a new tab or downloads. Clear and simple.Descriptive link text helps. File can be indexed.Lightest. No heavy viewer or iframe.Price lists, policies, quickly shared docs.
Embed PDFView inline with zoom/search. Stays on the page.Page keeps its content around the viewer; add a title for iframes.Heavier. Consider lazy‑loading.Guides, menus, forms where context matters.

Tip: Decide per document. If it’s long and meant to be read, consider embedding. If it’s a quick download, link it. You can mix both: embed for on‑page reading and include a link right below it.

For a simple native method, WordPress’s File block makes linking easy. If you need a true on‑page viewer, you can embed with an HTML block or use a viewer plugin.

Add a PDF viewer to WordPress instantly with MicroEdits

If you want the simplest route, MicroEdits adds or updates your PDF viewer by description. Paste your URL, say what you want changed, and it handles the rest. No coding. No plugin hunting. No copy‑paste.

  • Describe changes in plain English: Embed our menu.pdf under the hero, 70vh tall with a subtle border.
  • See a preview, share it for review, and apply when you’re happy.
  • Want to switch from inline to a modal? Say so, and it adjusts. Prefer a straight link with a thumbnail preview? Also easy.
  • Works on your existing WordPress site—theme, builder, and hosting don’t matter.

enter any WordPress site

Once you’re comfortable, use the same approach for other front‑end embeds—maps, calendars, forms—without touching code.

Block editor methods

There are two native paths: link with the File block or display inline with an embedded viewer.

  • Open your page/post in the editor.
  • Add a File block. Upload your PDF or pick it from the Media Library.
  • Adjust the block’s options:
    • Show/hide the download button.
    • Toggle Open in new tab if you prefer that behavior.
  • Edit the link text to be descriptive, and add the file type and size, for example: Download the 2025 Price List (PDF, 2.1 MB).

Reference: WordPress’s official guide to the File block explains the basics and options: File block.

2) Embed a PDF with an HTML block (iframe)

Use an HTML block to embed a PDF inline. This gives you an on‑page viewer with browser controls.

<div class="pdf-embed">
  <iframe
    src="https://example.com/files/brochure.pdf#toolbar=1&navpanes=0"
    title="Company brochure PDF"
    loading="lazy"
  ></iframe>
</div>

Make it responsive and pleasant to use:

/* Responsive PDF iframe */
.pdf-embed {
  width: 100%;
  max-width: 1200px;
  margin: 1rem auto;
  aspect-ratio: 3 / 4; /* adjusts height based on width */
}

.pdf-embed iframe {
  width: 100%;
  height: 100%;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
}

/* If you prefer a fixed but viewport-aware height: */
/* .pdf-embed iframe { height: min(80vh, 1000px); } */

Notes:

  • The fragment options (after #) like toolbar=1 or navpanes=0 adjust the built‑in viewer UI.
  • Use the iframe title for accessibility and context.
  • loading=lazy defers loading until the user scrolls near it. See support details on MDN: iframe loading.

Viewer plugins

If you need zoom, search, thumbnails, and a custom toolbar, a dedicated PDF viewer for WordPress can help. A typical pdf embed plugin for WordPress adds features like:

  • Zoom controls, page thumbnails, search
  • Optional download/print buttons
  • Themes and borders

Be mindful of weight: many viewers add 200–400 KB (or more). Prefer options that:

  • Lazy‑load the viewer assets
  • Let you turn off unneeded controls
  • Respect your site’s fonts and colors without heavy overrides

If your needs are simple—just display PDF in WordPress—native iframe embeds (or MicroEdits doing it for you) are lighter and usually faster.

Accessibility and SEO

A few small choices make a big difference.

  • Use descriptive link text: Avoid click here. Include file type and size (PDF, 1.8 MB).
  • Title your iframe: The iframe title tells assistive tech what the document is. See guidance on

    MDN: iframe accessibility

    .
  • Tag the PDF: Export tagged PDFs so headings, lists, and reading order are available to screen readers. See

    W3C PDF Techniques for WCAG

    .
  • Keep filenames clear: brochure-2025.pdf beats final_v9_really_final.pdf.
  • Consider a caption: Below embeds, summarize the document and offer a download link as a fallback.
  • Think performance: Lazy‑load embeds; compress the PDF if it’s huge; split multi‑topic PDFs into smaller pieces if that suits the content.

If you’re cleaning up typography while you’re here, you can also change fonts on WordPress to keep the viewer area visually consistent with your brand.

Troubleshooting

  • CORS errors (cross‑domain PDFs): If the PDF is hosted elsewhere and the embed shows nothing or the console mentions CORS, host the file on your domain or configure the storage to allow cross‑origin requests for application/pdf. Background:

    MDN: CORS

    .
  • Mixed content (HTTP vs HTTPS): Embedding an http PDF on an https page is blocked by browsers. Serve the PDF over https or upload it to your Media Library so the URL matches your site’s scheme.
  • Scroll trapping inside the viewer: On mobile, nested scroll areas can feel “stuck.” Allow momentum scrolling:
.pdf-embed iframe {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
  • PDF downloads instead of viewing: Some servers force the content-disposition header to attachment. Host the file in WordPress or adjust server headers so the browser can display it inline.
  • Blurry text: Re‑export the PDF with fonts embedded and a reasonable DPI; avoid images of text.

FAQ

Should I embed a PDF or open it in a new tab?

If the PDF complements the page (menu, guide, form), embed it so readers stay in context. If it’s primarily a download (manuals, long reports), link it and open in a new tab. You can do both: embed for quick skim, then place a clearly labeled download link right below for people who want the file.

How do I make an embedded PDF responsive?

Wrap the iframe in a responsive container and size it by aspect‑ratio or viewport height. See the CSS above: the container uses aspect-ratio: 3 / 4 and the iframe fills it. Alternatively, set the iframe height to something like min(80vh, 1000px) so it grows with the screen but never becomes unwieldy.

What’s the simplest way to insert PDF in WordPress without a plugin?

Use the File block to link (fastest), or an HTML block with an iframe to display PDF in WordPress. For most sites, this is lighter and quicker than a full viewer plugin. If you don’t want to touch code at all, MicroEdits can add a polished embed or link for you—just describe what you want.

Do I need a WordPress PDF embedder plugin?

Only if you need advanced controls like thumbnails, search, or custom toolbars on every PDF. Plugins add features but also weight. If your goal is simply to embed PDF WordPress once or twice, the native iframe route (with lazy‑loading) will usually perform better.

Can I cache PDFs for faster loads?

Yes. Host PDFs on your site or a CDN with long Cache‑Control headers. Keep the filename stable (e.g., brochure-2025.pdf). When updating, bump the filename (brochure-2025-v2.pdf) or append a query string so visitors receive the fresh file while caches remain effective.

How can I track PDF opens or downloads?

If you’re linking with the File block, analytics platforms can record outbound file downloads automatically (check your analytics provider’s enhanced measurement settings). For embedded viewers, track the link just beneath the viewer or offer a Download PDF button tied to a measurable URL.