Skip to content

Add pdfFlipbook 0.3.0.3 for OMP 3.5 - #529

Open
edersotto wants to merge 3 commits into
pkp:mainfrom
OJSBR:pdfFlipbook-0.3.0.1
Open

Add pdfFlipbook 0.3.0.3 for OMP 3.5#529
edersotto wants to merge 3 commits into
pkp:mainfrom
OJSBR:pdfFlipbook-0.3.0.1

Conversation

@edersotto

@edersotto edersotto commented Aug 30, 2026

Copy link
Copy Markdown

Adds PDF Flipbook 0.3.0.3, a generic plugin for OMP 3.5 that offers a page-turning reading mode for PDF monographs.

See it running

Editora UEMG, a live OMP 3.5 installation:

No login needed.

What it does

A Flip through button appears next to every PDF on the book page and opens a full-viewport reader: two-page spread, page-turn animation, drag and keyboard navigation, zoom from 50% to 250%, full screen, and a link back to the ordinary PDF view.

Built on StPageFlip by Nodlik (MIT) and PDF.js by Mozilla (Apache-2.0). Both are vendored in the package — no request leaves the reader's browser to a CDN.

It never replaces the native viewer, and that is deliberate

The flipbook paints pages to canvas: there is no text selection, no search and no screen-reader access. That is exactly why it is an alternative and never the default. The ordinary PDF link stays where it was and remains the primary click; the button is added beside it, and the flipbook links back.

Pages are rendered lazily around the current spread with a bounded cache, so a long monograph does not have to load in full before the first page appears.

Packaging

  • 6 unit tests / 638 assertions in the PKP ApplicationPlugins suite: the dispatch rule — only PDF, only with the parameter present, never EPUB, audio or an empty type — and locale integrity, including every key used in a template being present in locale/en.
  • 3 Cypress specs: the button appearing next to the ordinary PDF link, the pages actually rendering, and navigation, zoom and the way back. The zoom assertion exists for a reason: zooming destroys and rebuilds the StPageFlip instance, and a bug once remounted it into an orphan node, leaving a blank screen with no console error at all.
  • 38 locales, matching the set carried by the generic plugins PKP maintains.
  • GPL-3.0, PHP 8.2+, tested on OMP 3.5.0-5.

On the version number

It is released as 0.3.0.3 rather than 1.0.0.0 because it is young — it has been running on a live installation, with the tests above, but for weeks rather than years. Say the word if you would rather it declare 1.0.0.0 before being listed.

Checks run before opening this

  • xmllint --schema ./plugins.xsd ./plugins.xml --noout — validates.
  • Package URL resolves anonymously and the md5 in the entry matches the published tarball (4b8b916a88b1ddc5ad239c3f0dff546f).
  • The tarball unpacks as a single pdfFlipbook/ directory.

Notes

Submitted as reviewed, following what other third-party plugins declare here. Happy to adjust anything in the entry if you would like it different.

Updated to 0.3.0.3

The entry points at 0.3.0.3. Two rendering fixes since the version first submitted, both found while testing on a press whose books have chapters:

  • The button never appeared on a chapter's own landing page — the plugin hooked Templates::Catalog::Book::Details, and OMP calls Templates::Catalog::Chapter::* there instead. Both are now registered.
  • The button was injected as a bare anchor and relied on the theme styling any link near it, which is true inside .pub_format_* but not in a chapter list. It now copies the class list of the PDF link beside it, so it matches that link in any context and under any theme.

@edersotto edersotto changed the title Add pdfFlipbook 0.3.0.1 for OMP 3.5 Add pdfFlipbook 0.3.0.2 for OMP 3.5 Aug 30, 2026
@edersotto edersotto changed the title Add pdfFlipbook 0.3.0.2 for OMP 3.5 Add pdfFlipbook 0.3.0.3 for OMP 3.5 Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant