tecnickcom/tc-lib-pdf-parser
Parse raw PDF data into structured PHP arrays for content inspection, metadata extraction, validation, and migration pipelines. Pure-PHP, PHP 8.2+, with cross-reference and object stream parsing plus typed exceptions.
Parser library for reading and extracting PDF document structures.
💖 Part of the tc-lib-pdf / TCPDF ecosystem (100M+ installs). Sponsor its maintenance →
tc-lib-pdf-parser parses raw PDF data into structured PHP arrays suitable for extraction, analysis, and downstream processing.
The parser is designed for tooling scenarios such as content inspection, metadata extraction, validation, and migration pipelines. It favors clear structured output so applications can build higher-level analysis features without depending on fragile regular-expression parsing.
| Namespace | \Com\Tecnick\Pdf\Parser |
| Author | Nicola Asuni [email protected] |
| License | GNU LGPL v3 - see LICENSE |
| API docs | https://tcpdf.org/docs/srcdoc/tc-lib-pdf-parser |
| Packagist | https://packagist.org/packages/tecnickcom/tc-lib-pdf-parser |
composer require tecnickcom/tc-lib-pdf-parser
<?php
require_once __DIR__ . '/vendor/autoload.php';
$raw = file_get_contents('/path/to/document.pdf');
$parser = new \Com\Tecnick\Pdf\Parser\Parser(['ignore_filter_errors' => true]);
$data = $parser->parse((string) $raw);
var_dump($data);
make deps
make help
make qa
make rpm
make deb
For system packages, bootstrap with:
require_once '/usr/share/php/Com/Tecnick/Pdf/Parser/autoload.php';
Contributions are welcome. Please review CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md.
How can I help you explore Laravel packages today?