=== Turnquill Flipbook ===
Contributors: theconcreteprotector
Tags: flipbook, pdf viewer, magazine, catalogue, ebook
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 0.3.1
License: GPL-3.0-only
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Publish PDFs and image sets as interactive flipbooks. Embed them with a block, shortcode, or iframe.

== Description ==

Publish magazines, catalogues, brochures, and other documents as flipbooks. Upload a PDF or arrange images from the Media Library, then add the flipbook to a WordPress page or embed it on another site.

* Runs entirely on your own site. There is no account, external service, upsell, or paid version.
* Display the reader inline or open it from a cover in a dialog. Each flipbook also has its own page.
* Turn pages with a swipe, drag, keyboard, or buttons. Readers can zoom, browse thumbnails, and share a link to a specific page.
* Read in single-page or two-page layout, including right-to-left reading order. The reader respects the device's reduced-motion setting.
* Search text PDFs, follow embedded links and bookmarks, and open password-protected PDFs. Print and download controls are available for PDFs.
* Set branding, accent colour, and theme site-wide or per flipbook.
* Add links, page jumps, or videos to regions of image pages. Image pages use their Media Library alt text.

== Installation ==

1. In WordPress, go to Plugins > Add New and install Turnquill, or upload the release ZIP using Upload Plugin. Activate the plugin.
2. Go to Flipbooks > Add New, choose a PDF or page images from the Media Library, and publish.
3. Add the Flipbook block to a page and select your publication. You can also copy the shortcode or iframe from the flipbook editor's Embed box.
4. Set site-wide branding and display defaults under Flipbooks > Settings.

== Frequently Asked Questions ==

= How do I use the shortcode? =

Use `[turnquill id="12"]` or select a publication by slug with `[turnquill slug="spring-catalogue"]`. Add `page="4"` to set the starting page, `height="640px"` to set the height, or `class="catalogue"` to add a CSS class. Use `mode="lightbox"` to open the reader from a button that uses the featured image as the cover when one is set.

= Why can't readers search my PDF? =

Search needs a text layer. Run scanned documents through OCR before uploading. Image flipbooks have no full-text search.

= How do I add links or videos to image pages? =

In the Display box, use the Links and videos on pages field. Enter JSON keyed by zero-based page index. Each region needs a `rect` with left, top, width, and height expressed as fractions of the page. Add one action using `url`, `video` (a direct file URL), or `page` (a zero-based destination). Add a descriptive `name` for the accessible control label.

`{"0":[{"rect":[0.1,0.1,0.3,0.2],"url":"https://example.com","name":"Visit the catalogue site"}]}`

= Who can manage flipbooks? =

Administrators and editors receive flipbook capabilities when the plugin is activated. Site administrators can grant those capabilities to other roles.

= Are my files private? =

Flipbook visibility and passwords control access to the flipbook page. Anyone with a Media Library file's public URL can still request that file. Use server-level access controls for confidential files. The download setting controls the visibility of the reader's download button.

= What happens when I delete the plugin? =

Turnquill removes its settings and capabilities. Flipbook posts, their metadata, and uploaded media remain available when you reinstall.

== Screenshots ==

1. A two-page spread with the desktop reader controls.
2. The sharing dialog with the option to start at the current page.

== Privacy ==

Turnquill bundles the reader and PDF engine and runs without an external service or account. The visitor's browser may contact another host if you configure externally hosted media or a visitor follows an external link. Videos assigned to image regions load when the visitor plays them.

View counting is off by default. Enable it under Flipbooks > Settings > Privacy. When enabled, the site stores a visit total for each flipbook and uses a salted hash of the visitor's IP address and browser information for up to 30 minutes to deduplicate opens. The counter sets no cookies. Suggested policy wording is available under Settings > Privacy.

== Source Code and Credits ==

The release includes the compiled reader, TypeScript source, and build instructions in `dev/README.md`. Installation and use only require WordPress and PHP.

Turnquill source and original artwork are licensed under GPL-2.0-or-later. The combined distribution uses GPL version 3 for compatibility with Apache-2.0 PDF.js. See LICENSE and LICENSE-GPL-3.0.

The bundled PDF.js runtime is from Mozilla's PDF.js 6.5.438 release. View its source and build tools at https://github.com/mozilla/pdf.js/tree/v6.5.438. Upstream notices for the engine, fonts, CMaps, colour profiles, and decoders are included in `assets/viewer/pdfjs/`.

== Changelog ==

= 0.3.1 =
* New plugin name: Turnquill Flipbook. Text domain and identifiers now use the turnquill prefix.

= 0.3.0 =
* Translate the reader interface and add video regions to image pages.
* Make view counting opt-in and supply suggested privacy policy text.
* Preserve image alt text, hotspots, and page jumps when an image attachment is missing.
* Remove plugin capabilities across multisite when uninstalling.
* Remove the experimental JSON importer and include the viewer source in the release.

= 0.2.3 =
* Add directory assets and improve escaping and request sanitization.

= 0.2.2 =
* Include the GPL license and retain third-party notices.

= 0.2.1 =
* Improve toolbar layout and navigation contrast on phones.

= 0.2.0 =
* Improve keyboard and dialog navigation, add standalone flipbook pages, and show publication details in the block editor.

= 0.1.0 =
* Initial release.

== Upgrade Notice ==

= 0.3.0 =
View counting is now off by default. Existing totals are retained. To resume counting, enable it under Flipbooks > Settings > Privacy.
