Core-Paket-Übersicht
The Core package (yeeefang/tcpdf-next) is the foundation of the TCPDF-Next ecosystem. It contains everything needed for PDF 2.0 document generation.
Auf einen Blick
| Metric | Value |
|---|---|
| PHP source files | 148 |
| Modules | 16 |
| Tests | 908+ |
| Assertions | 28,881+ |
| PHPStan level | 10 |
| Entry point | Document::create() |
| License | LGPL-3.0-or-later |
Einstiegspunkt
All documents start with Document::create():
use Yeeefang\TcpdfNext\Core\Document;
$pdf = Document::create()
->setTitle('My Document')
->addPage()
->setFont('Helvetica', '', 12)
->cell(0, 10, 'Hello World')
->save('output.pdf');The Document class is final and implements PdfDocumentInterface. Its functionality comes from 12 composable traits — see Design Philosophy for details.
Modul-Übersicht
| Module | Namespace | Files | Documentation |
|---|---|---|---|
| Core | Core\ | 6 | Document |
| Contracts | Contracts\ | 7 | API Reference |
| ValueObjects | ValueObjects\ | 5 | Value Objects |
| Support | Support\ | 1 | API Reference |
| Content | Content\ | 6 | Textausgabe |
| Typography | Typography\ | 14 | Typography, Fonts |
| Grafiken | Grafiken\ | 19 | Colors, Grafiken, Bilder |
| Layout | Layout\ | 6 | Layout |
| Html | Html\ | 8 | HTML-Rendering |
| Form | Form\ | 5 | Formulare |
| Barcode | Barcode\ | 12 | Barcodes |
| Navigation | Navigation\ | 11 | Navigation |
| Accessibility | Accessibility\ | 3 | Tagged PDF |
| Sicherheit | Sicherheit\ | 14 | Encryption, Signatures |
| Writer | Writer\ | 8 | Ausgabe |
Funktionen
Text & Typografie
Unicode, BiDi (bidirectional text), CJK, Arabic shaping, hyphenation. TTF/OTF/Type1/CFF font subsetting. 14 standard PDF fonts built-in.
Grafiken
Shapes (line, rect, circle, ellipse, polygon, star, arrow, curve), gradients (linear, radial, Coons patch mesh, Gouraud triangle mesh), pattern fills, SVG/EPS parsing, image support (PNG, JPEG, WebP, AVIF).
HTML-Rendering
Built-in HTML parser supporting div, p, h1-h6, table (colspan/rowspan), lists, inline styling. For full CSS3 (Flexbox, Grid, web fonts), use the Artisan package.
Barcodes
1D: Code 128, EAN-8/13, UPC-A/E, Code 39/93, GS1-128, IMB, and more. 2D: QR Code (ISO 18004), DataMatrix (ISO 16022), PDF417 (ISO 15438).
Sicherheit
AES-256 encryption (AESV3 Rev 6) with SASLprep. PAdES B-B digital signatures with visible/invisible appearance. RFC 3161 timestamp client.
Formulare
AcroForm fields: text, checkbox, radio button, list box, combo box, button. Form flattening.
Navigation
Bookmarks, internal/external links, named destinations, annotations, table of contents, file attachments, JavaScript.
Ausgabe
Save to file, inline display, download, string buffer. Streaming output for large documents. Linearization for progressive web display. Deterministic mode for reproducible builds.