PHPackages                             jove4015/epub-to-text - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. jove4015/epub-to-text

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jove4015/epub-to-text
=====================

Extract text from a epub - based on spatie/pdf-to-text

1.1.1(8y ago)2831[1 issues](https://github.com/jove4015/epub-to-text/issues)MITPHPPHP ^7.0

Since Dec 31Pushed 8y agoCompare

[ Source](https://github.com/jove4015/epub-to-text)[ Packagist](https://packagist.org/packages/jove4015/epub-to-text)[ Docs](https://github.com/jove4015/epub-to-text)[ RSS](/packages/jove4015-epub-to-text/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (2)Versions (7)Used By (0)

Extract text from an epub
=========================

[](#extract-text-from-an-epub)

This package provides a class to extract text from an epub.

```
 \jove4015\epub2txt\Epub::getText('book.epub'); //returns the text from the epub
```

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

[](#requirements)

Behind the scenes this package leverages [epub2txt](https://github.com/kevinboone/epub2txt2). You can verify if the binary installed on your system by issueing this command:

```
which epub2txt

```

If it is installed it will return the path to the binary.

To install the binary you can follow the instructions here: ([http://kevinboone.net/README\_epub2txt.html](http://kevinboone.net/README_epub2txt.html))

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

[](#installation)

You can install the package via composer:

```
$ composer require jove4015/epub-to-text
```

Usage
-----

[](#usage)

Extracting text from an epub is easy.

```
$text = (new Epub())
    ->setepub('book.epub')
    ->text();
```

Or easier:

```
 \jove4015\EpubToText\Epub::getText('book.epub')
```

By default the package will assume that the `epub2txt` is located at `/usr/bin/epub2txt`. If you're using the a different location pass the path to the binary in constructor

```
$text = (new Epub('/custom/path/to/epub2txt'))
    ->setepub('book.epub')
    ->text();
```

or as the second parameter to the `getText`-function:

```
 \jove4015\EpubToText\Epub::getText('book.epub', '/custom/path/to/epub2txt')
```

Testing
-------

[](#testing)

```
$ composer test
```

Credits
-------

[](#credits)

- [Freek Van der Herten](https://github.com/freekmurze) - Wrote the original [pdf-to-text](https://github.com/spatie/pdf-to-text) package on which this is based
- [Kevin Boone](https://github.com/kevinboone) - Wrote the epub2txt CLI utility

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 46% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 76.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 ~143 days

Recently: every ~160 days

Total

6

Last Release

3164d ago

Major Versions

0.0.1 → 1.0.12016-03-16

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/228216?v=4)[Steve Weiss](/maintainers/jove4015)[@jove4015](https://github.com/jove4015)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (33 commits)")[![jove4015](https://avatars.githubusercontent.com/u/228216?v=4)](https://github.com/jove4015 "jove4015 (4 commits)")[![sebastiandedeyne](https://avatars.githubusercontent.com/u/1561079?v=4)](https://github.com/sebastiandedeyne "sebastiandedeyne (4 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (1 commits)")[![srmklive](https://avatars.githubusercontent.com/u/839335?v=4)](https://github.com/srmklive "srmklive (1 commits)")

---

Tags

jove4015epub-to-text

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jove4015-epub-to-text/health.svg)

```
[![Health](https://phpackages.com/badges/jove4015-epub-to-text/health.svg)](https://phpackages.com/packages/jove4015-epub-to-text)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k257.0M27.8k](/packages/friendsofphp-php-cs-fixer)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k39.6k](/packages/matomo-matomo)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

762297.9k52](/packages/civicrm-civicrm-core)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k20](/packages/tempest-framework)[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k17.9k1](/packages/phpactor-phpactor)[illuminate/process

The Illuminate Process package.

44926.6k122](/packages/illuminate-process)

PHPackages © 2026

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