tecnickcom / tc-lib-pdf-image
PHP library containing PDF Image methods
Fund package maintenance!
Requires
- php: >=8.1
- ext-gd: *
- ext-zlib: *
- tecnickcom/tc-lib-color: ^2.5
- tecnickcom/tc-lib-file: ^2.5
- tecnickcom/tc-lib-pdf-encrypt: ^2.2
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.2.2
- 2.2.1
- 2.2.0
- 2.1.42
- 2.1.41
- 2.1.39
- 2.1.38
- 2.1.36
- 2.1.35
- 2.1.34
- 2.1.32
- 2.1.31
- 2.1.30
- 2.1.29
- 2.1.28
- 2.1.27
- 2.1.26
- 2.1.25
- 2.1.24
- 2.1.23
- 2.1.21
- 2.1.20
- 2.1.19
- 2.1.18
- 2.1.17
- 2.1.16
- 2.1.14
- 2.1.13
- 2.1.12
- 2.1.10
- 2.1.8
- 2.1.7
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.15
- 2.0.14
- 2.0.13
- 2.0.12
- 2.0.11
- 2.0.10
- 2.0.8
- 2.0.7
- 2.0.6
- 1.4.20
- 1.4.19
- 1.4.18
- 1.4.16
- 1.4.15
- 1.4.14
- 1.4.13
- 1.4.12
- 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.3.15
- 1.3.14
- 1.3.13
- 1.3.12
- 1.3.9
- 1.3.8
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.0
- 1.2.11
- 1.2.10
- 1.2.9
- 1.2.8
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.3
- 1.1.2
- 1.1.0
- 1.0.1
- 1.0.0
This package is auto-updated.
Last update: 2026-05-01 19:06:29 UTC
README
Image import and embedding utilities for PDF streams.
If this project is useful to you, please consider supporting development via GitHub Sponsors.
Overview
tc-lib-pdf-image handles image import, conversion, and output structures used by PDF generators.
The library isolates image pipeline concerns such as format handling, normalization, and object generation for PDF embedding. Keeping this logic separate helps reduce complexity in document-level code and makes image behavior easier to validate and maintain.
| Namespace | \Com\Tecnick\Pdf\Image |
| Author | Nicola Asuni info@tecnick.com |
| License | GNU LGPL v3 - see LICENSE |
| API docs | https://tcpdf.org/docs/srcdoc/tc-lib-pdf-image |
| Packagist | https://packagist.org/packages/tecnickcom/tc-lib-pdf-image |
Features
Import Support
- Native handling for PNG and JPEG
- Additional format handling through GD processing paths
- Transparency and palette-related metadata handling
PDF Integration
- Image caching keys for repeated assets
- Alternate image support for print/display contexts
- Output helpers for embedding image objects
Requirements
- PHP 8.1 or later
- Extensions:
gd,zlib - Composer
Installation
composer require tecnickcom/tc-lib-pdf-image
Quick Start
<?php require_once __DIR__ . '/vendor/autoload.php'; $img = new \Com\Tecnick\Pdf\Image\Import(); $imageId = $img->add('/path/to/image.png'); var_dump($imageId);
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/Image/autoload.php';
Contributing
Contributions are welcome. Please review CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md.
Contact
Nicola Asuni - info@tecnick.com