1tomany/pdf-pack-bundle
Symfony bundle wrapping the 1tomany/pdf-pack library for PDF extraction. Autowires read and convert actions to fetch metadata, rasterize pages to PNG, and extract text, with configurable Poppler binaries.
1tomany/pdf-pack library, which shells out to Poppler for three jobs: read metadata/page count (pdfinfo), rasterize pages to PNG/JPEG (pdftoppm), and extract text ranges (pdftotext). If the roadmap contains document ingestion, search indexing, or OCR prep, this replaces a multi-week internal build with a thin integration layer.Generator, so large PDFs can be processed page-by-page rather than loaded whole. That makes per-page cost visible and lets you phase the roadmap — ship thumbnails and metadata first, defer full text search and ML extraction to a later cycle without re-architecting.ExtractActionInterface / ReadActionInterface from YAML config) and is marked archived, with 1 star and 0 dependents. For a Laravel codebase that wrapper has no direct value — you would write a ~30-line service provider binding the two interfaces to the Poppler client and mirror the YAML in config/. So the real decision is "MIT-licensed Poppler wrapper, self-owned" versus "commercial document API."Adopt the underlying 1tomany/pdf-pack library when:
MockClient for tests via a one-line config switch). The bundle's genuine wins are the mock client and the swappable ClientInterface tag — both are cheap to replicate in Laravel with a ServiceProvider and a fake binding, so weigh the bundle only if you are actually on Symfony.Look elsewhere when:
spatie/pdf-to-image (Poppler/Ghostscript rasterization, actively maintained, Laravel-native) for images, and smalot/pdfparser (pure PHP, no binaries) for text/metadata. Two maintained dependencies beat one archived wrapper.pdftoppm is CPU and memory heavy and blocks a PHP worker. Budget for queue workers (Laravel Queues / Symfony Messenger) or an isolated worker service before committing to the roadmap, and treat "no queue infrastructure" as a scope cost, not a footnote.Decision rule: if the roadmap item is "we need PDF text and thumbnails" and you are on Symfony, this is a fast two-day spike. If you are on Laravel, this is a pattern to copy, not a dependency to install — take the interface-plus-factory shape, back it with spatie/pdf-to-image and smalot/pdfparser, and write the mock yourself.
For executives: "Document ingestion is a shared capability behind several roadmap items — searchable uploads, invoice automation, contract review. Rather than buying a per-page document API or building a parser, we can wrap an existing open-source Poppler toolchain (MIT licensed, no per-page fees, no data leaves our infrastructure) behind a small internal interface. The published wrapper is Symfony-specific and no longer maintained, so we adopt the underlying library and own roughly a week of integration plus a week of hardening — far less than a commercial contract, and it keeps the option to swap in a paid API later behind the same interface if volume or accuracy demands it. The decision I need is a small, capped engineering bet, not a platform commitment."
For engineering: "Three primitives: metadata/page count, page-range rasterization at configurable DPI, page-range text extraction. The design worth copying is the interface-plus-client split — inject ExtractActionInterface / ReadActionInterface, back them with a Poppler client, and swap implementations via config. In Laravel that is a ServiceProvider binding two interfaces plus a config/onetomany_pdfpack.php mirroring the YAML. Keep the MockClient idea: bind a fake in the testing environment so CI never spawns pdftoppm. Hard requirements before we ship: Poppler binaries pinned in the container image, per-job timeouts and memory caps, page and output-size limits on untrusted uploads, extraction on the queue not in the request cycle, and structured logging on non-zero exit codes — the library does not document failure behavior, so that is on us. Extraction responses are generators, so a page-at-a-time pipeline is available if we need progress reporting later."
How can I help you explore Laravel packages today?