WonderPlugin PDF Embed - Embed PDF to your WordPress

WonderPlugin PDF Embed is a plugin to embed and display PDF files on your WordPres website by using Mozilla’s PDF.js.

Features

Table of Contents

PDF Embed Tutorial

You can use the following shortcode to embed a PDF file to WordPress posts or pages:

[wonderplugin_pdf src="http://www.yourwordpresssite.com/yourdoc.pdf" width="100%" height="600px" style="border:0;"]

The PDF URL must comply with the following requirements:

  • The PDF URL is defined with the src attribute.
  • The PDF file MUST be hosted on the SAME DOMAIN as your WordPress website.
  • The PDF URL MUST be an absolute URL, that's, the URL must start with http:// or https://.
  • Make sure there are no special characters in the PDF URL, for example, apostrophes, double quotes, accented letters etc.

Shortcode attributes:

  • You can use px or % for the width and height attributes, for example, 600px or 100%.
  • By using % for the width attribute, the PDF viewer will be responsive.
  • If you use 100% for the height attribute, make sure the container of the shortcode has a proper height value.
  • You can use the style attribute to define the CSS style of the PDF viewer which is an iframe.

PDF Embed Demo

* WonderPlugin Lightbox is not a free plugin and is not hosted on WordPress.org repository.

You can use the premium plugin WonderPlugin Lightbox to open a PDF file in a lightbox popup:

1. Install the plugin WonderPlugin PDF Embed.
2. Install the premium plugin WonderPlugin Lightbox.
3. In your WordPress post or page editor, switch to Text mode, add class="wplightbox" to the <a> tag. You can also use data-width and data-height to specify the maximum size of the lightbox popup. For example:

<a href="http://www.yourwordpresssite.com/yourdoc.pdf" class="wplightbox" data-width=1200 data-height=1200>Open PDF in Lightbox</a>

The PDF file URL must comply with the following requirements:

  • The PDF URL is defined with the src attribute.
  • The PDF file MUST be hosted on the SAME DOMAIN as your WordPress website.
  • The PDF URL MUST be an absolute URL, that's, the URL must start with http:// or https://.
  • Make sure there are no special characters in the PDF URL, for example, apostrophes, double quotes, accented letters etc.

PDF Lightbox Demo

Open PDF in Lightbox

* WonderPlugin Carousel is not a free plugin and is not hosted on WordPress.org repository.

By using the premium plugin WonderPlugin Carousel, you can create a WordPress carousel of PDF files.

1. Install the plugin WonderPlugin PDF Embed.
2. Install the premium plugin WonderPlugin Carousel.
3. In the plugin WonderPlugin Carousel, step 1, click the button "Add PDF", then select a poster image and a PDF file for the carousel item.

PDF Carousel Demo