How to embed a PDF in WordPress: four ways compared
5 min read
A PDF that only downloads is a PDF most visitors never open. Embedding it puts the document on the page itself, so people can read it where they found it. WordPress gives you several ways to do that, and they behave very differently, especially on phones.
Here are the four common ones, from the simplest to the most capable, with what each looks like to the reader.
The four ways at a glance
Download link
File block
Google Drive embed
PDF viewer plugin
Reader stays on your page
No
Yes
Yes
Yes
Works on phones
Opens or downloads the file
Often not
Yes
Yes
Looks the same in every browser
No
No
Yes
Yes
Search, zoom, table of contents
Browser’s own
Browser’s own
Google’s viewer
Built in
Control over download and print
No
No
Partly
Yes
File stays on your server
Yes
Yes
No, on Google Drive
Yes
Setup
Seconds
A minute
A few minutes
A few minutes
1. A link or button to the PDF
Upload the PDF to the media library and link to it from a paragraph or a Button block. The browser then opens the PDF in its own viewer or downloads it, depending on the browser and its settings.
Good for forms, price lists and documents people want to save or print anyway.
The catch is that the reader leaves your page, and on phones the file often lands in the downloads folder rather than on screen. You also cannot see whether anyone read past the first page.
2. The WordPress File block
The block editor’s File block can show a PDF inline:
Add a File block and upload or choose the PDF.
In the block settings, turn on Show inline embed and set the height.
Publish. The PDF appears in a frame with a download button underneath.
The frame uses the browser’s built-in PDF viewer, so the toolbar, zoom and look change from browser to browser. WordPress itself warns about the main limit in the block settings: most phone and tablet browsers will not display an embedded PDF, and those visitors see only the file name and the download button.
Good for quick internal pages and audiences that read on desktop.
3. A Google Drive embed
Upload the PDF to Google Drive, share it as “Anyone with the link”, and embed the file’s preview address in an iframe:
Replace FILE_ID with the ID from the file’s sharing link and paste the code into a Custom HTML block. Only administrators and editors can add iframes, so other roles need help from one of them.
Google’s viewer works on phones and looks the same everywhere. The trade-offs: the file lives on Google’s servers rather than yours, the viewer carries Google’s branding, anyone with the link can open the original, and you depend on the sharing setting staying public.
Good for documents that already live in Google Drive and need no styling.
4. A PDF viewer plugin
A viewer plugin draws the PDF with its own viewer inside your page, so it looks and works the same in every browser and on every phone. It is the only one of the four that lets you decide how the document is shown.
With Real3D Flipbook the same PDF can be shown as a classic scrolling viewer, a sliding viewer for phones, or a book with turning pages. Here is a 28-page brochure in the scroll view:
What a viewer plugin adds over the other three:
The same experience everywhere, including phones, where a two-page spread becomes one page at a time.
Its own toolbar: zoom, full-text search, thumbnails, a table of contents from the PDF’s bookmarks, sharing and full screen.
Download and print under your control. Switch the buttons off, or keep them.
Speed. The PDF loads in pieces, so the first page appears before the rest of the file has arrived. A viewer further down the page can open in a lightbox and load nothing until it is clicked.
Your design: toolbar layout, colors and background match the site.
Analytics: with Google Analytics connected, opens, page views and link clicks are reported.
Setting it up takes a few minutes: create a flipbook from the PDF, choose the view mode and paste the shortcode into the page. Our step-by-step guide to turning a PDF into a flipbook on WordPress has screenshots of each step, and which view mode to use explains the choice between scrolling and turning pages.
Good for anything readers should actually read: catalogs, magazines, brochures, reports, manuals and menus.
Which one to use
People will download it anyway (a form, a price list): a download link.
An internal page read on desktop: the File block.
The file already lives in Google Drive and the look doesn’t matter: a Drive embed.
Anything customers should read on your site, on any device: a PDF viewer plugin.
Questions about embedding PDFs
Why doesn’t my embedded PDF show on my phone?
The File block relies on the browser’s built-in PDF viewer, and most phone and tablet browsers do not show PDFs inside a page. Visitors see a download button instead. A viewer plugin draws the pages itself, so it works on phones.
Can I stop people from downloading the PDF?
You can remove the download and print buttons in a viewer plugin, and keep the original file private by converting it to page images on your server with an addon such as PDF Tools. No method can stop a determined visitor from taking screenshots, so treat it as making copying harder, not impossible. Our guide to selling or protecting a flipbook covers members-only previews.
Is an embedded PDF good for SEO?
Search engines index PDF files on their own, but the page around the embed is what usually ranks. Give the page a real title and a few paragraphs about the document, so it can be found even when the PDF itself is not what people search for.
My PDF is too large to upload. What now?
That is the WordPress upload limit, set by your host. Ask them to raise it, or upload the file by FTP and point the viewer at its address. Large files are also slow to open; our loading speed checklist shows how to shrink them.
Does it work with Elementor?
A viewer plugin’s shortcode works in Elementor’s Shortcode widget, and Real3D also has an Elementor addon with its own widget. The File block is for the block editor only.
No WordPress, Shopify or Wix? The JavaScript library puts the same flipbook on any page. A working example in a dozen lines, then lightbox, deep links, phone settings and the two errors almost everyone hits.
Photos, scans and exported pages can become a flipbook without a PDF. When images are the better choice, which sizes and formats to use, and what you give up.
Two ways to put a flipbook on an Elementor page. The Shortcode widget costs nothing, the addon gives you a widget with live preview. Plus how to open the book from your own button.
4 min read
Turn your PDFs into flipbooks
Catalogs, magazines and brochures with a realistic page flip, on WordPress, Shopify, Wix or any website.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.