Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Embed a PDF in WordPress

Show a PDF inside a post or page with the File block, a plugin, or Google Drive.

WordPress2 min read4 steps17 screenshots

Method 1: The File block

WordPress has a block for files. It shows the PDF and a download button.

Step 1: Add the File block

Open the post or page. Click the + icon, type file in the search and click the File block.

The block inserter
The File block

Step 2: Upload the PDF

In the block, click Upload to add a new file, or Media Library to pick one you have uploaded.

Uploading the PDF

Pick the file and click Open.

Choosing the PDF

Step 3: Check the result

The PDF shows with a Download button. Turn on Show inline embed in the block settings if you want the PDF to show on the page.

The embedded PDF with a download button

Method 2: A plugin

A plugin gives you more options, such as a full-screen view.

Step 1: Install a plugin

Go to Plugins, then Add New. Search for EmbedPress, then install and activate it.

Installing EmbedPress

Step 2: Embed the PDF

  1. In the post, click +, search for embed and click the EmbedPress block.
    The EmbedPress block
  2. Click Media Library and pick your PDF.
    Opening the Media Library
  3. Choose the file and click Select.
    Selecting the PDF
  4. The PDF appears in the editor.
    The PDF in the editor

Step 3: Change the settings

The plugin lets you set the size, the toolbar, downloads and more.

The embed options

Method 3: Google Drive

Step 1: Upload the PDF to Google Drive.

Step 2: Right-click the file and click Share. Set the access so that anyone with the link can view it.

Sharing the file
Setting link access

Step 3: Open the file in Google Drive. Click the three dots at the top right, then Open in new window. Click the three dots again, choose Embed item and copy the code.

The Embed item option
The embed code

Step 4: In WordPress, add a Custom HTML block and paste the code.

The Custom HTML block

Preview the page. The PDF shows in a frame.

The Drive PDF in the post
Tip: Large PDFs slow down a page. Compress the file first and offer a download link for big documents.

Quick recap

  • The File block is the fastest method.
  • EmbedPress adds a nicer viewer.
  • A Google Drive iframe saves space on your hosting.