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
Pdf Pack Bundle

Pdf Pack Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

PDF Extraction Bundle for Symfony wraps the 1tomany/pdf-pack library, exposing autowired read and convert actions for inspecting PDF metadata and extracting pages as images or text. Configure the poppler client via onetomany_pdfpack.yaml, then type-hint ReadActionInterface or ConvertActionInterface in any constructor and call act() with a request object.

  • Autowired ReadActionInterface for metadata such as page count
  • ConvertActionInterface for PNG rasterization and text extraction
  • Fluent requests: page ranges, DPI resolution, and output format
  • Simple YAML configuration for poppler binary paths
Frequently asked questions about Pdf Pack Bundle
Is 1tomany/pdf-pack-bundle a Laravel package?
No. It is a Symfony bundle that adds a YAML configuration tree, a DI extension and a tagged-service compiler pass around the 1tomany/pdf-pack library. None of that plumbing executes in Laravel, so the package itself brings nothing a Laravel application can consume. The underlying library, by contrast, is plain framework-agnostic PHP and can be wired into Laravel by hand.
Can I use 1tomany/pdf-pack-bundle in a Laravel application?
You can install it with Composer, but you will not get autowiring: there is no Symfony kernel to load onetomany_pdfpack.yaml and no autoconfigure pass to alias ReadActionInterface or ConvertActionInterface. The practical path is to depend on 1tomany/pdf-pack directly and bind its interfaces in a small service provider. Expect roughly 20 to 40 lines of container wiring plus a config/pdfpack.php file backed by env() values.
How do I configure the Poppler binary paths in Laravel?
The bundle reads a poppler_client block from config/packages/onetomany_pdfpack.yaml with pdfinfo_binary, pdftoppm_binary and pdftotext_binary keys. In Laravel, recreate the same keys in config/pdfpack.php and read them from env() so each environment can point at its own Poppler install. Note that the README ships a misspelled pdftppm value for pdftoppm_binary, exactly the kind of misconfiguration that silently breaks rasterization.
Which PHP and Laravel versions does this bundle support?
The bundle targets Symfony, and release v0.5.3 requires Symfony 8, which pulls modern PHP constraints into your root composer.json. There is no declared Laravel support, so compatibility is limited to whatever the wrapped library allows. If your Laravel app runs an older PHP minor, check for Composer conflicts before adding the dependency.
How do I read PDF page counts and metadata?
Build a ReadRequest with the file path and pass it to the ReadActionInterface service act() method, which returns a ReadResponse describing the document. The Symfony bundle autowires that interface; in Laravel you would singleton-bind ReadActionInterface to the concrete Poppler client yourself. If metadata is all you need, a pure PHP parser avoids the OS-level Poppler dependency entirely.
Can it rasterize PDF pages to PNG or extract text?
Yes. ConvertRequest exposes a fluent builder: fromPage(), toPage(null) for all pages, asPngOutput() and atResolution(150) for rasterization, or asTextOutput() for text extraction such as pages 2 through 8. Each act() call returns a ConvertResponse per page. Both rasterization and text extraction shell out to Poppler binaries, so those must exist on every host.
Is 1tomany/pdf-pack-bundle still maintained?
The repository is archived, so there will be no fixes, security patches or answers to questions like the concrete client constructor signatures. It is a single-maintainer project with one star and no dependents, which means essentially no production validation. If you adopt it you own it forever, so first check whether the wrapped 1tomany/pdf-pack library is still alive and adopt that instead.
Is it safe to process untrusted PDFs with Poppler in production?
Poppler has a CVE history with malicious PDFs, and this package invokes it as an external subprocess on your server. Sandboxing, timeouts, memory caps and file-size limits are your responsibility, not the package's. Synchronous in-request extraction is only viable at very low volume; dispatch a queued job for real workloads.
How do I test PDF extraction without running Poppler in CI?
The wrapped library ships a MockClient, which is its most portable asset and works fine once the action interfaces are bound manually in Laravel's container. Swap in the mock via your test case or a testing service provider so handlers never touch a real binary. There is no evidence of a test suite for the bundle itself, so do not treat it as a testing reference.
What are alternatives to this bundle for PDF parsing in Laravel?
If you only need metadata or text, smalot/pdfparser is pure PHP with no OS dependency and a far cheaper operational bet. If you genuinely need Poppler-class rasterization, adopt 1tomany/pdf-pack directly and wrap it in a Laravel service provider, since the Symfony bundle contributes nothing you can reuse. Either way, evaluate the library rather than the bundle before writing code.
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.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels