承接 sebastiansantillan/phpepub 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sebastiansantillan/phpepub

最新稳定版本:v0.3.0-beta

Composer 安装命令:

composer require sebastiansantillan/phpepub

包简介

A modern PHP library for creating EPUB3 files

README 文档

README

Version PHP Version License EPUB Accessibility WCAG

A modern PHP library for creating EPUB files easily and efficiently.

🎉 Beta Version: v0.3.0-beta is production-ready with complete EPUB Accessibility 1.1 support!

Features

  • ✅ Create EPUB 3.0 files
  • ✅ Support for multiple chapters
  • ✅ Metadata management (title, author, language, etc.)
  • ✅ Support for images and CSS
  • Complete EPUB Accessibility 1.1 support
  • WCAG 2.1 Level AA compliance
  • Schema.org accessibility metadata
  • ✅ Fluent and easy-to-use interface
  • ✅ Compatible with PHP 8.3+

Installation

Beta Version

composer require sebastiansantillan/phpepub:^0.3.0-beta

📝 Note: As this is an beta version, the API may change in future versions.

Basic Usage

<?php
require_once 'vendor/autoload.php';

use PHPEpub\EpubBuilder;

$epub = new EpubBuilder();

$epub->setTitle('My First Book')
     ->setAuthor('Your Name')
     ->setLanguage('en')
     ->setDescription('A book description');

// Add chapters
$epub->addChapter('Chapter 1', '<h1>Chapter 1</h1><p>First chapter content...</p>');
$epub->addChapter('Chapter 2', '<h1>Chapter 2</h1><p>Second chapter content...</p>');

// Generate the EPUB file
$epub->save('my-book.epub');

Accessibility Support

PHPEpub includes complete accessibility support for EPUB Accessibility 1.1:

$epub = new EpubBuilder();

$epub->setTitle('Accessible Book')
     ->setAuthor('Author Name')
     // Add accessibility metadata
     ->addAccessMode('textual')
     ->addAccessMode('visual')
     ->addAccessibilityFeature('structuralNavigation')
     ->addAccessibilityFeature('alternativeText')
     ->addAccessibilityHazard('none')
     ->setAccessibilitySummary('Fully accessible book with proper navigation and alt text')
     ->addConformsTo('EPUB Accessibility 1.1 - WCAG 2.1 Level AA');

$epub->addChapter('Chapter 1', '<h1>Accessible Chapter</h1><p>Content with proper structure...</p>');
$epub->save('accessible-book.epub');

Documentation

For more information, check the complete documentation.

Accessibility Documentation

License

This project is licensed under the MIT License. See the LICENSE file for details.

Changelog

See CHANGELOG.md for changes in each version.

Links

统计信息

  • 总下载量: 42
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-02