Skip to content

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

ClassDescription
DocumentCentral entry point -- fluent facade that delegates to 12 traits
ObjectRegistryTracks all PDF indirect objects and assigns unique object numbers
TransactionManagerSavepoint / rollback semantics for complex layout operations
CrossReferenceStreamBuilds the PDF 2.0 binary cross-reference stream

Contracts

Package: tcpdf-next/contracts

Interface / EnumKindDescription
PdfDocumentInterfaceInterfacePrimary API contract for any PDF document implementation
FontManagerInterfaceInterfaceFont loading, registration, and subsetting contract
SignerInterfaceInterfaceDigital signature provider abstraction
HsmSignerInterfaceInterfaceExtended signer for hardware security modules
OrientationEnumPage orientation (Portrait, Landscape)
AlignmentEnumText alignment (Left, Center, Right, Justified)
OutputDestinationEnumOutput target (Inline, Download, File, String)
SignatureLevelEnumPAdES conformance level (B-B through B-LTA)

Value Objects

Package: tcpdf-next/value-objects

ClassDescription
PageSizeNamed or custom page size with preset factories (A0 -- A6, Letter, Legal, Tabloid)
MarginFour-sided page margins (top, right, bottom, left)
PositionImmutable x--y coordinate
DimensionImmutable width--height pair
UnitUnit conversion helpers (mm, pt, cm, in)

Graphics

Package: tcpdf-next/graphics

ClassDescription
ColorImmutable color representation (RGB, CMYK, Gray, Spot)
ColorSpaceEnum for DeviceRGB, DeviceCMYK, DeviceGray, Separation
BlendModeTransparency blend mode enum (Normal, Multiply, Screen, Overlay, ...)
LayerManagerOptional Content Group (OCG) management
GradientManagerLinear and radial gradient creation

Typography

Package: tcpdf-next/typography

ClassDescription
FontManagerCentral registry for loading and managing fonts
FontSubsetterCreates minimal font subsets containing only used glyphs
FontInfoReadonly data object exposing glyph metrics, ascender, descender
BiDiResolverUnicode Bidirectional Algorithm (UAX #9) implementation

Content

Package: tcpdf-next/content

ClassDescription
TextRendererHigh-level text rendering with shadows and effects
JavaScriptManagerEmbeds document-level JavaScript actions

Layout

Package: tcpdf-next/layout

ClassDescription
PageManagerTracks pages, handles page breaks, manages current page state
HeaderFooterManagerRepeating header and footer content management
ColumnManagerMulti-column content flow
BookletManagerImposes pages for saddle-stitch booklet printing

Html

Package: tcpdf-next/html

ClassDescription
HtmlParserParses HTML markup into a DOM tree for rendering
CssRuleRepresents a single resolved CSS rule with specificity
TableParserSpecialized parser for HTML table layout

Form

Package: tcpdf-next/form

ClassDescription
FormFieldManagerCreates and manages AcroForm fields
FormFieldTypeEnum for field types (Text, Password, Textarea, Checkbox, Radio, Listbox, Combobox, Button)

Package: tcpdf-next/navigation

ClassDescription
BookmarkManagerCreates and nests document outline entries
AnnotationManagerAdds markup annotations (highlight, note, underline)
FileAttachmentEmbeds file attachments in the document
TocManagerAutomatic table of contents generation

Barcode

Package: tcpdf-next/barcode

ClassDescription
BarcodeGeneratorUnified factory for all barcode types
BarcodeTypeEnum for 1D barcodes (CODE_39, CODE_128, EAN_13, ...)
Barcode2DTypeEnum for 2D barcodes (QR_CODE, DATAMATRIX, PDF417)

Security

Package: tcpdf-next/security

ClassDescription
Aes256EncryptorAES-256 encryption with AESV3 handler
DigitalSignerPAdES digital signature creation
TsaClientRFC 3161 Time Stamping Authority client
LtvManagerLong-Term Validation via DSS, OCSP stapling, and CRL embedding
DssBuilderBuilds the Document Security Store dictionary

Archive

Package: tcpdf-next/archive

ClassDescription
PdfAManagerPDF/A-4 conformance enforcement and validation
XmpMetadataGenerates XMP metadata packets (ISO 16684)
OutputIntentManages ICC output intent profiles

Accessibility

Package: tcpdf-next/accessibility

ClassDescription
StructureTreeManagerManages the tagged PDF structure tree
RoleMapMaps custom tags to standard PDF structure types

Writer

Package: tcpdf-next/writer

ClassDescription
PdfWriterOrchestrates binary PDF output from the object registry
LinearizerProduces linearized (web-optimized) PDF output

Laravel

Package: tcpdf-next/laravel

ClassDescription
TcpdfServiceProviderRegisters bindings and publishes config
Pdf (Facade)Static facade for Document::create()
PdfResponseReturns a PDF as a Laravel HTTP response
GeneratePdfJobQueueable job for background PDF generation

Artisan

Package: tcpdf-next/artisan

ClassDescription
HtmlRendererRenders Blade / HTML templates to PDF via CLI
ChromeBridgeHeadless Chrome integration for pixel-perfect rendering
RenderOptionsConfiguration DTO for Artisan render commands

Further Reading

Released under the LGPL-3.0-or-later License.