tecnickcom / tc-lib-pdf-graph
PHP library containing PDF graphic and geometric methods
Fund package maintenance!
Requires
- php: >=8.1
- ext-zlib: *
- tecnickcom/tc-lib-color: ^2.3
- tecnickcom/tc-lib-pdf-encrypt: ^2.1
Requires (Dev)
- pdepend/pdepend: ^2.16
- phpcompatibility/php-compatibility: ^10.0.0@dev
- phpmd/phpmd: ^2.15
- phpunit/phpunit: ^13.1 || ^12.5 || ^11.5 || ^10.5
- squizlabs/php_codesniffer: ^4.0
- dev-main
- 2.4.18
- 2.4.17
- 2.4.15
- 2.4.14
- 2.4.13
- 2.4.11
- 2.4.10
- 2.4.9
- 2.4.8
- 2.4.7
- 2.4.6
- 2.4.5
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
- 2.3.10
- 2.3.9
- 2.3.8
- 2.3.7
- 2.3.5
- 2.3.4
- 2.3.2
- 2.3.1
- 2.2.11
- 2.2.10
- 2.2.8
- 2.2.7
- 2.2.6
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.0
- 2.1.1
- 2.1.0
- 2.0.13
- 2.0.12
- 2.0.11
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 1.7.23
- 1.7.22
- 1.7.21
- 1.7.19
- 1.7.18
- 1.7.17
- 1.7.16
- 1.7.15
- 1.7.13
- 1.7.12
- 1.7.11
- 1.7.10
- 1.7.9
- 1.7.8
- 1.7.7
- 1.7.6
- 1.7.5
- 1.7.4
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5.16
- 1.5.14
- 1.5.13
- 1.5.12
- 1.5.11
- 1.5.8
- 1.5.7
- 1.5.6
- 1.5.5
- 1.5.4
- 1.5.3
- 1.5.0
- 1.4.11
- 1.4.10
- 1.4.9
- 1.4.8
- 1.4.7
- 1.4.6
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.2.0
- 1.1.2
- 1.1.0
- 1.0.2
- 1.0.1
This package is auto-updated.
Last update: 2026-04-20 07:18:22 UTC
README
Geometric drawing and transformation primitives for PDF content streams.
If this library helps your rendering stack, please consider supporting development via PayPal.
Overview
tc-lib-pdf-graph implements low-level drawing operations used to build PDF graphic content.
It exposes the primitives needed to compose paths and painting operations while keeping the API close to PDF graphics operators. This makes it suitable as a foundation layer for charting, vector drawing, and custom layout engines.
| Namespace | \Com\Tecnick\Pdf\Graph |
| Author | Nicola Asuni info@tecnick.com |
| License | GNU LGPL v3 - see LICENSE |
| API docs | https://tcpdf.org/docs/srcdoc/tc-lib-pdf-graph |
| Packagist | https://packagist.org/packages/tecnickcom/tc-lib-pdf-graph |
Features
Drawing Primitives
- Paths, lines, curves, and clipping operations
- Style handling for stroke/fill combinations
- Gradient and shading support
Transformations
- Matrix-based geometric transforms
- Coordinate conversion helpers
- PDF/A-aware behavior controls
Requirements
- PHP 8.1 or later
- Extension:
zlib - Composer
Installation
composer require tecnickcom/tc-lib-pdf-graph
Quick Start
<?php require_once __DIR__ . '/vendor/autoload.php'; $draw = new \Com\Tecnick\Pdf\Graph\Draw( 1.0, 210, 297, new \Com\Tecnick\Color\Pdf(), new \Com\Tecnick\Pdf\Encrypt\Encrypt(), false ); echo $draw->getClippingRect(10, 10, 50, 20);
Development
make deps
make help
make qa
Packaging
make rpm make deb
For system packages, bootstrap with:
require_once '/usr/share/php/Com/Tecnick/Pdf/Graph/autoload.php';
Contributing
Contributions are welcome. Please review CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md.
Contact
Nicola Asuni - info@tecnick.com