50% off Agency for 3 monthsStart free

How to embed a PDF in WordPress that works on mobile

The File block only gives a download link, and pasted iframes get stripped for most users. The real ways to embed a PDF in WordPress that survive on a phone.

Richard Henney4 min read

Embedding a PDF in WordPress should take thirty seconds. In practice it’s one of those small jobs that quietly eats an afternoon, because WordPress gives you three ways to do it and two of them don’t do what you think.

Let me save you the afternoon.

The File block doesn’t embed anything

This is the first trap, because it looks right. You add a File block, upload your PDF, and WordPress shows a tidy little card with the filename and a download button.

That’s not an embed. That’s a link with extra steps. The reader taps it, leaves your page, and lands in whatever their browser does with a PDF — usually a download. Everything you wanted them to see is now a file in someone’s Downloads folder, unread.

The File block also offers an “inline embed” option on some setups. Turn it on and you’ll get the exact problem the general PDF embedding guide covers: it leans on the browser rendering a PDF inside the page, which desktop mostly manages and mobile mostly doesn’t.

The iframe works, until two things go wrong

The classic move is a Custom HTML block with an iframe:

<iframe src="/wp-content/uploads/brochure.pdf" width="100%" height="600"></iframe>

Two problems, and the second one is the sneaky one.

First, it breaks on phones. Most mobile browsers won’t render a PDF inside an iframe — you get a blank box or a download. It looks perfect on your laptop, ships broken, and you find out from a customer. That’s a general embedding issue, not a WordPress one, and it’s worth reading why the usual methods fail before you rely on any iframe.

Second — and this one is pure WordPress — the embed can silently vanish when you save. WordPress strips <iframe> and other tags it considers risky from any user who doesn’t have the unfiltered_html capability. That’s not an edge case: it’s every Author, every Contributor, and every single user on a multisite install. The block looks fine in the editor, you hit Update, and it’s gone from the saved post. If you’re an Administrator on a standalone site you’ll never see it, which is exactly why the person who set the site up swears it works while an editor swears it doesn’t.

What actually works: embed the content, for any role

The reliable route is the same one that fixes mobile — stop embedding the file and embed the content, rendered as pages. A document reader converts each page to an image with the text extracted, and hands you an embed that behaves like a web page, because it is one.

Two ways to drop that into WordPress:

Paste the link. If the reader supports oEmbed, put its share link on its own line in a paragraph block. WordPress recognises it and embeds it automatically — no HTML, no iframe, nothing to strip. This is the cleanest option when it’s available.

Use the block or snippet. A document reader gives you a responsive embed you paste into a Custom HTML block. The important detail for WordPress specifically: if the embed is rendered server-side by a plugin rather than pasted as a raw iframe, it works for every author regardless of role — because there’s no <iframe> in the post for WordPress to strip. That’s the difference between an embed only admins can add and one your whole team can use.

Doing it with Living Page

For a concrete walkthrough — this is what I build, so I’ll use it:

  1. Upload your PDF and publish it. You get a share link and a responsive embed snippet.
  2. In WordPress, add a Custom HTML block and paste the snippet — or paste the share link on its own line to let oEmbed handle it.
  3. Publish. It renders as a page-turning reader: one page at a time on a phone, full text extracted so it’s searchable and readable, and it doesn’t fall over on mobile.

And because the document lives behind one stable link, you can update the PDF later without changing anything on the page — replace the file, and the embed already on your WordPress post shows the new version.

A quick checklist

  • Open the page on an actual phone, not a resized window.
  • Does the document show as readable pages, or a download button?
  • Ask a non-admin user (an Author or Contributor) to add one — does it survive save?
  • Is it responsive, and does it show a single page on narrow screens?
  • Can you search the text inside it? If not, neither can Google.
  • If you update the PDF, does the embed update without editing the post?

Clear all six and you’ve got an embed that works for everyone who touches the site — not just the admin who set it up.


Living Page turns a PDF into a page-turning reader with a WordPress-friendly embed that works on mobile and for every author. Try it free.

Frequently asked questions

How do I embed a PDF in WordPress?
You have three routes. The File block uploads the PDF and shows a download button — not an embed. A Custom HTML block with an iframe embeds the file but breaks on many phones and is stripped from any user without the unfiltered_html capability. The route that actually works is a document reader that gives you a clean, mobile-safe embed you paste as a block — it renders as pages rather than a raw file, so it survives on a phone and for any user role.
Why does the WordPress File block only show a download link?
Because the File block is designed to offer a file, not display one. It gives readers a link and an optional inline preview that most mobile browsers refuse to render. If you want people to actually read the document on the page, the File block is the wrong tool.
Why does my embedded PDF disappear when I save the post?
WordPress strips <iframe> and other risky tags from users who lack the unfiltered_html capability — which means Authors, Contributors, and every user on a multisite install. The embed looks fine in the editor and silently vanishes on save. Administrators on a single site keep it, which is why the person who set it up often never sees the problem.
Do I need a plugin to embed a PDF in WordPress?
Not necessarily. If your document reader supports oEmbed, you can paste the link on its own line and WordPress embeds it automatically. A plugin helps when you want the embed to work for every author regardless of role, since it renders server-side and sidesteps the iframe-stripping problem entirely.

Turn your next PDF into a living page

Upload a PDF and share a page-turning link in about a minute. Free to try — no page caps, no ads on your work.