PHPackages                             tecnickcom/tc-lib-pdf-filter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. tecnickcom/tc-lib-pdf-filter

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

tecnickcom/tc-lib-pdf-filter
============================

PHP library to decode PDF compression and encryption filters

2.9.1(1w ago)6130.4k↑247.8%51LGPL-3.0-or-laterPHPPHP &gt;=8.2CI passing

Since May 6Pushed 1w ago1 watchersCompare

[ Source](https://github.com/tecnickcom/tc-lib-pdf-filter)[ Packagist](https://packagist.org/packages/tecnickcom/tc-lib-pdf-filter)[ Docs](https://tcpdf.org)[ GitHub Sponsors](https://github.com/sponsors/tecnickcom)[ RSS](/packages/tecnickcom-tc-lib-pdf-filter/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (16)Versions (126)Used By (1)

tc-lib-pdf-filter
=================

[](#tc-lib-pdf-filter)

> Decoder library for standard PDF stream filters.

[![Latest Stable Version](https://camo.githubusercontent.com/113cf928d1cd5481f0d91ee720278bddda13d35206c6f0d2ce089dfeae94bf47/68747470733a2f2f706f7365722e707567782e6f72672f7465636e69636b636f6d2f74632d6c69622d7064662d66696c7465722f76657273696f6e)](https://packagist.org/packages/tecnickcom/tc-lib-pdf-filter)[![Build](https://github.com/tecnickcom/tc-lib-pdf-filter/actions/workflows/check.yml/badge.svg)](https://github.com/tecnickcom/tc-lib-pdf-filter/actions/workflows/check.yml)[![Coverage](https://camo.githubusercontent.com/10a9a871c2f9a7f01e37c56c02b9c852b09a6ee5fd49ea219fbde1e143d19ca9/68747470733a2f2f636f6465636f762e696f2f67682f7465636e69636b636f6d2f74632d6c69622d7064662d66696c7465722f67726170682f62616467652e7376673f746f6b656e3d32334b42395434364841)](https://codecov.io/gh/tecnickcom/tc-lib-pdf-filter)[![License](https://camo.githubusercontent.com/333d820f1121ceb1a07177dfb206b2de9b7b5a15704d6b8388bb587078728506/68747470733a2f2f706f7365722e707567782e6f72672f7465636e69636b636f6d2f74632d6c69622d7064662d66696c7465722f6c6963656e7365)](https://packagist.org/packages/tecnickcom/tc-lib-pdf-filter)[![Downloads](https://camo.githubusercontent.com/e20a22b53c55afa4ababc569f75a0cd889256677f43a1ce724588751db69bde4/68747470733a2f2f706f7365722e707567782e6f72672f7465636e69636b636f6d2f74632d6c69622d7064662d66696c7465722f646f776e6c6f616473)](https://packagist.org/packages/tecnickcom/tc-lib-pdf-filter)

[![Sponsor on GitHub](https://camo.githubusercontent.com/dd89cb32d6e7ff9dbb0fa7ce84923567358b220feb9198b3720beabc3153da6a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73706f6e736f722d6769746875622d4541344141412e7376673f6c6f676f3d67697468756273706f6e736f7273266c6f676f436f6c6f723d7768697465)](https://github.com/sponsors/tecnickcom)

> 💖 Part of the [tc-lib-pdf / TCPDF](https://github.com/tecnickcom/tc-lib-pdf) ecosystem (100M+ installs). [Sponsor its maintenance →](https://github.com/sponsors/tecnickcom)

---

Overview
--------

[](#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 **License**[GNU LGPL v3](https://www.gnu.org/copyleft/lesser.html) - see [LICENSE](LICENSE)**API docs****Packagist**---

Features
--------

[](#features)

### PDF Filters

[](#pdf-filters)

- `FlateDecode`, `LZWDecode`, `RunLengthDecode`
- `ASCIIHexDecode`, `ASCII85Decode`
- `CCITTFaxDecode`, `DCTDecode`, `JPXDecode`, `JBIG2Decode`

### API Design

[](#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
------------

[](#requirements)

- PHP 8.2 or later
- Extensions: `zlib`, `pcre`
- Composer

---

Installation
------------

[](#installation)

```
composer require tecnickcom/tc-lib-pdf-filter
```

---

Quick Start
-----------

[](#quick-start)

```
