The growing library of 300+ ready-to-use templates that work with all WordPress themes including Astra, Hello,...
Embeds PDFs in your pages and posts, without using JS.
Vanilla PDF Embed is a WordPress plugin that allows you to embed PDFs hosted in your site's media library directly into posts. You can either place the URL of the attachment page on its own line for a default embed or use the [pdf] shorttag for more customization options. This includes setting dimensions, titles, and specific display parameters for the PDF.
The plugin is suitable for users who want to share PDF documents on their WordPress sites without needing extensive coding knowledge. However, it does not support PDFs hosted on external websites, and the embedding functionality may vary across different web browsers due to security settings.
Best for: This plugin is best for WordPress users who need to embed PDF documents in their posts.
What it does well
Where it falls short
Vanilla PDF Embed provides a straightforward way to embed PDFs, but its limitations and lack of recent updates may affect usability for some users.
Mike Doherty's own description of Vanilla PDF Embed, lightly tidied.
To embed a PDF you’ve uploaded to your WordPress site’s media
library, simply put the URL for the attachment page in your
post on its own line. The PDF will be embedded with the
default settings at that location, as if it were using oEmbed.
Post short URL:
http://localhost/?p=9
Attachment default URL:
http://localhost/?attachment_id=9
Attachment pretty URL:
http://localhost/test/report1/
Media direct URL:
Click to access report1.pdf
This doesn’t work for PDFs hosted on other websites, or if you
need to change the parameters.
[pdf] shorttagIf the PDF isn’t in your WordPress site’s media library, or if
you want to customize any parameters for the embed, then use
the [pdf]...[/pdf] shorttag. Between the tags, you’ll provide
the URL for the PDF to embed. If the PDF is in your WordPress
site’s media library, you can either give the attachment page
URL, or the URL to the PDF file directly.
The [pdf] shorttag accepts several optional parameters:
width – sets the width of the frame the PDF is embedded in.height – sets the height of the frame the PDF is embeddedtitle – sets the title of the PDF, for use in the fallbackopen_params – sets the PDF open paramsPost short URL: [pdf width="200px"]http://localhost/?p=9[/pdf]
Attachment default URL: [pdf height="500em"]http://localhost/?attachment_id=9[/pdf]
Attachment pretty URL: [pdf title="Report 1"]http://localhost/test/report1/[/pdf]
Media direct URL: [pdf]http://localhost/wp-content/uploads/2013/11/report1.pdf[/pdf]
Change PDF open params: [pdf open_params="page=10&view=Fit"]http://localhost/?p=9[/pdf]
The PDF should be embedded in the page, with the document scaled so it fills the
embed frame horizontally. Unfortunately, embedding PDFs is not well-supported.
Unlike with images, web browsers may not automatically download and display
embedded PDFs when the page is loaded. For security reasons, some users prefer
not to allow the PDF plugin to run unless they trust the website the PDF comes
from. This generally leaves a grey rectangle that the user may click on to allow
the PDF to be downloaded and displayed.
Other plugins for libraries and archives.
The growing library of 300+ ready-to-use templates that work with all WordPress themes including Astra, Hello,...
Securely upload SVG files to your media library, with built-in sanitization and advanced features for styling...
Easily replace any attached image/file by simply uploading a new file in the Media Library edit view - a real...
HappyAddons packs Header Footer Builder, Megamenu, Single Post, Archive Page, & 500+ Ready Templates into...
CMB2 is a metabox, custom fields, and forms library for WordPress that will blow your mind.
The best WordPress templates, pattern, and layout library with 1,000+ designs built for the Gutenberg block ed...