Skip to content

Add epubJsViewer 1.2.0.4 for OJS and OMP 3.5 - #527

Open
edersotto wants to merge 1 commit into
pkp:mainfrom
OJSBR:epubJsViewer-1.2.0.4
Open

Add epubJsViewer 1.2.0.4 for OJS and OMP 3.5#527
edersotto wants to merge 1 commit into
pkp:mainfrom
OJSBR:epubJsViewer-1.2.0.4

Conversation

@edersotto

@edersotto edersotto commented Aug 30, 2026

Copy link
Copy Markdown

Adds EPUB.js Viewer 1.2.0.4, a generic plugin that opens EPUB galleys (OJS) and EPUB publication formats (OMP) in the browser instead of handing the reader a download.

See it running

Editora UEMG, a live OMP 3.5 installation:

No login needed.

Credit where it belongs

This is a continuation of the original epubViewer plugin by Lepidus Tecnologia, which served Brazilian journals for years and was discontinued in 2025 because the Bibi reader by Satoru Matsushima stopped being maintained. The idea and the OJS integration are theirs. What changed is the reading engine: epub.js by FuturePress, which is still maintained.

Why this one

Without a reader, an EPUB is a download. The reader leaves the site, and whether the file opens at all depends on what happens to be installed on their device — which, for a phone, is often nothing. The gallery currently lists no EPUB reader for 3.5.

One plugin, two applications

The same code serves both, branching on Application::get()->getName():

  • OJS — ArticleHandler::view::galley and IssueHandler::view::galley
  • OMP — CatalogBookHandler::view

Both were verified by running the Cypress suite against a real 3.5 installation of each: an OJS 3.5.0-3 and an OMP 3.5.0-5. OPS shares the OJS code path (PreprintHandler::view::galley is registered), but we have not run it against an OPS installation, so it is not declared in the compatibility list here.

Packaging

  • epub.js is vendored. No request leaves the reader's browser to a CDN.
  • The download link is left untouched; the reader can still take the file.
  • 7 unit tests / 484 assertions in the PKP ApplicationPlugins suite, covering EPUB detection by mimetype and by extension on the name or the stored path — the extension has a vote because not every upload arrives with the right mimetype — and locale integrity: every locale carrying every key with no empty value, no legacy locale codes, and every key used in a template present in locale/en.
  • 3 Cypress specs. They discover the content instead of hard-coding an id, so the same file runs on OJS, OPS and OMP.
  • 38 locales, matching the set carried by the generic plugins PKP maintains.
  • GPL-3.0, PHP 8.2+.

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 (0a8d70a74e43214604abb8a8c41e9f61).
  • The tarball unpacks as a single epubJsViewer/ 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.

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