gemorroj/ebook-reader

E-books reader

dev-master 2024-07-27 11:48 UTC

This package is auto-updated.

Last update: 2024-10-27 12:21:31 UTC


README

License Latest Stable Version Continuous Integration

Formats:

  • EPUB
  • MOBI
  • FB2, FB2-ZIP

Requirements:

  • PHP >= 8.0.2
  • ext-zip
  • ext-dom
  • ext-xmlreader

Installation:

composer require gemorroj/ebook-reader

Example:

<?php
use EbookReader\EbookReaderFactory;
use EbookReader\Driver\Epub3Driver;

$ebookReader = EbookReaderFactory::create('file.epub');
$meta = $ebookReader->getMeta();
print_r($meta); // EbookMetaInterface object


$ebookReader = EbookReaderFactory::create('fake.file'); // throws UnsupportedFormatException exception


$driver = new Epub3Driver('fake.file');
var_dump($driver->isValid()); // false