Decoder library for standard PDF stream filters.
If this project is useful to you, please consider supporting development via GitHub Sponsors.
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 |
FlateDecode,LZWDecode,RunLengthDecodeASCIIHexDecode,ASCII85DecodeCCITTFaxDecode,DCTDecode,JPXDecode,JBIG2Decode
- Decode one filter or apply multiple filters in sequence
- Pure-PHP implementation suitable for parser integration
- Typed exceptions for unknown/invalid filter handling
- PHP 8.1 or later
- Extensions:
zlib,pcre - Composer
composer require tecnickcom/tc-lib-pdf-filter<?php
require_once __DIR__ . '/vendor/autoload.php';
$filter = new \Com\Tecnick\Pdf\Filter\Filter();
$decoded = $filter->decodeAll(['ASCIIHexDecode', 'FlateDecode'], $data);make deps
make help
make qamake rpm
make debFor system packages, bootstrap with:
require_once '/usr/share/php/Com/Tecnick/Pdf/Filter/autoload.php';Contributions are welcome. Please review CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md.
Nicola Asuni - info@tecnick.com