Elementor addon offering 120+ widgets and templates — Elementor Gallery, Slider, Form, Post Grid, Menu, Accord...
Embed a beautiful PDF viewer into pages.
PDF.js Viewer is a WordPress plugin that allows you to embed PDF documents directly into your posts and pages using a Gutenberg block or shortcode. It utilises Mozilla's PDF.js library to display PDF files within web browsers, providing a user-friendly interface for viewing documents online.
The plugin features an Elementor widget, customizable buttons, and supports mobile devices. It also includes functionalities such as page navigation, search capabilities, and the ability to enter passwords for protected PDFs. This plugin is suitable for users who need to display PDF content on their WordPress sites, particularly those using Gutenberg or Elementor.
Best for: This plugin is best for WordPress users who need to display PDF documents on their sites.
What it does well
Where it falls short
PDF.js Viewer offers a straightforward solution for embedding PDFs in WordPress, with a range of useful features for both site owners and visitors.
Ben Lawson's own description of PDF.js Viewer, lightly tidied.
Incorporate Mozilla’s PDF.js viewer into your pages and posts via a Gutenberg block or a simple shortcode. PDF.js is a javascript library for displaying pdf pages within browsers.
Features:
Shortcode Syntax:
[pdfjs-viewer attachment_id=123 viewer_width=600px viewer_height=700px fullscreen=true download=true print=true]
Or use a direct URL:
[pdfjs-viewer url=http://www.website.com/test.pdf viewer_width=600px viewer_height=700px fullscreen=true download=true print=true]
Shortcode Parameters:
attachment_id (recommended): ID of the media file in WordPress media libraryurl (alternative): Direct URL to PDF file. Use attachment_id when possible for better security.viewer_width (optional): Width of the viewer (default: 100%)viewer_height (optional): Height of the viewer (default: 800px)fullscreen (optional): true/false, displays fullscreen link above viewer (default: true)fullscreen_text (optional): Text for the fullscreen link (default: View Fullscreen)
%20 in place of spaces.If you’re using Elementor, the PDF.js Viewer Elementor widget is automatically available in the Page Builder.
When you update the plugin, editors may see an admin banner explaining that Gutenberg could show an “Attempt Block Recovery” prompt when editing older posts with PDFs. Clicking it updates the block format; it does not affect what visitors see. You can dismiss the banner, and it won’t reappear until a future release enables it again.
This WordPress plugin is licensed under GPLv2 or later.
PDF.js (included in this plugin) is developed by Mozilla and licensed under the Apache License 2.0. See the PDF.js repository for details.
Other plugins for extending a page builder.
Elementor addon offering 120+ widgets and templates — Elementor Gallery, Slider, Form, Post Grid, Menu, Accord...
Join millions who empower their websites with ElementsKit Elementor Addons. Get templates, & 100+ widgets...
Elementor addons with 18+ free widgets, Header & Footer Builder, WooCommerce widgets & templates. Trus...
Elementor Carousel, Mega Menu, Posts List/Slider, WooCommerce Widgets, Display Conditions, AI Abilities, Prema...
Elementor templates, Header footer builder, Elementor Post Grid, Woocommerce Grid builder, Slider, Forms, Gall...
Disable Gutenberg Block Editor and restore the Classic Editor and original Edit Post screen (TinyMCE, meta box...