EPUB import

Book tools ::: booktool_epubimport
Maintained by Robert Watson
Import EPUB ebooks into Moodle Book resources with support for reflowable and fixed-layout formats.
Latest release:
13 downloads
1 fans
Current versions available: 1

EPUB Import for Book allows teachers and administrators to import EPUB ebooks directly into Moodle's Book resource. It supports both reflowable and fixed-layout EPUB formats.

Features:

Reflowable EPUB import — Automatically splits ebooks into Book chapters using the EPUB's table of contents. Preserves headings, images, links, and formatting. Falls back to heading-based splitting when no TOC is present.,
Fixed-layout EPUB import — Extracts page images and creates one chapter per page, suitable for page-image ebooks (textbooks, comics, illustrated guides).,
Two import workflows — Create a new Book resource from an EPUB, or replace the contents of an existing Book.,
Image and media handling — All embedded images are imported through Moodle's file API with proper @@PLUGINFILE@@ rewriting.,
Security — XXE (XML External Entity) attack mitigation, input sanitization, and capability-based access control.,
Privacy API — Full GDPR compliance. The plugin does not store any user data.,
PHPUnit tests — Includes test suite with fixture EPUBs for parser and TOC mapper validation.,

Requirements: PHP 8.1+, PHP zip extension.

Optional: For fixed-layout EPUBs that use CSS-positioned text overlays (e.g., some digital textbooks), a standalone Node.js pre-rendering tool is included in the cli/ directory. This is not required for standard EPUB import.

This plugin is a complete rewrite of the original Lucimoo EPUB import plugin by Mikael Ylikoski, modernized for Moodle 4.5+ with a modular OOP architecture, namespaced classes, and current Moodle API usage.

Screenshots

Screenshot #0

Contributors

Robert Watson (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments

Show comments
Please login to post comments