PHPackages                             kiwilan/php-ebook - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. kiwilan/php-ebook

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

kiwilan/php-ebook
=================

PHP package to read metadata and extract covers from eBooks, comics and audiobooks.

3.0.09(8mo ago)3414.6k↓37.5%10[2 issues](https://github.com/kiwilan/php-ebook/issues)[2 PRs](https://github.com/kiwilan/php-ebook/pulls)1MITPHPPHP ^8.1CI passing

Since Apr 1Pushed 4mo ago2 watchersCompare

[ Source](https://github.com/kiwilan/php-ebook)[ Packagist](https://packagist.org/packages/kiwilan/php-ebook)[ Docs](https://github.com/kiwilan/php-ebook)[ GitHub Sponsors](https://github.com/kiwilan)[ RSS](/packages/kiwilan-php-ebook/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (85)Used By (1)

PHP eBook
=========

[](#php-ebook)

[![Banner with eReader picture in background and PHP eBook title](https://raw.githubusercontent.com/kiwilan/php-ebook/main/docs/banner.jpg)](https://raw.githubusercontent.com/kiwilan/php-ebook/main/docs/banner.jpg)

[![php](https://camo.githubusercontent.com/2d44ab343cf5a2aab849b6954ee31dd09ba1f1f11bf0f168ccd08e186ec060b1/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f7374796c653d666c6174266c6162656c3d504850266d6573736167653d76382e3126636f6c6f723d373737424234266c6f676f3d706870266c6f676f436f6c6f723d666666666666266c6162656c436f6c6f723d313831383162)](https://www.php.net/)[![version](https://camo.githubusercontent.com/68fc19e53560fbba21092b7062ed853312d4d926a97f692251e9f02e2d7c5468/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6977696c616e2f7068702d65626f6f6b2e7376673f7374796c653d666c617426636f6c6f72413d31383138314226636f6c6f72423d373737424234)](https://packagist.org/packages/kiwilan/php-ebook)[![downloads](https://camo.githubusercontent.com/3900bc4f6deda61029106270e78862c78c1cb8fd5ba316ef9a6d224de44f20ba/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6977696c616e2f7068702d65626f6f6b2e7376673f7374796c653d666c617426636f6c6f72413d31383138314226636f6c6f72423d373737424234)](https://packagist.org/packages/kiwilan/php-ebook)[![license](https://camo.githubusercontent.com/5bd85308875c5aca00415a85f958ffe5b536b98c1136a13bf478d0b11f673346/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6b6977696c616e2f7068702d65626f6f6b2e7376673f7374796c653d666c617426636f6c6f72413d31383138314226636f6c6f72423d373737424234)](https://github.com/kiwilan/php-ebook/blob/main/README.md)[![tests](https://camo.githubusercontent.com/401e1a6fc5cf0e933ff02c34e084968e8e6963c919936566bbe8ce52e8c3c3ee/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b6977696c616e2f7068702d65626f6f6b2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c617426636f6c6f72413d313831383142)](https://packagist.org/packages/kiwilan/php-ebook)[![codecov](https://camo.githubusercontent.com/fe9807ce04960eb4767687def3c562f07dfbcf9ba8f96c53da58c0567b899dad/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f67682f6b6977696c616e2f7068702d65626f6f6b2f6d61696e3f7374796c653d666c617426636f6c6f72413d31383138314226636f6c6f72423d373737424234)](https://codecov.io/gh/kiwilan/php-ebook)

PHP package to read metadata and extract covers from eBooks, comics and audiobooks.

> Because metadata are the key against chaos.

- eBooks: `.epub`, `.pdf`, `.azw`, `.azw3`, `.kf8`, `.kfx`, `.mobi`, `.prc`, `.fb2`
- Comics: `.cbz`, `.cbr`, `.cb7`, `.cbt` (metadata from [github.com/anansi-project](https://github.com/anansi-project))
- Audiobooks: `.mp3`, `.m4a`, `.m4b`, `.flac`, `.ogg` with external package[`kiwilan/php-audio`](https://github.com/kiwilan/php-audio) (**MUST** be installed separately)

To know more see [Supported formats](#supported-formats). *Supports Linux, macOS and Windows.*

Note

This package favors eBooks in open formats such as `.epub` (from [IDPF](https://en.wikipedia.org/wiki/International_Digital_Publishing_Forum)) or `.cbz` (from [CBA](https://en.wikipedia.org/wiki/Comic_book_archive)) and which be parsed with native PHP, so for the best possible experience we recommend converting the eBooks you use. If you want to know more about eBook ecosystem, you can read [documentation](https://github.com/kiwilan/php-ebook/blob/main/docs/README.md).

Warning

For DRM (Digital Rights Management) eBooks, in some cases you could read metadata but not contents (like HTML files for EPUB). To use all features, you have to use a software to remove DRM before using this package. For EPUB, you can use [calibre](https://calibre-ebook.com/) with [DeDRM plugin](https://github.com/noDRM/DeDRM_tools), [this guide](https://www.epubor.com/calibre-drm-removal-plugins.html) can help you.

Requirements
------------

[](#requirements)

- **PHP version** `>=8.1`
- **PHP extensions**:
    - [`zip`](https://www.php.net/manual/en/book.zip.php) (native, optional) for `.EPUB`, `.CBZ`
    - [`phar`](https://www.php.net/manual/en/book.phar.php) (native, optional) for `.CBT`
    - [`rar`](https://github.com/cataphract/php-rar) (optional) for `.CBR` ([`p7zip`](https://www.7-zip.org/) binary can be used instead)
    - [`imagick`](https://www.php.net/manual/en/book.imagick.php) (optional) for `.PDF` cover
    - [`intl`](https://www.php.net/manual/en/book.intl.php) (native, optional) for `Transliterator` for better slugify
    - [`fileinfo`](https://www.php.net/manual/en/book.fileinfo.php) (native, optional) for better detection of file type
- **Binaries**
    - [`p7zip`](https://www.7-zip.org/) (optional) binarys for `.CB7` (can handle `.CBR` too)
- **Audiobooks**
    - [`kiwilan/php-audio`](https://github.com/kiwilan/php-audio) (optional) for `.mp3`, `.m4a`, `.m4b`, `.flac`, `.ogg` (see [Supported formats](#supported-formats))
- To know more about requirements, see [Supported formats](#supported-formats)

Note

You have to install requirements only if you want to read metadata for these formats, e.g. if you want to read metadata from `.cbr` files, you have to install [`rar` PHP extension](https://github.com/cataphract/php-rar) or [`p7zip`](https://www.7-zip.org/) binary. So all requirements for PHP extensions and binaries are optional.

Warning

Archives are handle with [`kiwilan/php-archive`](https://github.com/kiwilan/php-archive), for some formats (`.cbr` and `.cb7`) [`rar` PHP extension](https://github.com/cataphract/php-rar) or [`p7zip`](https://www.7-zip.org/) binary could be necessary. Some guides to install these requirements are available on [`kiwilan/php-archive`](https://github.com/kiwilan/php-archive#requirements).

Features
--------

[](#features)

- Support multiple formats, see [Supported formats](#supported-formats)
- 🔎 Read metadata from eBooks, comics, and audiobooks
- 🖼️ Extract covers from eBooks, comics, and audiobooks
- 🎵 Works with audiobooks if [`kiwilan/php-audio`](https://github.com/kiwilan/php-audio) is installed
- 📚 Support metadata
    - eBooks: `EPUB` v2 and v3 from [IDPF](https://idpf.org/) with `calibre:series` from [Calibre](https://calibre-ebook.com/) | `MOBI` from Mobipocket (and derivatives) | `FB2` from [FictionBook](https://en.wikipedia.org/wiki/FictionBook)
    - Comics: `CBAM` (Comic Book Archive Metadata) : `ComicInfo.xml` format from *ComicRack* and maintained by [`anansi-project`](https://github.com/anansi-project/comicinfo)
    - `PDF` with [`smalot/pdfparser`](https://github.com/smalot/pdfparser)
    - Audiobooks: `ID3`, `vorbis` and `flac` tags with [`kiwilan/php-audio`](https://github.com/kiwilan/php-audio) (not included), based on [audiobookshelf specifications](https://www.audiobookshelf.org/docs#book-audio-metadata)
- 🔖 Chapters extraction (`EPUB` only)
- 📦 `EPUB` and `CBZ` creation supported

- Works perfectly with [`kiwilan/php-opds`](https://github.com/kiwilan/php-opds): PHP package to generate OPDS feeds (not included)

### Roadmap

[](#roadmap)

- Better `.epub` creation support
- Add `.epub` metadata update support
- Add better handling of MOBI files: [`libmobi`](https://github.com/bfabiszewski/libmobi) and [`ebook-convert`](https://manual.calibre-ebook.com/generated/en/ebook-convert.html) from Calibre (fallback is available)
- Add support of [`ebook-convert`](https://manual.calibre-ebook.com/generated/en/ebook-convert.html) from Calibre
- Add suport for DJVU: [`djvulibre`](https://djvu.sourceforge.net/)

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

[](#installation)

You can install the package via composer:

```
composer require kiwilan/php-ebook
```

Usage
-----

[](#usage)

With eBook files or audiobook\* files (to know more about formats, see [Supported formats](#supported-formats)).

\*: should be installed separately, see [Requirements](#requirements).

```
use Kiwilan\Ebook\Ebook;

$ebook = Ebook::read('path/to/ebook.epub');

$ebook->getPath(); // string => path to ebook
$ebook->getFilename(); // string => filename of ebook
$ebook->getExtension(); // string => extension of ebook
$ebook->getTitle(); // string
$ebook->getAuthors(); // BookAuthor[] (`name`: string, `role`: string)
$ebook->getAuthorMain(); // ?BookAuthor => First BookAuthor (`name`: string, `role`: string)
$ebook->getDescription(); // ?string
$ebook->getCopyright(); // ?string
$ebook->getPublisher(); // ?string
$ebook->getIdentifiers(); // BookIdentifier[] (`value`: string, `scheme`: string)
$ebook->getPublishDate(); // ?DateTime
$ebook->getLanguage(); // ?string
$ebook->getTags(); // string[] => `subject` in EPUB, `keywords` in PDF, `genres` in CBA
$ebook->getSeries(); // ?string => `calibre:series` in EPUB, `series` in CBA
$ebook->getVolume(); // ?int => `calibre:series_index` in EPUB, `number` in CBA
$ebook->getCreatedAt(); // ?DateTime => file modified date
$ebook->getSize(); // int => file size in bytes
$ebook->getSizeHumanReadable(); // string => file size in human readable format
```

For advanced description parsing, you can use `getDescriptionAdvanced()` method with `BookDescription` class.

```
use Kiwilan\Ebook\Ebook;

$ebook = Ebook::read('path/to/ebook.epub');

$description = $ebook->getDescriptionAdvanced(); // BookDescription

$description->getDescription(); // string => raw description
$description->toHtml(?int $limit = null); // string => description formatted to HTML
$description->toString(?int $limit = null); // string => description formatted to plain text
$description->toStringMultiline(?int $limit = null); // string => description formatted to plain text with new lines
```

For pages count, you can use these methods:

```
$ebook->getPagesCount(); // ?int => estimated pages count (250 words by page) in `EPUB`, `pageCount` in PDF, `pageCount` in CBA
$ebook->getWordsCount(); // ?int => words count in `EPUB`
```

Note

For performance reasons, with `EPUB`, `pagesCount` and `wordsCount` are only available on demand. If you use `var_dump` to check eBook, these properties will be `null`.

Some metadata can be stored into `extras()` method, without typing, directly from metadata.

```
$ebook->getExtras(); // array => additional data for book
$ebook->getExtra(string $key); // mixed => safely extract data from `extras` array
```

Note

For audiobooks, all metadata are stored into `extras` array, you will find duplicate with `Ebook::class` properties. See [Formats specifications](#formats-specifications) for more informations.

To know if eBook is valid, you can use `isValid()` static method, before `read()`.

```
use Kiwilan\Ebook\Ebook;

$isValid = Ebook::isValid('path/to/ebook.epub');
```

To get additional data, you can use these methods:

```
$ebook->getParser(); // ?EbookParser => Parser with modules
$ebook->getMetaTitle(); // ?MetaTitle, with slug for `title` and `series`
$ebook->getFormat(); // ?EbookFormatEnum => `epub`, `pdf`, `cba`
$ebook->getCover(); // ?EbookCover => cover of book
```

To access to archive of eBook, you can use `getArchive()` method. You can find more informations about archive in [`kiwilan/php-archive`](https://github.com/kiwilan/php-archive).

```
$ebook->getArchive(); // ?BaseArchive => archive of book from `kiwilan/php-archive`
```

And to test if some data exists:

```
$ebook->isArchive(); // bool => `true` if `EPUB`, `CBA`
$ebook->isMobi(); // bool => `true` if Mobipocket derivatives
$ebook->isAudio(); // bool => `true` if `mp3`, `m4a`, `m4b`, `flac`, `ogg`
$ebook->hasCover(); // bool => `true` if cover exists
$ebook->hasMetadata(); // bool => `true` if metadata exists
$ebook->hasSeries(); // bool => `true` if series exists
$ebook->isBadFile(); // bool => `true` if file is not readable
```

### Metadata

[](#metadata)

`Ebook::class` contains many informations but if you want to access to raw metadata, `metadata()` method is available.

```
use Kiwilan\Ebook\Ebook;

$ebook = Ebook::read('path/to/ebook.epub');

$parser = $ebook->getParser();

$parser->getModule(); // Used into parsing can be any of `EbookModule::class`

$parser->getAudiobook(); // `AudiobookModule::class`
$parser->getCba(); // `CbaModule::class`
$parser->getEpub(); // `EpubModule::class`
$parser->getFb2(); // `Fb2Module::class`
$parser->getMobi(); // `MobiModule::class`
$parser->getPdf(); // `PdfModule::class`

$parser->isAudiobook(); // bool
$parser->isCba(); // bool
$parser->isEpub(); // bool
$parser->isFb2(); // bool
$parser->isMobi(); // bool
$parser->isPdf(); // bool
```

### MetaTitle

[](#metatitle)

Can be set if book's title is not null.

```
use Kiwilan\Ebook\Ebook;

$ebook = Ebook::read('path/to/ebook.epub');
$metaTitle = $ebook->getMetaTitle(); // ?MetaTitle

$metaTitle->getSlug(); // string => slug title, like `lord-of-the-rings-en-01-fellowship-of-the-ring-j-r-r-tolkien-1954-epub`
$metaTitle->getSeriesSlug(); // ?string => slug series title, like `lord-of-the-rings-en`
```

You can customize slug with `MetaTitle::class`:

```
$meta->getSlug(removeDeterminers: true, addSeries: true, addVolume: true, addAuthor: true, addYear: true, addExtension: true, addLanguage: true);
$meta->getSeriesSlug(removeDeterminers: true, addAuthor: false, addExtension: false, addLanguage: true);
```

### Cover

[](#cover)

Cover can be extracted from ebook.

```
use Kiwilan\Ebook\Ebook;

$ebook = Ebook::read('path/to/ebook.epub');
$cover = $ebook->getCover(); // ?EbookCover

$cover->getPath(); // ?string => path to cover
$cover->getContents(bool $toBase64 = false); // ?string => content of cover, if `$toBase64` is true, return base64 encoded content
```

Note

- For `PDF`, cover can only be extracted if [`imagick` PHP extension](https://www.php.net/manual/en/book.imagick.php).
- For Audiobook, cover can be extracted with [some formats](https://github.com/kiwilan/php-audio#supported-formats).

### Formats specifications

[](#formats-specifications)

#### Audiobooks

[](#audiobooks)

For audiobooks, you have to install seperately [`kiwilan/php-audio`](https://github.com/kiwilan/php-audio).

Specifications are based on [audiobookshelf](https://www.audiobookshelf.org/docs#book-audio-metadata) and [ID3](https://id3.org/ID3v2.4.0) tags. Metadata on audio files will be mapped as follows (second tag after "/" is a fallback):

Properties of `Audio::class` are:

**ID3 Tag (case-insensitive)****eBook**`artist` / `album-artist`Authors\*`album` / `title`Title`subtitle`Extra property `subtitle``publisher`Publisher`year`Publish Year`composer`Extra property `narrators``description`Description`genre`Tags\*\*`series` / `mvnm`Series`series-part` / `mvin`Volume`language` / `lang`Language`isbn`Identifiers `isbn``asin` / `audible_asin`Identifiers `asin`Overdrive MediaMarkersExtra property `chapters`- \* Authors naming as well as multiple authors separated by `,`, `;`, `&` or `and`.
- \*\* Tags can include multiple tags separated by `/`, `//`, or `;`. e.g. "Science Fiction/Fiction/Fantasy"

You can find all metadata into `getExtras()` array of `Ebook::class`.

#### EPUB

[](#epub)

With `EPUB`, metadata are extracted from `OPF` file, `META-INF/container.xml` files, you could access to these metatada but you can also get chapters from `NCX` file. And with `chapters()` method you can merge `NCX` and `HTML` chapters to get full book chapters with `label`, `source` and `content`.

```
use Kiwilan\Ebook\Ebook;

$ebook = Ebook::read('path/to/ebook.epub');

$epub = $ebook->getParser()?->getEpub();

$epub->getContainer(); // ?EpubContainer => {`opfPath`: ?string, `version`: ?string, `xml`: array}
$epub->getOpf(); // ?OpfItem => {`metadata`: array, `manifest`: array, `spine`: array, `guide`: array, `epubVersion`: ?int, `filename`: ?string, `dcTitle`: ?string, `dcCreators`: BookAuthor[], `dcContributors`: BookContributor[], `dcDescription`: ?string, `dcPublisher`: ?string, `dcIdentifiers`: BookIdentifier[], `dcDate`: ?DateTime, `dcSubject`: string[], `dcLanguage`: ?string, `dcRights`: array, `meta`: BookMeta[], `coverPath`: ?string, `contentFile`: string[]}
$epub->getNcx(); // ?NcxItem => {`head`: NcxItemHead[]|null, `docTitle`: ?string, `navPoints`: NcxItemNavPoint[]|null, `version`: ?string, `lang`: ?string}
$epub->getChapters(); // EpubChapter[] => {`label`: string, `source`: string, `content`: string}[]
$epub->getHtml(); // EpubHtml[] => {`filename`: string, `head`: ?string, `body`: ?string}[]
$epub->getFiles(); // string[] => all files in EPUB
```

Note

For performance reasons, with `ncx`, `html` and `chapters` are only available on demand. If you use `var_dump` to check metadata, these properties will be `null`.

### Creation

[](#creation)

You can create an EPUB or CBZ file with `create()` static method.

Note

Only `EPUB` and `CBZ` are supported for creation.

```
use Kiwilan\Ebook\Ebook;

$creator = Ebook::create('path/to/ebook.epub');

// Build manually
$creator->addFromString('mimetype', 'application/epub+zip')
    ->addFromString('META-INF/container.xml', '')
    ->save();

// Build from files
$creator->addFile('mimetype', 'path/to/mimetype')
    ->addFile('META-INF/container.xml', 'path/to/container.xml')
    ->save();

// Build from directory
$creator->addDirectory('./', 'path/to/directory')
    ->save();
```

Supported formats
-----------------

[](#supported-formats)

There is a lot of different formats for eBooks and comics, if you want to know more about:

- [Comparison of e-book formats](https://en.wikipedia.org/wiki/Comparison_of_e-book_formats) for eBooks
- [Comic book archive](https://en.wikipedia.org/wiki/Comic_book_archive) for comics
- Amazing [MobileRead wiki](https://wiki.mobileread.com/wiki/Category:Formats)

NameExtensionsSupportedUsesSupport coverSupport seriesEPUB (IDPF)`.epub`✅Native [`zip`](https://www.php.net/manual/en/book.zip.php)✅✅Kindle (Amazon)`.azw`, `.azw3`, `.kf8`, `.kfx`✅Native [`filesystem`](https://www.php.net/manual/en/book.filesystem.php)✅ (See [MOBI cover note](#mobi-cover-note))❌Mobipocket`.mobi`, `.prc`✅Native [`filesystem`](https://www.php.net/manual/en/book.filesystem.php)✅ (See [MOBI cover note](#mobi-cover-note))❌PDF`.pdf`✅[`smalot/pdfparser`](https://github.com/smalot/pdfparser) (included)Uses [`imagick`](https://www.php.net/manual/en/book.imagick.php)❌iBook (Apple)`.ibooks`❌N/AN/ADjVu`.djvu`, `.djv`❌N/AN/ARich Text Format`.rtf`❌N/AN/AFictionBook`.fb2`✅Native [`filesystem`](https://www.php.net/manual/en/book.filesystem.php)✅✅Broadband eBooks`.lrf`, `.lrx`❌N/AN/APalm Media`.pdb`❌N/AN/AComics CBZ`.cbz`✅Native [`zip`](https://www.php.net/manual/en/book.zip.php)✅✅Comics CBR`.cbr`✅[`rar`](https://github.com/cataphract/php-rar) PHP extension or [`p7zip`](https://www.7-zip.org/) binary✅✅Comics CB7`.cb7`✅[`p7zip`](https://www.7-zip.org/) binary✅✅Comics CBT`.cbt`✅Native [`phar`](https://www.php.net/manual/en/book.phar.php)✅✅Audio`.mp3`, `.m4a`, `.m4b`, `.flac`, `.ogg`✅If [`kiwilan/php-audio`](https://github.com/kiwilan/php-audio) is installed[Depends of format](https://github.com/kiwilan/php-audio#supported-formats)❌### MOBI cover note

[](#mobi-cover-note)

Mobipocket files and derivatives (`.mobi`, `.prc`, `.azw`, `.azw3`, `.kf8`, `.kfx`) can have a cover image embedded in the file. With native solution of `php-ebook` cover could be extracted but resolution is not good. Best solution is to convert file with [`calibre`](https://calibre-ebook.com/) and use `EPUB` format.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [`spatie`](https://github.com/spatie) for `spatie/package-skeleton-php`
- [`kiwilan`](https://github.com/kiwilan) for `kiwilan/php-archive`, `kiwilan/php-audio`, `kiwilan/php-xml-reader`
- [Ewilan Rivière](https://github.com/ewilan-riviere) author of this package
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

[![](https://user-images.githubusercontent.com/48261459/201463225-0a5a084e-df15-4b11-b1d2-40fafd3555cf.svg)](https://github.com/kiwilan)

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance68

Regular maintenance activity

Popularity39

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 91.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~11 days

Total

81

Last Release

260d ago

Major Versions

0.34.0 → 1.0.02023-06-13

1.3.54 → 2.0.02023-08-08

2.6.9 → 3.0.012024-10-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/58eb34eac9af07c3352e83060e472e1c280838ebe0568692561c00a2cfde9e57?d=identicon)[ewilan-riviere](/maintainers/ewilan-riviere)

---

Top Contributors

[![ewilan-riviere](https://avatars.githubusercontent.com/u/48261459?v=4)](https://github.com/ewilan-riviere "ewilan-riviere (582 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (22 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (15 commits)")[![baseciq](https://avatars.githubusercontent.com/u/25526812?v=4)](https://github.com/baseciq "baseciq (7 commits)")[![SergioMendolia](https://avatars.githubusercontent.com/u/4610317?v=4)](https://github.com/SergioMendolia "SergioMendolia (5 commits)")[![builtbybasit](https://avatars.githubusercontent.com/u/45251447?v=4)](https://github.com/builtbybasit "builtbybasit (2 commits)")[![lasselehtinen](https://avatars.githubusercontent.com/u/1290186?v=4)](https://github.com/lasselehtinen "lasselehtinen (1 commits)")[![onigoetz](https://avatars.githubusercontent.com/u/309594?v=4)](https://github.com/onigoetz "onigoetz (1 commits)")

---

Tags

audiobookazwbookcb7cbacbamcbrcbzcomiccomicinfocoverebookepubepub2epub3metadatamobiopfpdfphpphppdfmetadataebookcalibrecoverbookCBAepubcbrcbtcbzcb7comicmobiopffb2audiobookepub2epub3comicinfocbamazwazw3

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kiwilan-php-ebook/health.svg)

```
[![Health](https://phpackages.com/badges/kiwilan-php-ebook/health.svg)](https://phpackages.com/packages/kiwilan-php-ebook)
```

###  Alternatives

[kiwilan/php-archive

PHP package to handle archives (.zip, .rar, .tar, .7z, .pdf) with unified API and hybrid solution (native/p7zip), designed to works with EPUB and CBA (.cbz, .cbr, .cb7, .cbt).

1027.6k1](/packages/kiwilan-php-archive)[easybook/easybook

Book publishing application

76011.5k](/packages/easybook-easybook)[themsaid/ibis

Markdown to PDF book builder

2.0k2.0k](/packages/themsaid-ibis)[pontedilana/php-weasyprint

PHP library allowing PDF generation from an url or a html page. Wrapper for Kozea/WeasyPrint.

761.1M7](/packages/pontedilana-php-weasyprint)[daandesmedt/phpheadlesschrome

A PHP wrapper for using Google Chrome Headless mode. Convert URL or HTML to a PDF / screenshot. Easy to use and OOP interfaced.

92233.1k](/packages/daandesmedt-phpheadlesschrome)[kartik-v/mpdf

A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support. This is a fork of the official mPDF library.

39328.4k1](/packages/kartik-v-mpdf)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
