=== PDF viewer for Elementor & Gutenberg ===
Contributors: kazbekkadalashvili
Tags: pdf, pdf viewer, elementor, gutenberg, embed
Donate link: https://www.buymeacoffee.com/kazbekkada9
Requires at least: 6.3
Tested up to: 7.1
Stable tag: 1.5.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed PDF files into Elementor and Gutenberg pages with the PDF.js viewer.

== Description ==

The <b>"PDFjs Viewer for Elementor & Gutenberg"</b> plugin allows you to embed PDF files into your pages with ease. It adds a PDF Viewer widget to Elementor and a PDF Viewer block to Gutenberg, so you can add PDF files to your website without any coding knowledge. Your visitors can read, search, zoom and print PDF files right on the page.

The plugin is user-friendly and easy to use. Upload your PDF file to the WordPress media library and add it with the PDF Viewer widget or block.

Features:

* PDF Viewer widget for Elementor
* PDF Viewer block for Gutenberg (works without Elementor)
* PDF file from the media library or by URL
* Elementor dynamic tags, for example a custom field with the PDF URL
* Initial zoom, initial page and sidebar
* Hide the toolbar, download or print buttons
* Viewer background color
* Pages made with the "PDF Viewer for Elementor" plugin keep working
* Mozilla PDF.js 6.4.299 viewer

<a href="https://www.buymeacoffee.com/kazbekkada9"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=☕&slug=kazbekkada9&button_colour=FF5F5F&font_colour=ffffff&font_family=Lato&outline_colour=000000&coffee_colour=FFDD00" /></a>

== Installation ==

1. Install the plugin through the 'Plugins' screen in WordPress, or upload the plugin files to the `/wp-content/plugins/pdfjs-viewer-for-elementor` directory.
1. Activate the plugin through the 'Plugins' screen in WordPress.
1. Elementor: add the PDF Viewer widget from the Basic category and choose a PDF file.
1. Gutenberg: add the PDF Viewer block and choose a PDF file.

== Frequently Asked Questions ==

= The PDF file is not loaded, what can I do? =

PDF.js can open only PDF files from your own site. Files from another domain or a CDN are blocked by the browser. Upload the file to your media library and choose it from there.

= Which browsers are supported? =

Current versions of Chrome, Edge, Firefox and Safari 18 or newer. Old browsers, like Safari on iOS 15, are not supported by PDF.js.

= Can visitors still download the PDF when the download button is hidden? =

Yes. The browser needs the file to show it, so hiding the button doesn't protect the file. Don't publish files that must stay private.

= I used the "PDF Viewer for Elementor" plugin, do I need to rebuild my pages? =

No. Deactivate that plugin and the PDF viewers on your pages are shown by this plugin. PDF files from other sites are shown as a link.

= Do JavaScript actions in PDF forms work? =

No. JavaScript inside PDF files is disabled for security reasons. Forms can still be filled in.

== Third-party libraries ==

* PDF.js 6.4.299 by Mozilla, Apache License 2.0, https://github.com/mozilla/pdf.js

== Changelog ==

= 1.5.0 =
* Add initial zoom, initial page and sidebar options
* Add options to hide toolbar, download and print buttons
* Add background color option
* Add PDF URL source with dynamic tags support
* Add compatibility with the "PDF Viewer for Elementor" plugin widgets

= 1.4.0 =
* Update PDF.js to 6.4.299 (security fix)
* Rebuild Gutenberg block without third-party dependencies
* Fix escaping in widget editor template
* Fix PDF URLs with special characters
* Add dynamic tags support
* Compatibility with WordPress 7.1 and Elementor 4.3

== Upgrade Notice ==

= 1.5.0 =
New viewer options: zoom, page, sidebar, toolbar, download and print buttons, background color.

= 1.4.0 =
Security update: PDF.js 6.4.299. Compatibility with WordPress 7.1 and Elementor 4.3.
