Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Tc Lib Pdf Filter

Tc Lib Pdf Filter Laravel Package

tecnickcom/tc-lib-pdf-filter

Pure-PHP decoder for standard PDF stream filters, including FlateDecode, LZWDecode, RunLengthDecode, ASCIIHexDecode, ASCII85Decode, CCITTFaxDecode, DCTDecode, JPXDecode and JBIG2Decode. Chain multiple filters in sequence, with typed exceptions for invalid or unknown filters. Requires PHP 8.2+ and zl...

View on GitHub
Deep Wiki
Context7

tc-lib-pdf-filter is a pure-PHP decoder library for standard PDF stream filters, part of the tc-lib-pdf / TCPDF ecosystem. It isolates filter logic into one component, so parsing workflows can decode encoded PDF streams through a predictable filter pipeline with typed exceptions for unknown or invalid filters.

  • Supports FlateDecode, LZWDecode, RunLengthDecode, ASCIIHexDecode, ASCII85Decode
  • Image filters: CCITTFaxDecode, DCTDecode, JPXDecode, JBIG2Decode
  • Decode a single filter or chain multiple filters in sequence
  • Namespace \Com\Tecnick\Pdf\Filter; requires PHP 8.2+ and zlib
  • Install via Composer: composer require tecnickcom/tc-lib-pdf-filter
Frequently asked questions about Tc Lib Pdf Filter
What is tecnickcom/tc-lib-pdf-filter used for in Laravel?
It is a stateless decoder for standard PDF stream filters, so it turns encoded PDF stream bytes into decoded bytes through a predictable filter pipeline. In Laravel it fits best behind a thin adapter in an application support layer, because it has no service provider, container awareness, or framework coupling. It does not parse PDF object graphs, resolve xrefs, traverse pages, extract text, or render documents.
How do I install tc-lib-pdf-filter in a Laravel project?
Install it with composer require tecnickcom/tc-lib-pdf-filter. The package requires PHP 8.2 or later and the zlib extension. No Laravel service provider is required, so you can call it directly or wrap it in your own PDF support class.
Does this package support Laravel 10, 11, or 12?
The package is framework-agnostic and does not declare Laravel-specific integration points, so Laravel version compatibility is primarily a matter of your application running on PHP 8.2 or later with zlib enabled. It can be used in any Laravel release that meets that PHP floor. Confirm your fleet's PHP version before adoption, especially if older assessments assumed PHP 7.4.
How do I decode multiple PDF filters in sequence?
The documented public surface uses Filter::decodeAll(array $filters, string $data), passing the filter names in the order they should be applied. The package also supports decoding a single filter and exposes typed exceptions for unknown or invalid filters. Treat the README and source as authoritative, because internal notes referencing different namespaces or constructors may be outdated.
Can tc-lib-pdf-filter decrypt password-protected PDFs?
There is no evidence in the README feature list that it performs password-based PDF decryption. The listed filters cover compression and transformation filters such as FlateDecode, LZWDecode, ASCIIHexDecode, DCTDecode, JPXDecode, and JBIG2Decode, but not the Standard Security Handler with RC4 or AES. Any claim that this package decrypts protected PDFs should be validated against fixtures before it reaches a roadmap.
Does it support image filters like DCTDecode, JPXDecode, JBIG2Decode, and CCITTFaxDecode?
Yes, the feature list includes CCITTFaxDecode, DCTDecode, JPXDecode, and JBIG2Decode alongside FlateDecode, LZWDecode, RunLengthDecode, ASCIIHexDecode, and ASCII85Decode. However, pure-PHP JPEG2000 and JBIG2 decoding may be partial or passthrough rather than full image reconstruction. Test explicitly with representative fixtures before assuming full binary image coverage.
Is tc-lib-pdf-filter safe to use with untrusted PDFs in production?
The API decodes whole buffers, so you should enforce input size caps and decompression ratio guards at your application boundary to reduce memory and decompression-bomb risk. Run decoding in an isolated worker or queue where possible and handle typed exceptions for invalid or unknown filters. The package is a decoding primitive, not a complete sandbox for hostile PDF processing.
Does it handle FlateDecode predictors used in PDF xref and content streams?
The README feature list does not explicitly enumerate /Predictor handling for FlateDecode, and PNG predictors are common in real PDFs. Verify behavior with real xref and content stream fixtures early, and be prepared to add post-processing for predictor parameters in your own pipeline. Do not assume predictor support without proving it against source and test files.
How does tc-lib-pdf-filter compare with TCPDF or a full PDF parsing library?
It is an extracted, leaf-level filter component from the TCPDF and tc-lib-pdf ecosystem, not a replacement for a full PDF parser or renderer. Use it as the decompression primitive inside a larger ingestion workflow that handles object parsing, stream extraction, DecodeParms retrieval, and output post-processing. If your requirement is document understanding, search, or rendering, this package addresses only a small part of that work.
Is tc-lib-pdf-filter actively maintained, and what license does it use?
It is part of the TCPDF ecosystem, but the split package itself has low independent adoption and a single-maintainer bus factor, so pin versions and review diffs before upgrades. The README states GNU LGPL v3, while registry metadata has been reported as NOASSERTION, so legal should confirm the license for your distribution model. A vendor fork is relatively cheap if maintenance or licensing becomes a concern.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names