# How to embed a PDF in WordPress (with or without a plugin)

*Collection: How-to Guides · Category: Guides · Availability: Free & Pro · Canonical URL: https://www.getfiledeck.com/docs/embed-a-pdf-in-wordpress/*

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:

1. Edit the page and add a **File** block.
2. Upload the PDF or pick it from the Media Library.
3. In the block settings, turn on **Show inline embed** and set the height.
4. 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](https://www.getfiledeck.com/docs/stop-direct-access-to-wordpress-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](https://wordpress.org/plugins/filedeck/).

### 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](https://www.getfiledeck.com/docs/add-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](https://www.getfiledeck.com/docs/inline-document-embed/).

### 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](https://www.getfiledeck.com/docs/elementor-integration/).
- **Bricks, Divi, WPBakery, Avada and Beaver Builder** each get a Document Embed element. See [page builders](https://www.getfiledeck.com/docs/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](https://www.getfiledeck.com/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](https://www.getfiledeck.com/docs/pdf-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](https://www.getfiledeck.com/docs/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](https://www.getfiledeck.com/docs/external-files/) 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](https://www.getfiledeck.com/docs/display-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](https://www.getfiledeck.com/demo/). If you have more than a few PDFs, [display PDFs in a searchable table](https://www.getfiledeck.com/docs/display-pdfs-in-a-searchable-table/) is usually the better page, and [how to password-protect PDFs and downloads](https://www.getfiledeck.com/docs/password-protect-downloads-in-wordpress/) covers PDFs only some people should read.
