tecnickcom/tc-lib-pdf-graph
Low-level geometric drawing and transformation primitives for PDF content streams. Compose paths, lines, curves, clipping, stroke/fill styles, gradients and shading, plus matrix transforms and coordinate helpers, with PDF/A-aware behavior.
zlib, Composer-only install (with an RPM/DEB system-package path). This constrains our runtime upgrade policy and packaging story for on-prem customers.Consider it when all of the following hold:
Com\Tecnick\Pdf namespace and are prepared to also pull in its siblings (tc-lib-color, tc-lib-pdf-encrypt), which the constructor signature effectively requires.Look elsewhere when:
tc-lib-pdf itself, mPDF, Dompdf, or a browser-based pipeline — this package alone renders nothing product-visible.Recommended next step: a time-boxed spike (1–2 engineer-days) that reconstructs one real output — e.g. a stamped invoice diagram or a small chart — through Draw, and records the sibling-package coupling, the LGPL opinion, and the PHP upgrade cost. Gate the decision on those three artifacts, not on the README.
For executives: This is not a product; it is a low-level building block for drawing shapes and geometry inside PDF files, published by the maintainers of TCPDF — one of the most widely deployed PHP PDF toolkits. It is small, focused, actively versioned, and free to license under LGPL v3. There are two reasons to care: it can shorten a future investment in native charting, diagramming, or archival-compliant PDF output, and it carries two governance items we should settle before spending engineering time — a license-metadata inconsistency that needs legal confirmation, and a hard requirement on PHP 8.2+. It has negligible standalone adoption, so we would be relying on the parent ecosystem's track record rather than on this module's independent traction. Recommendation: fund a short, bounded evaluation only if native PDF graphics appears on the roadmap; otherwise note it as an available option and move on.
For engineering: Treat this as a primitives layer, not a PDF library. It exposes PDF graphics operators close to the metal — paths, lines, Béziers, clipping, stroke/fill style state, gradients and shadings, matrix transforms, coordinate helpers, PDF/A-aware toggles. Expect tight coupling: the Draw constructor takes a color object and an encrypt object from sibling packages, so the real dependency surface is the tc-lib-pdf suite. Requirements are PHP 8.2+, zlib, Composer. Test coverage and CI are published. What it does not give you: text layout, pagination, fonts, images, tagged/accessible PDF, or any document model. If we adopt, we own everything above the operator layer. Please validate against our own output fixtures during the spike — independent usage evidence is thin, so our test suite has to be the confidence signal.
How can I help you explore Laravel packages today?