# Embed PDF in WordPress

Canonical URL: https://lancelhoff.com/embed-pdf-in-wordpress/
Published: 2008-12-06
Last modified: 2008-12-06
Description: Learn how to embed PDF files in WordPress using the Media Library and built-in editor options, with an HTML embed alternative when needed.

---

How to Embed PDF Files in WordPress? Embedding PDF files in WordPress is easy using the built-in tools, without plugins. You can also use the classic HTML embed code if needed.

### Method 1: Using WordPress Media Library (Gutenberg)

1. Login to your WordPress dashboard.
2. Create a new post or edit an existing post.
3. Click the **+ Add Block** button and search for **File** or **PDF**.
4. Upload your PDF file or select an existing PDF from the Media Library.
5. The block will automatically insert a download link and an optional embed preview of the PDF.
6. Publish or update your post. Visitors can now view or download the PDF directly.

### Method 2: Using HTML Embed Tag

If you want to embed the PDF directly inside the post for inline viewing, you can use the HTML `<embed>` tag:

```
<embed src="https://yoursite.com/wp-content/uploads/yourfile.pdf" width="600" height="500" type="application/pdf">
```

Replace `https://yoursite.com/wp-content/uploads/yourfile.pdf` with the actual URL of your PDF file.

### Method 3: Using a Plugin (Optional)

If you want advanced features like pagination, search, or zoomable PDF viewing, you can install a plugin like:

- [PDF Embedder](https://wordpress.org/plugins/pdf-embedder/)
- [Embed Any Document](https://wordpress.org/plugins/embed-any-document/)

These plugins allow you to embed PDFs using a shortcode or block, with better compatibility across themes and devices.
