chokri / pdf-classe
PDF tool kit
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 0
Forks: 3
Open Issues: 0
pkg:composer/chokri/pdf-classe
Requires
- php: ^8.4
- setasign/fpdf: ^1.8
Requires (Dev)
- phpunit/phpunit: ^12.2
This package is auto-updated.
Last update: 2025-07-04 23:07:52 UTC
README
PDFKit
A simple PHP library for making PDF files. Uses setasign/fpdf and works with PHP 8.4 or newer.
Installation
Install with Composer:
composer require chokri/pdfkit
Basic Example
require 'vendor/autoload.php'; use Chokri\PDF\Pdf; $pdf = new Pdf(); $pdf->addTitlePage('My PDF Title', 'Subtitle', 'Author Name'); $pdf->addTable(['Col1', 'Col2'], [['A', 'B'], ['C', 'D']]); $pdf->addImageCentered('logo.png', 80); $pdf->addPageNumbering(); $pdf->Output('I', 'example.pdf');
Features
- Easy to use
- PSR-4 autoloading
- PHP 8.4+ support
- GPL-3.0 license
- Write HTML with
WriteHTML() - Add tables and images
- Custom header and footer
- Unit tested with PHPUnit
License
GPL-3.0-or-later. See LICENCE.
Changelog
See CHANGELOG.md for updates.
Author
Chokri Khalifa — chokrikhalifa.com