Skip to content
/ epub Public
forked from justinrainbow/epub

A simple library to handle epub files from PHP

License

Notifications You must be signed in to change notification settings

vibby/epub

 
 

Repository files navigation

ePub lib for PHP

Installation through Composer

Install composer (globaly is better)

wget http://getcomposer.org/composer.phar
mv composer.phar /usr/bin/composer

Add vibby/epub to your dependencies

composer require vibby/epub

Usage

$reader = new \Vibby\EPub\Reader\Reader();
$ePub = $reader->load($fileName);

printf("Title: %s\n", $epub->getMetadata()->getValue('title'));

$firstChapter = $ePub->getPackage()->getSpine()->get(0);
$content = $firstChapter->getContent();
// manipulate HTML here
$ePub->updateChapterContent($firstChapter, $content);

Resources

Credits

Built on the base of https://github.com/justinrainbow/epub

About

A simple library to handle epub files from PHP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%