tecnickcom / tc-lib-pdf-filter
PHP library to decode PDF compression and encryption filters
Fund package maintenance!
Requires
- php: >=8.1
- ext-pcre: *
- ext-zlib: *
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.0.51
- 2.0.49
- 2.0.48
- 2.0.46
- 2.0.45
- 2.0.44
- 2.0.42
- 2.0.41
- 2.0.40
- 2.0.39
- 2.0.38
- 2.0.37
- 2.0.36
- 2.0.35
- 2.0.34
- 2.0.33
- 2.0.31
- 2.0.30
- 2.0.29
- 2.0.28
- 2.0.27
- 2.0.26
- 2.0.24
- 2.0.23
- 2.0.22
- 2.0.21
- 2.0.20
- 2.0.19
- 2.0.18
- 2.0.17
- 2.0.16
- 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.37
- 1.4.36
- 1.4.35
- 1.4.33
- 1.4.32
- 1.4.31
- 1.4.30
- 1.4.29
- 1.4.27
- 1.4.26
- 1.4.25
- 1.4.24
- 1.4.23
- 1.4.22
- 1.4.21
- 1.4.20
- 1.4.19
- 1.4.18
- 1.4.17
- 1.4.16
- 1.4.15
- 1.4.14
- 1.4.13
- 1.4.12
- 1.4.11
- 1.4.10
- 1.4.9
- 1.4.7
- 1.4.6
- 1.4.5
- 1.4.4
- 1.4.1
- 1.3.11
- 1.3.10
- 1.3.9
- 1.3.8
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.0
- 1.2.1
- 1.2.0
- 1.1.24
- 1.1.23
- 1.1.22
- 1.1.21
- 1.1.20
- 1.1.19
- 1.1.18
- 1.1.17
- 1.1.16
- 1.1.15
- 1.1.14
- 1.1.13
- 1.1.12
- 1.1.11
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.2
- 1.0.1
- 1.0.0
This package is auto-updated.
Last update: 2026-04-28 21:03:09 UTC
README
Decoder library for standard PDF stream filters.
If this library helps your parser stack, please consider supporting development via PayPal.
Overview
tc-lib-pdf-filter decodes compression and transformation filters defined by the PDF specification.
It is intended for both generation and parsing workflows where PDF streams must be encoded or decoded according to the standard filter pipeline. By isolating filter logic in one component, callers get predictable behavior and easier testing across different document inputs.
| Namespace | \Com\Tecnick\Pdf\Filter |
| Author | Nicola Asuni info@tecnick.com |
| License | GNU LGPL v3 - see LICENSE |
| API docs | https://tcpdf.org/docs/srcdoc/tc-lib-pdf-filter |
| Packagist | https://packagist.org/packages/tecnickcom/tc-lib-pdf-filter |
Features
PDF Filters
FlateDecode,LZWDecode,RunLengthDecodeASCIIHexDecode,ASCII85DecodeCCITTFaxDecode,DCTDecode,JPXDecode,JBIG2Decode
API Design
- Decode one filter or apply multiple filters in sequence
- Pure-PHP implementation suitable for parser integration
- Typed exceptions for unknown/invalid filter handling
Requirements
- PHP 8.1 or later
- Extensions:
zlib,pcre - Composer
Installation
composer require tecnickcom/tc-lib-pdf-filter
Quick Start
<?php require_once __DIR__ . '/vendor/autoload.php'; $filter = new \Com\Tecnick\Pdf\Filter\Filter(); $decoded = $filter->decodeAll(['ASCIIHexDecode', 'FlateDecode'], $data);
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/Filter/autoload.php';
Contributing
Contributions are welcome. Please review CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md.
Contact
Nicola Asuni - info@tecnick.com