Drupal is a registered trademark of Dries Buytaert
Release: File Hash 3.3.1 Minor update available for module filehash (3.3.1). Release: File Hash 2.1.2 Minor update available for module filehash (2.1.2). Release: File Hash 8.x-1.13 Minor update available for module filehash (8.x-1.13). Release: TFA Email OTP Plugin 1.1.0 Minor update available for module tfa_email_otp (1.1.0). Release: CRM Search API 1.0.0 Initial release available for module crm_search_api (1.0.0)! Release: Opensolr Search 4.2.1 Minor update available for module opensolr_search (4.2.1). Release: Captcha Keypad 2.0.1 Minor update available for module captcha_keypad (2.0.1). Release: Save & Edit 3.0.0-alpha2 New alpha version released for module save_edit (3.0.0-alpha2). Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs. Module Revived: CKEditor Anchor Link 3.0.5 Module anchor_link updated after 6 months of inactivity (3.0.5).

ePub Generator

3 sites Security covered
View on drupal.org

This module allows you to convert your Drupal content into ePub ebooks with a single click. It supports generating ebooks from entire book outlines or individual nodes, preserving content structure and metadata. The generated ebooks are accessible and can be customized for branding and layout.

Turn your Drupal content into real ebooks -- no external binaries, no headless browsers, no special hosting.

Your reports, manuals, and documentation live in Drupal. Your readers want them on e-readers, tablets, and phones -- offline, accessible, and portable. ePub Generator bridges that gap: one click on any node, or on any Book outline, produces a valid ePub 3 file with proper publishing metadata, a navigable table of contents, and accessibility baked in.

Because it's pure PHP (built on the zero-dependency php-epub library), it runs anywhere Drupal runs, including managed hosting where installing wkhtmltopdf or a headless Chrome is not an option. All it needs is the `zip` and `dom` extensions your host already has.

Turn Book outlines into actual books

The Book Integration submodule is the flagship feature. If your organization already maintains structured long-form content in Book outlines, you get publishing for free:

- The entire book tree becomes a multi-chapter ebook with a hierarchical table of contents that mirrors your outline.
- Real publishing metadata -- author, ISBN, publisher, cover image, edition, rights -- is read from fields on your book's root node via a configurable field mapping. Your editors keep working exactly as they do today.
- Don't have the metadata fields yet? One click creates and maps them all -- author, ISBN, publisher, cover, description, edition, and the fixed-layout fields -- on any content type you choose.
- A "Download ePub" tab appears on every node in the book.

Read in the browser, no download required

The Viewer submodule adds a "Read online" tab next to "Download ePub" -- an in-browser reader built on epub.js, with a table of contents, page-turning or continuous scrolling, progress, fullscreen, keyboard navigation, and automatic position resume. On a Book node, it opens the entire assembled book. A field formatter does the same for `.epub` files uploaded to file fields.

Accessibility is not an afterthought

Every generated ebook includes schema.org accessibility metadata (access modes, features, structural navigation) per the EPUB Accessibility specification, plus an ePub 2 NCX fallback for older reading systems -- relevant if you have Section 508, WCAG, or European Accessibility Act obligations for the documents you publish.

Features

- One-click downloads: a "Download ePub" tab on nodes, a route for any content entity, and Drush commands (`epub:generate`, `epub:generate-book`) for automation.
- In-browser reading: a "Read online" tab, an inline reader for uploaded ePub files, and response caching so books aren't rebuilt on every request.
- You control what's exported: a dedicated "ePub" view mode lets each content type define exactly which fields appear in ebook output, independent of the web display.
- Clean output: rendered HTML is converted to valid XHTML with Drupal UI (tabs, contextual links, admin links) stripped automatically. Local images are embedded; SVG and MathML are preserved for charts and equations.
- Fixed-layout support: produce pixel-perfect, pre-paginated ebooks (dashboards, illustrated content, children's books) -- book-wide or per chapter, with viewport, spread, and orientation control.
- Your branding: ship a sensible default stylesheet or point the module at your own CSS.
- Markdown submodule: attach `.md` files to any file field and offer them as ePub downloads, with YAML front matter for metadata and automatic chapter splitting on headings.

Requirements

- Drupal 11.1+, PHP 8.3+ with `zip`, `dom`, and `libxml`
- andileco/php-epub (installed automatically via Composer)
- Book Integration submodule: the Book module
- Markdown submodule: `league/commonmark`
- Viewer submodule: the epub.js and JSZip JavaScript libraries (see below). Sites with a strict Content Security Policy need `frame-src blob:; child-src blob:`.

Installation

composer require drupal/epub_generator
drush en epub_generator epub_generator_book

Then configure defaults at Administration > Configuration > Content authoring > ePub Generator. Under the Book field mapping tab you can create and map all metadata fields to a content type in one step, or map existing fields yourself.

The Viewer submodule needs two JavaScript libraries. Add them to the `repositories` section of your project's `composer.json`:

{
    "type": "package",
    "package": {
        "name": "futurepress/epubjs",
        "version": "0.3.93",
        "type": "drupal-library",
        "dist": {
            "type": "tar",
            "url": "https://registry.npmjs.org/epubjs/-/epubjs-0.3.93.tgz"
        }
    }
},
{
    "type": "package",
    "package": {
        "name": "stuk/jszip",
        "version": "3.10.1",
        "type": "drupal-library",
        "dist": {
            "type": "tar",
            "url": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz"
        }
    }
}

Then:

composer require futurepress/epubjs:0.3.93 stuk/jszip:3.10.1
drush en epub_generator_viewer

AI Acknowledgement

AI was instrumental in the development of this module, but I reviewed and tested it thoroughly.

Activity

Tracked releases
3
Tracked since
Jul 2026
Latest release
3 weeks ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Release date
1.0.1 Stable Jul 30, 2026
1.0.0 Stable Jul 21, 2026
1.0.x-dev Dev Jul 11, 2026