Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Tc Lib Pdf Graph

Tc Lib Pdf Graph Laravel Package

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.

View on GitHub
Deep Wiki
Context7

PHP library containing PDF graphic and geometric methods

Frequently asked questions about Tc Lib Pdf Graph
What is tecnickcom/tc-lib-pdf-graph used for?
It is a low-level primitive layer that emits PDF graphics operators such as paths, Bézier curves, clipping, stroke and fill styles, transformation matrices, and gradient or shading dictionaries into a content stream. It is not a PDF generator and does not manage pages, object tables, or output. In practice it arrives as a transitive dependency of tecnickcom/tc-lib-pdf and is used directly only when you need custom vector drawing, chart rendering, or a bespoke layout engine.
How do I install tc-lib-pdf-graph in a Laravel application?
Run composer require tecnickcom/tc-lib-pdf-graph on PHP 8.2 or later with the zlib extension available. The package autoloads PSR-4 classes under the Com\Tecnick\Pdf\Graph namespace and has no framework coupling. Most Laravel applications get it indirectly through tc-lib-pdf rather than requiring it directly.
Does tc-lib-pdf-graph work with Laravel 9 or Laravel 10?
The package requires PHP 8.2 or later, which effectively limits direct use to Laravel 11 and 12 host applications. Laravel 9 and 10 projects typically run on PHP 8.0 or 8.1, so they are precluded until the runtime is upgraded. Check legacy queue workers and CI images for the same PHP version floor.
Do I need a service provider to use tc-lib-pdf-graph in Laravel?
No service provider is required because the package is framework-agnostic and ships no Laravel integration. The idiomatic approach is a thin wrapper: bind a configured Draw instance through your own provider, resolve it in a dedicated service class, and keep vendor namespace imports confined there. Queued jobs and Artisan commands should consume the wrapper rather than the vendor classes directly.
Why does the Draw constructor require Color\Pdf and Encrypt objects?
The Draw constructor expects a Com\Tecnick\Color\Pdf instance and a Com\Tecnick\Pdf\Encrypt\Encrypt instance as collaborators. The encryption object matters because its mode affects PDF/A behavior and output semantics. You must supply correctly configured instances rather than relying on defaults.
Should I use tc-lib-pdf-graph or tc-lib-pdf to generate PDFs?
If the requirement is simply to generate PDFs, evaluate tecnickcom/tc-lib-pdf, which owns document structure, pages, object and xref tables, and output. This package only writes graphics operators into an existing content stream. Choose it directly only when you need vector geometry that the higher-level facade does not expose.
Why are my shapes in the wrong position or invisible with tc-lib-pdf-graph?
PDF coordinates originate at the bottom-left, while most UI and canvas systems use a top-left origin, so unadjusted coordinates place shapes in unexpected positions. Graphics state must be balanced with matching q and Q operators, otherwise styles and clipping leak between drawing operations. Colors and gradients referenced by name must also be registered in the page resource dictionary or they will not render.
Can tc-lib-pdf-graph produce PDF/A compliant output?
Yes, the package includes PDF/A-aware behavior and a pdfa constructor flag, but conformance depends on how you configure the drawing, color, and encryption collaborators. You should validate output against a specific target profile rather than assuming the flag is sufficient. Encryption mode in particular changes output semantics and can conflict with PDF/A requirements.
What license is tc-lib-pdf-graph released under?
The README declares GNU LGPL v3, while the Composer metadata reports NOASSERTION, which is a scanner detection gap rather than a confirmed conflict. LGPL in a distributed or white-label PHP product usually needs a legal opinion, especially for on-premise shipping. Confirm the license position before adopting it in a commercial distribution.
Is tc-lib-pdf-graph actively maintained and safe for production?
It is maintained by a single author, Nicola Asuni, with a small number of direct dependents, so direct adoption carries bus-factor risk. The offsetting factor is that it sits inside the tc-lib-pdf and TCPDF ecosystem with a claimed 100M+ install base, so the code path is exercised heavily through the parent package. Note that the supplied release metadata lists a future date, so verify recency on Packagist rather than treating it as a maturity signal.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource