tc-lib Projects

The tc-lib package ecosystem behind tc-lib-pdf: what each package does, and when to install it on its own

tc-lib-pdf composes a set of independently versioned Composer packages. Installing tecnickcom/tc-lib-pdf pulls the ones it needs; each can also be required on its own by a project that wants only that piece.

Every package targets PHP 8.2 or later, is published under LGPL-3.0-or-later, and has generated API reference under /docs/srcdoc/.

Document Generation

  • tc-lib-pdf : the top-level library. Document authoring, text and HTML layout, page management, and PDF output. API reference · GitHub · Packagist
  • tc-lib-pdf-page : page geometry, formats, margins, the five page boxes, page groups, and page-level attributes.
  • tc-lib-pdf-graph : vector primitives, the graphics style stack, transformations, transparency, and shadings.

Text and Fonts

  • tc-lib-pdf-font : font loading, parsing, subsetting, embedding, and the font data generation step. See also /docs/fonts/.
  • tc-lib-unicode : Unicode string processing, the bidirectional algorithm (UAX #9), normalization, and Arabic shaping.
  • tc-lib-unicode-data : the generated Unicode character data tables that tc-lib-unicode reads.

Colour, Images, and Barcodes

  • tc-lib-color : colour parsing and conversion across RGB, HSL, CMYK, Lab, grayscale, and spot colours, for both CSS and PDF output.
  • tc-lib-pdf-image : image loading, PNG and JPEG parsing, transparency and soft masks, ICC profiles, and embedding.
  • tc-lib-barcode : 73 linear, postal, GS1, and two-dimensional barcode symbologies, rendered as PNG, SVG, HTML, or PDF operators.

Reading, Encryption, and Signing

Support