Drupal is a registered trademark of Dries Buytaert
Release: Drupal 11.4.5 Update released for Drupal core (11.4.5)! Release: Drupal 10.6.15 Update released for Drupal core (10.6.15)! Release: Trash 3.0.32 Minor update available for module trash (3.0.32). Release: Node View Permissions 2.0.3 Minor update available for module node_view_permissions (2.0.3). Release: Raven: Sentry Integration 3.2.33 Minor update available for module raven (3.2.33). Release: Raven: Sentry Integration 4.0.41 Minor update available for module raven (4.0.41). Release: Raven: Sentry Integration 5.0.25 Minor update available for module raven (5.0.25). Release: Raven: Sentry Integration 6.0.17 Minor update available for module raven (6.0.17). Module Revived: Entity Browser 8.x-2.16 Module entity_browser updated after 11 months of inactivity (8.x-2.16). Security Coverage: View Mode Selector Module view_mode_selector now has official Drupal security advisory coverage.

This module provides a framework to convert EPUB files into structured content on your Drupal site. It creates 'Reader Publication' and 'Reader Chapter' content types, automatically imports EPUB content into chapters, and allows for customization of how this content is displayed and managed.

About the EPUB Reader

This module is intended as a base framework for creating a digital version of a publication from an EPUB (eg, exported from InDesign).

What this module does

  1. Creates two node types: 'Reader Publication' and 'Reader Chapter'
  2. Upload the EPUB file into a new 'Reader publication' and save
  3. A batch process runs to automatically extract the EPUB and use the 'Spine' of the EPUB create (or update) Reader Chapters by EPUB Chapter ID
  4. Allows you to subsequently re-order, modify, and add additional chapters (eg, adding a video where the print publication would skip such rich media

Where it needs to be extended (ie, why is it a 'framework')?

  1. The module extracts the individual chapter xhtml files and during the batch import provides an instance of HtmlPageCrawler as well as the Reader Chapter being processed as an Event
  2. Subscribe to the Event (see the example module) and decide how you want to display it on your site. You could extract all contents as is to a WYSIWYG body field. You could extract contents into Paragraphs to create a more component-based approach.

What is HtmlPageCrawler

HtmlPageCrawler extends Symfony DomCrawler. It provides a jQuery-like approach to finding elements. For instance if you properly assign classes to your InDesign files, you could modify the title by grabbing the title of the chapter.

$title = $crawler->filter('.chapter_header')->first()->html();
$reader_chapter_node->set('title', $title);

Or similarly you could put quotes into a separate field:

foreach ($crawler->filter('blockquote') as $quote) {
  $reader_chapter_node->field_quotes[] = $quote->html();
}

Please see the documentation from HtmlPageCrawler and Symfony DomCrawler for more information.

Installation instructions

Install via composer to get the appropriate dependencies:

composer require drupal/epub_reader_framework

If you are not using composer you must make the following three dependencies available:

        "symfony/dom-crawler": "^3.0.0|^4.0.0|^5.0.0",
        "symfony/css-selector": "^3.0.0|^4.0.0|^5.0.0",
        "wa72/htmlpagedom": "^2.0.0"

Other modules to consider

If you just want to display an EPUB but not actually convert it to Nodes / Paragraphs / other Entities, you can simply use the epub module.

Work in progress

Soapbox has open sourced the foundation for creating Reader's for a InDesign (EPUB) files. Soapbox also offers the other way around - generating beautiful print-ready PDFs from long-form and short-form digital content. It uses a tool called Puppeteer to be able to achieve in print what can be achieved in digital (minus the interactivity of course).

Activity

Tracked releases
1
Tracked since
Jun 2026
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
2.0.0-alpha11 Pre-release Jun 22, 2026