tecnickcom / tc-lib-pdf-graph
PHP library containing PDF graphic and geometric methods
Fund package maintenance!
2.17.2
2026-09-05 07:37 UTC
Requires
- php: ^8.2
- ext-zlib: *
- tecnickcom/tc-lib-color: ^3.0
- tecnickcom/tc-lib-pdf-encrypt: ^2.11
Requires (Dev)
- carthage-software/mago: 1.47.6
- pdepend/pdepend: ^2.16
- phpunit/phpunit: ^11.5 || ^12.5 || ^13.3
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- 2.17.2
- 2.17.1
- 2.17.0
- 2.16.0
- 2.15.5
- 2.15.4
- 2.15.3
- 2.15.2
- 2.15.1
- 2.15.0
- 2.14.4
- 2.14.3
- 2.14.2
- 2.14.1
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.24
- 2.4.23
- 2.4.22
- 2.4.21
- 2.4.20
- 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-09-05 07:37:41 UTC
README
Geometric drawing and transformation primitives for PDF content streams.
💖 Part of the tc-lib-pdf / TCPDF ecosystem (100M+ installs). Sponsor its maintenance →
Overview
tc-lib-pdf-graph generates the content stream commands for the graphic and geometric primitives of a PDF document.
| 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
- Points, lines, rectangles and Bezier curves
- Ellipses, circles, elliptical arcs and pie sectors
- Polygons, regular polygons, star polygons and rounded rectangles
- Arrows, crop marks and registration marks
Styles and Painting
- Style stack with line width, cap, join, miter limit, dash pattern and colors
- Path-painting and clipping operators
- Transparency, blend modes and overprint through ExtGState objects
- PDF/A mode that suppresses the ExtGState and shading output
Gradients
- Axial and radial shadings with multiple color stops and per-stop opacity
- Coons patch meshes and color registration bars
Transformations
- Scaling, rotation, mirroring, reflection, translation and skewing
- Transformation matrix product and transformation stack
Requirements
- PHP 8.2 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.