-
Notifications
You must be signed in to change notification settings - Fork 0
Examples
Dragon edited this page Jun 4, 2026
·
3 revisions
Runnable, end-to-end scripts that combine several phppdf subsystems into a
realistic document. Each script lives next to its generated PDF in the
examples/
directory of the repository.
The examples are kept out of the Composer package (
composer requiredoes not download them). To run them, clone the repository.
git clone https://github.com/dragonofmercy/php-pdf.git
cd php-pdf
composer install
php examples/example-invoice.php # writes examples/example-invoice.pdf next to the script| Example | Scenario | Subsystems shown |
|---|---|---|
| example-invoice.php | Commercial invoice | Metadata, margins, header/footer with page numbers, table (fixed + fill columns, zebra), totals via cells |
| example-report.php | Multi-page report | Flowing Markdown with automatic page breaks, header/footer, bookmarks |
| example-labels.php | Shipping labels | Custom page dimensions, Code 128 + QR barcodes, tight text layout |
| example-catalog.php | Product catalogue | Card grid of cells, embedded raster image reused across cards, clickable links |
| example-svg-poster.php | Vector poster | Full-page inline SVG: gradients, shapes, selectable text |
MIT licensed. Source on GitHub - if phppdf helps you, you can buy me a coffee.