How to embed a PDF in WordPress (with or without a plugin) Free & Pro
Embed a PDF in WordPress with the File block, no plugin needed, or a free PDF embed block or Elementor widget. What each does on phones and for private files.
Updated October 2, 2026
To embed a PDF in WordPress without a plugin, add a File block, choose the PDF and turn on Show inline embed. The PDF appears in the page, shown by the visitor’s browser. On most phones and tablets the File block shows only the link and download button, and the file stays at a public address. A PDF viewer plugin can fix both.
How do you embed a PDF without a plugin?
WordPress’s block editor can do it on its own:
- Edit the page and add a File block.
- Upload the PDF or pick it from the Media Library.
- In the block settings, turn on Show inline embed and set the height.
- Publish, then check the page on a phone as well as a computer.
The PDF is displayed by the browser’s own PDF viewer, so what visitors see depends on their browser. Know three limits before relying on it:
- Phones and tablets. The File block only shows the embed where the browser reports it can display a PDF inline. Most phones, Android tablets and iPads don’t, so their visitors get the link and download button, not the document.
- The file is public. The PDF lives in
wp-content/uploads, and anyone with its address can open it, whether or not they can see the page. See how to stop direct access to uploads. - No record. Core WordPress doesn’t count views or downloads.
A Custom HTML block with an <iframe> pointing at the PDF works the same way and has the same limits, because the browser is still doing the displaying.
When is a PDF viewer plugin worth it?
| Approach | Works on phones | Protected files | Viewer controls | Cost |
|---|---|---|---|---|
| File block with inline embed | Usually not | No | The browser’s own | Free |
<iframe> in a Custom HTML block |
Varies by browser | No | The browser’s own | Free |
| FileDeck Document Embed | Varies by browser | Yes, with Pro | Browser’s own, plus full screen and a download link | Free |
| FileDeck viewer | Yes | Yes | Pages, zoom, find, print, full screen | Pro |
Use the File block for a single public PDF on a page you don’t expect phone visitors to read. Use a plugin when the document matters on every device, when it should only be readable by some visitors, or when you want to know it was used.
How to embed a PDF with FileDeck
FileDeck’s inline embed is free on wordpress.org.
Step 1: Add the PDF as a document
Free
Install FileDeck, then go to Documents → Add New Document, attach the PDF and publish. Its title, size and type are filled in from the file. See add a document.
Step 2: Embed it on a page
Free
In the block editor, add the FileDeck: Document Embed block, search for the document in the block sidebar, and set the height, width, download link, full-screen button and title caption. The editor preview matches the front end.
Prefer shortcodes? Paste this into a Shortcode block, using the document’s ID from the Documents list:
[filedeck_embed id="123" height="800" download="1"]
All the options are in embed a document inline.
Step 3: Or use your page builder
Free
- Elementor: search the widget panel for "pdf viewer" and drag in FileDeck PDF Viewer, the same widget as FileDeck Document Embed. It works with free Elementor. See Elementor integration.
- Bricks, Divi, WPBakery, Avada and Beaver Builder each get a Document Embed element. See page builders.
By default, PDFs render in the browser’s built-in viewer. You can change the viewer for the whole site under Documents → Settings → Features → Document viewer, or per embed.
A PDF viewer that works the same on every device
FileDeck Pro — the FileDeck viewer is included in all Pro plans. See pricing
The browser’s built-in viewer differs from browser to browser, and some mobile browsers download the file instead of showing it. The FileDeck viewer is a PDF viewer served from your own site. It renders pages in the visitor’s browser with a toolbar for page position, zoom from 50% to 400%, find in the document, print and full screen.
Choose FileDeck viewer as the engine in the block or widget, or add engine="pdfjs" to the shortcode. Two more Pro options help on long pages:
- Popup mode (
mode="popup") shows a View button, and the PDF loads only when it is opened. - Protected files display. External viewer services fetch a file from their own servers, so they only work for public files. The FileDeck viewer reads from your own site, so it can show PDFs you’ve restricted to signed-in clients or members.
Can visitors download an embedded PDF?
Yes, in most cases. A browser that displays a PDF has received the file and can save it. FileDeck’s embed shows a download link only if you turn it on, and the AI tier adds view-only documents, which turn off the download route and zips. Treat that as deterrence, not a lock: if a document must not reach someone at all, restrict who can open it.
FAQ
Why doesn’t my embedded PDF show on mobile?
The File block and the browser viewer both depend on the phone’s browser, and most mobile browsers don’t display PDFs inside a page. The File block shows a link instead, and some browsers download the file. A viewer that draws the pages itself, such as the FileDeck viewer in Pro, displays it on phones too.
Can I embed a PDF from Google Drive?
Yes. Add the Drive share link as an external document in FileDeck and embed it like any other. Visitors can only see what the link’s own sharing settings allow.
Does embedding a PDF slow down the page?
An inline embed loads when the page opens, so several large PDFs on one page add up. Use Pro’s popup mode, which loads each PDF only when a visitor opens it, or list the PDFs in a searchable table with a preview button instead.
Is FileDeck’s PDF embed free?
Yes. The Document Embed block, the shortcode and the page-builder widgets are free for PDFs, images and Google Docs links. The FileDeck viewer, popup mode and embeds of Office, audio and video files are Pro.
Next steps
See the embed and the library layouts on the live demo. If you have more than a few PDFs, display PDFs in a searchable table is usually the better page, and how to password-protect PDFs and downloads covers PDFs only some people should read.
Still stuck? Email support@getfiledeck.com.