PHPackages                             arkhee/simplepubgen - 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. arkhee/simplepubgen

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

arkhee/simplepubgen
===================

Simple EPub Generator for PHP websites based on html content

1.1.1(1y ago)07GPL-3.0-or-laterPHPPHP ^7.1 || ^8

Since Jun 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Arkhee/simplepubgen)[ Packagist](https://packagist.org/packages/arkhee/simplepubgen)[ Docs](https://github.com/Arkhee/SimplePubGen)[ RSS](/packages/arkhee-simplepubgen/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

SimplePubGen : Simple EPub Generator for PHP websites
=====================================================

[](#simplepubgen--simple-epub-generator-for-php-websites)

Create a simple texte based epub. This generator has been developped to be used as a library for a project aimed at producing simple epub based on websites, especially web novels. Basically, it can be used to generate an epub from a list of chapters that would have been collected (manually, automatically) from a website.

How it works
------------

[](#how-it-works)

This software works completely on a programated way. It is a simple class that can be used in any PHP project.

- First instantiate the class with the following title of the book as a parameter
- Add a cover (url of the cover, the library will download it for you)
- Then add chapters to the book, with the title and the content of the chapter
- If there are more resources to add (images, css, etc), add them to the book with the addResource method
- Finally, call the `generate` method to create the epub file

How the addResource works
=========================

[](#how-the-addresource-works)

The addResource method is used to add additional files to the epub that are called from the content of the chapters. This is useful for adding images, css, etc. You must first adapt the html of the content in order to modify the links. One image would initially look this way :

```

```

You would have to changer it to this :

```

```

Then you can add the image to the epub with the following code :

```
$epub->addResource("new-file-name.jpeg","https://mysite/my-old-file.jpeg");
```

As you guessed the file will be stored in an "image" folder inside the ePub which is located in a different folder from the place contents are stored, so the "../image/" is important.

If you use the "WebBookScraper" class to collect the chapters, inline images will be automatically added to the epub and the content modified.

How to install
--------------

[](#how-to-install)

The project is available on packagist and can be installed using composer:

```
composer require "arkhee/simplepubgen"
```

Example
-------

[](#example)

There is a sample provided to see how it works, have a look at the sample folder To use it as-is you must use the Simplepubgen and the WebBookScraper packages. Created a new folder on your server and copy the sample file at it's root Install both packages with composer and run the sample file.

```
composer require "arkhee/simplepubgen"
composer require "arkhee/webbookscraper"
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

4

Last Release

698d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/271a59581d2c780806e1ac688fa003796b386306cc2ac893bb905095259a744b?d=identicon)[Arkhee](/maintainers/Arkhee)

---

Top Contributors

[![Arkhee](https://avatars.githubusercontent.com/u/3664145?v=4)](https://github.com/Arkhee "Arkhee (65 commits)")

### Embed Badge

![Health badge](/badges/arkhee-simplepubgen/health.svg)

```
[![Health](https://phpackages.com/badges/arkhee-simplepubgen/health.svg)](https://phpackages.com/packages/arkhee-simplepubgen)
```

###  Alternatives

[phpoffice/phpspreadsheet

PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine

13.9k293.5M1.3k](/packages/phpoffice-phpspreadsheet)[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[smalot/pdfparser

Pdf parser library. Can read and extract information from pdf file.

2.7k34.5M216](/packages/smalot-pdfparser)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k24.8M48](/packages/barryvdh-laravel-snappy)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.1k57.6M131](/packages/openspout-openspout)[keboola/csv

Keboola CSV reader and writer

1451.8M21](/packages/keboola-csv)

PHPackages © 2026

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