PHPackages                             rampmaster/phpepub - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. rampmaster/phpepub

ActiveLibrary

rampmaster/phpepub
==================

Package to create and stream e-books in the ePub 2.0 and 3.0 formats.

1.1.1(3mo ago)01501LGPL-2.1PHPPHP ^8.2CI passing

Since Jan 29Pushed 3mo agoCompare

[ Source](https://github.com/rampmaster/phpepub)[ Packagist](https://packagist.org/packages/rampmaster/phpepub)[ Docs](https://github.com/rampmaster/phpepub)[ RSS](/packages/rampmaster-phpepub/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (9)Versions (5)Used By (1)

PHPePub
=======

[](#phpepub)

[![CI](https://github.com/rampmaster/phpepub/actions/workflows/ci.yml/badge.svg)](https://github.com/rampmaster/phpepub/actions/workflows/ci.yml)[![License](https://camo.githubusercontent.com/e7a46e7a312debd4f79ea233a5ca6a51982703fc4bb11d90c69ba81420b3757b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4c47504c253230322e312d626c75652e737667)](https://opensource.org/licenses/LGPL-2.1)

**PHPePub** is a PHP library that allows you to generate ePub electronic books on the fly. It supports most of the **EPUB 2.0.1** specification and includes robust support for **EPUB 3.0**, **3.0.1**, **3.1**, and **3.2**, enabling the creation of modern, accessible e-books.

This project is a modernized fork of the original [grandt/phpepub](https://github.com/Grandt/PHPePub) library, updated for PHP 8.2+ and enhanced with new features like accessibility metadata, media overlays, and AZW3 export capabilities.

Features
--------

[](#features)

- **Multi-version Support**: Generate valid EPUB 2.0.1, 3.0, 3.0.1, 3.1, and 3.2 files.
- **Accessibility (A11y)**: Built-in methods to add Schema.org accessibility metadata (essential for European Accessibility Act compliance).
- **Media Overlays**: Support for SMIL to create "Read Aloud" books with synchronized audio.
- **Kindle Support**: Export to AZW3 (Kindle Format 8) using an external converter (Calibre).
- **Modern PHP**: Fully compatible with PHP 8.2 and above.
- **CI/CD Ready**: Includes GitHub Actions workflows for automated testing and validation with `epubcheck`.

Installation
------------

[](#installation)

Install the library via Composer:

```
composer require rampmaster/phpepub
```

Basic Usage
-----------

[](#basic-usage)

Here is a simple example of how to generate an EPUB 3.2 book:

```
