kreatys/pdf-parser-bundle
A PHP bundle for extracting text and metadata from PDF documents. Wraps a PDF parser behind a simple service interface so you can pull content, page counts, and document info from uploaded or stored PDFs in your PHP application.
Architecture fit. The package is a Symfony bundle, not a Laravel package, and that mismatch is the whole evaluation. Its entire contribution is a DI extension, a configuration tree, and a service definition that wires an underlying PDF parser into Symfony's container. In Laravel that value proposition evaporates — the equivalent is a one-line singleton binding in a service provider we already own. Adopting it would mean pulling Symfony's dependency-injection, config, and http-kernel components into a Laravel app to obtain a service locator we can write ourselves in ten lines. Score 0, zero stars, zero dependents confirms there is no ecosystem signal to weigh against that structural mismatch.
Integration feasibility. Technically possible, practically not worth it. Laravel performs no bundle auto-discovery, so KreatysPdfParserBundle::load() is never called and the bundle's Extension/Configuration classes never execute. A developer would end up instantiating the wrapper's Service/PdfParser.php by hand — at which point the only artifact actually in use is smplot/pdfparser, the dependency, not the package under evaluation. We would be carrying a package whose DI machinery is dead code in our runtime.
Technical risk.
smplot/pdfparser is a derivative of smalot/pdfparser. The lineage must be checked for divergence, stale patches, and PHP 8.2+ compatibility before any dependency decision.Key questions.
smalot/pdfparser or the smplot fork — and what is commit recency and PHP version matrix for each?Stack fit. Laravel 10–12 on PHP 8.2+. The bundle's Symfony constraints are the blocker: Symfony 3/4-era bundles commonly cap symfony/* at versions that conflict with a modern Laravel's transitive Symfony packages (symfony/console, symfony/http-foundation, symfony/process). Expect a Composer solver failure or a downgrade cascade. Reading the composer.json require block is the first gate; a conflict there ends the evaluation.
Migration path (recommended). Do not install the bundle. Instead:
composer require the maintained upstream (smalot/pdfparser or a verified alternative) directly.App\Contracts\PdfTextExtractor — in a PdfServiceProvider. This preserves the one genuine benefit a wrapper offers (swappability) without the wrapper.Compatibility. Confirm PHP constraint, psr/log version, and whether the parser requires ext-mbstring or ext-zlib in the base image. Check for global state or static caches that would misbehave under Octane's long-lived workers — the most likely runtime surprise in a Laravel deployment. Note the wrapper is stateful (parseFile() then getText()), so a naive singleton binding risks data bleed across requests under Octane; bind non-singleton or reset explicitly.
Sequencing.
Maintenance. We would own it. No release cadence, no upstream triage, no dependency-bump PRs. If adopted anyway, pin the exact version, vendor any patch we apply, and record an explicit owner and review date — otherwise it becomes an unowned transitive dependency that silently ages out of PHP compatibility.
Support. None available. No maintainer responsiveness to test, no documented troubleshooting, no community to escalate to. Internal documentation and a runbook are prerequisites, not follow-ups.
Scaling. PDF parsing is CPU- and memory-bound and does not scale by adding web workers. The correct shape is a dedicated queue with its own worker pool, conservative memory_limit, retry_after exceeding the extraction timeout, and a hard cap on accepted file size. Synchronous extraction in a request cycle is the primary scaling failure mode and should be treated as out of scope from the start. Pure-PHP parsing will also underperform pdftotext (Poppler) via subprocess or a dedicated extraction service on large or high-volume files.
Failure modes.
Ramp-up. Low on the wrapper itself — a new engineer can read it in an afternoon, which is also the indictment: there is nothing there to learn. Moderate on the PDF domain: the team must internalize that extracted text is untrusted, frequently incomplete, and never a faithful representation of the document. Budget the real ramp-up time for the corpus-driven test suite and the queue hardening, not for the package.
How can I help you explore Laravel packages today?