=== PressFlip PDF Viewer ===
Contributors: habibnoori
Tags: pdf viewer, embed pdf, pdf reader, pdfjs, document viewer
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed responsive PDF documents with vertical scrolling, zoom, navigation, print, download, shortcodes, and a Gutenberg block.

== Description ==

PressFlip PDF Viewer is a responsive WordPress PDF viewer for embedding PDF documents directly inside posts, pages, custom post types, widgets, and templates.

The plugin uses a locally bundled copy of Mozilla PDF.js to display documents with normal vertical scrolling. Visitors can read multi-page PDFs, move between pages, adjust zoom, use Fit to Page or Fit to Width, print the document, or download the original PDF when those controls are enabled.

Create reusable PDF viewers from the WordPress Media Library or a direct public PDF URL. Add a viewer with the PressFlip Gutenberg block or the `[pressflip_pdf]` shortcode. The interface is responsive and supports multiple independent PDF viewers on the same page.

= Main Features =

* Responsive PDF viewer with vertical page scrolling.
* WordPress Media Library and external PDF URL support.
* Gutenberg PDF viewer block and flexible shortcode.
* Previous and next page navigation with current and total page numbers.
* Zoom in, zoom out, reset, Fit to Page, and Fit to Width controls.
* Optional PDF download and print buttons.
* Mobile-friendly toolbar and keyboard navigation.
* Multiple PDF viewers can run independently on one page.
* Saved viewer settings for consistent document embeds.
* No page-flip animation, tracking, paid service, or iframe-based primary renderer.

= Shortcode Examples =

Embed a saved viewer:

`[pressflip_pdf id="123"]`

Embed a public PDF URL directly:

`[pressflip_pdf url="https://example.com/document.pdf"]`

Override selected viewer settings:

`[pressflip_pdf id="123" width="100%" height="750px" zoom="110" download="yes" print="yes"]`

== Installation ==

1. Upload the plugin ZIP from **Plugins > Add New Plugin > Upload Plugin**.
2. Activate **PressFlip PDF Viewer**.
3. Open **PressFlip PDF Viewer > Add New Viewer**.
4. Select a PDF from the Media Library or enter a direct public PDF URL.
5. Publish the viewer and copy its generated shortcode, or insert the PressFlip block in the WordPress editor.

== Frequently Asked Questions ==

= Can I embed PDFs uploaded to the WordPress Media Library? =

Yes. Create a viewer, select **Media Library** as the source, and choose a PDF file.

= Can I embed a PDF from another website? =

Yes, provided the URL points directly to a publicly accessible PDF and the remote server permits browser CORS requests. When the remote host blocks CORS, upload the file to the WordPress Media Library instead.

= Does the plugin support Elementor? =

Yes. Add the generated `[pressflip_pdf]` shortcode with Elementor's Shortcode widget.

= Can I disable print or download? =

Yes. Print, download, navigation, zoom, and toolbar controls can be enabled or disabled in viewer settings or shortcode attributes.

= Does the viewer use a page-flip animation? =

No. PDF pages are displayed with normal vertical scrolling for a familiar document-reading experience.

== Third-Party Libraries ==

PressFlip PDF Viewer includes Mozilla PDF.js version 3.2.146.

* Library: PDF.js
* Copyright: Mozilla and PDF.js contributors
* License: Apache License 2.0
* Runtime files: `assets/pdfjs/pdf.min.js` and `assets/pdfjs/pdf.worker.min.js`
* Human-readable upstream source: https://github.com/mozilla/pdf.js/tree/v3.2.146
* Upstream build instructions: https://github.com/mozilla/pdf.js/tree/v3.2.146#building-pdfjs

The PDF.js display library and worker are bundled locally. No executable PDF viewer code is loaded from a third-party CDN.

== Source Code ==

PressFlip's own JavaScript and CSS are distributed in human-readable form and require no build step:

* `admin/js/pressflip-admin.js`
* `public/js/pressflip-viewer.js`
* `blocks/pdf-viewer/index.js`
* `admin/css/pressflip-admin.css`
* `public/css/pressflip-viewer.css`
* `blocks/pdf-viewer/editor.css`
* `blocks/pdf-viewer/style.css`

The minified third-party PDF.js runtime files are generated by the upstream Mozilla PDF.js project. Their maintained source code and build instructions are linked in the Third-Party Libraries section above.

== Privacy ==

PDFs render in the visitor's browser. PressFlip PDF Viewer does not collect viewing analytics or send document data to a tracking service. In external URL mode, the visitor's browser connects directly to the third-party host serving the PDF.

== Changelog ==

= 1.0.0 =

* Initial public release.
* Added responsive PDF.js rendering with vertical scrolling.
* Added Media Library and external PDF URL sources.
* Added shortcode and Gutenberg block support.
* Added page navigation, zoom, Fit to Page, and Fit to Width controls.
* Added optional print and download controls.
* Added responsive toolbar compatibility for Elementor and WordPress themes.
