API Reference
Complete API reference for every package in the TCPDF-Next ecosystem. Each package is listed below with its key classes and interfaces. Click through to the dedicated pages for method signatures, parameters, and usage examples.
Core
Package: tcpdf-next/core
| Class | Description |
|---|---|
Document | Central entry point -- fluent facade that delegates to 12 traits |
ObjectRegistry | Tracks all PDF indirect objects and assigns unique object numbers |
TransactionManager | Savepoint / rollback semantics for complex layout operations |
CrossReferenceStream | Builds the PDF 2.0 binary cross-reference stream |
Contracts
Package: tcpdf-next/contracts
| Interface / Enum | Kind | Description |
|---|---|---|
PdfDocumentInterface | Interface | Primary API contract for any PDF document implementation |
FontManagerInterface | Interface | Font loading, registration, and subsetting contract |
SignerInterface | Interface | Digital signature provider abstraction |
HsmSignerInterface | Interface | Extended signer for hardware security modules |
Orientation | Enum | Page orientation (Portrait, Landscape) |
Alignment | Enum | Text alignment (Left, Center, Right, Justified) |
OutputDestination | Enum | Output target (Inline, Download, File, String) |
SignatureLevel | Enum | PAdES conformance level (B-B through B-LTA) |
Value Objects
Package: tcpdf-next/value-objects
| Class | Description |
|---|---|
PageSize | Named or custom page size with preset factories (A0 -- A6, Letter, Legal, Tabloid) |
Margin | Four-sided page margins (top, right, bottom, left) |
Position | Immutable x--y coordinate |
Dimension | Immutable width--height pair |
Unit | Unit conversion helpers (mm, pt, cm, in) |
Graphics
Package: tcpdf-next/graphics
| Class | Description |
|---|---|
Color | Immutable color representation (RGB, CMYK, Gray, Spot) |
ColorSpace | Enum for DeviceRGB, DeviceCMYK, DeviceGray, Separation |
BlendMode | Transparency blend mode enum (Normal, Multiply, Screen, Overlay, ...) |
LayerManager | Optional Content Group (OCG) management |
GradientManager | Linear and radial gradient creation |
Typography
Package: tcpdf-next/typography
| Class | Description |
|---|---|
FontManager | Central registry for loading and managing fonts |
FontSubsetter | Creates minimal font subsets containing only used glyphs |
FontInfo | Readonly data object exposing glyph metrics, ascender, descender |
BiDiResolver | Unicode Bidirectional Algorithm (UAX #9) implementation |
Content
Package: tcpdf-next/content
| Class | Description |
|---|---|
TextRenderer | High-level text rendering with shadows and effects |
JavaScriptManager | Embeds document-level JavaScript actions |
Layout
Package: tcpdf-next/layout
| Class | Description |
|---|---|
PageManager | Tracks pages, handles page breaks, manages current page state |
HeaderFooterManager | Repeating header and footer content management |
ColumnManager | Multi-column content flow |
BookletManager | Imposes pages for saddle-stitch booklet printing |
Html
Package: tcpdf-next/html
| Class | Description |
|---|---|
HtmlParser | Parses HTML markup into a DOM tree for rendering |
CssRule | Represents a single resolved CSS rule with specificity |
TableParser | Specialized parser for HTML table layout |
Form
Package: tcpdf-next/form
| Class | Description |
|---|---|
FormFieldManager | Creates and manages AcroForm fields |
FormFieldType | Enum for field types (Text, Password, Textarea, Checkbox, Radio, Listbox, Combobox, Button) |
Navigation
Package: tcpdf-next/navigation
| Class | Description |
|---|---|
BookmarkManager | Creates and nests document outline entries |
AnnotationManager | Adds markup annotations (highlight, note, underline) |
FileAttachment | Embeds file attachments in the document |
TocManager | Automatic table of contents generation |
Barcode
Package: tcpdf-next/barcode
| Class | Description |
|---|---|
BarcodeGenerator | Unified factory for all barcode types |
BarcodeType | Enum for 1D barcodes (CODE_39, CODE_128, EAN_13, ...) |
Barcode2DType | Enum for 2D barcodes (QR_CODE, DATAMATRIX, PDF417) |
Security
Package: tcpdf-next/security
| Class | Description |
|---|---|
Aes256Encryptor | AES-256 encryption with AESV3 handler |
DigitalSigner | PAdES digital signature creation |
TsaClient | RFC 3161 Time Stamping Authority client |
LtvManager | Long-Term Validation via DSS, OCSP stapling, and CRL embedding |
DssBuilder | Builds the Document Security Store dictionary |
Archive
Package: tcpdf-next/archive
| Class | Description |
|---|---|
PdfAManager | PDF/A-4 conformance enforcement and validation |
XmpMetadata | Generates XMP metadata packets (ISO 16684) |
OutputIntent | Manages ICC output intent profiles |
Accessibility
Package: tcpdf-next/accessibility
| Class | Description |
|---|---|
StructureTreeManager | Manages the tagged PDF structure tree |
RoleMap | Maps custom tags to standard PDF structure types |
Writer
Package: tcpdf-next/writer
| Class | Description |
|---|---|
PdfWriter | Orchestrates binary PDF output from the object registry |
Linearizer | Produces linearized (web-optimized) PDF output |
Laravel
Package: tcpdf-next/laravel
| Class | Description |
|---|---|
TcpdfServiceProvider | Registers bindings and publishes config |
Pdf (Facade) | Static facade for Document::create() |
PdfResponse | Returns a PDF as a Laravel HTTP response |
GeneratePdfJob | Queueable job for background PDF generation |
Artisan
Package: tcpdf-next/artisan
| Class | Description |
|---|---|
HtmlRenderer | Renders Blade / HTML templates to PDF via CLI |
ChromeBridge | Headless Chrome integration for pixel-perfect rendering |
RenderOptions | Configuration DTO for Artisan render commands |
Further Reading
- Document API -- Every public method on the
Documentclass - Enums Reference -- All 22 enums with values and usage
- Interfaces Reference -- Contract interfaces for DI and testing
- Value Objects API -- Factory methods, properties, and conversions