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 Merge Laravel Package

jurosh/pdf-merge

jurosh/pdf-merge is a Laravel/PHP package for combining multiple PDF files into a single document. It offers a simple API for merging existing PDFs programmatically, with Laravel integration and lightweight FPDI/FPDF-based handling for common PDF merge tasks.

View on GitHub
Deep Wiki
Context7

PDF Merge library for PHP

Frequently asked questions about Pdf Merge
How do I install jurosh/pdf-merge with Composer?
Install it with Composer using the package name jurosh/pdf-merge, then include Composer's autoloader in plain PHP or rely on Laravel's existing autoloading. The package is framework-agnostic, so no Laravel service provider or facade registration is required. Pin an explicit version in composer.json before using it in production, especially if you are evaluating the 2.0.0 major release.
Does jurosh/pdf-merge work with Laravel?
Yes, it can be called from Laravel because it is a normal Composer package, but it does not ship Laravel-specific integration such as a service provider, facade, config file, or queue-aware helper. Keep it behind an application-owned interface like PdfMerger and inject an adapter implementation into controllers, commands, or jobs. Use Laravel filesystem disks and temporary files instead of hard-coded paths.
Which PHP and Laravel versions does jurosh/pdf-merge 2.0.0 support?
The supplied 2.0.0 release notes are empty, so PHP and Laravel version support cannot be confirmed from the release metadata alone. Check the package's composer.json for PHP constraints and transitive PDF dependency constraints before adopting it. Validate the chosen version against your target PHP runtime, queue worker environment, and Laravel application during a spike.
How do I merge selected pages or page ranges from multiple PDFs?
Pass a page selection to addPDF, such as 'all' for every page or '1-2' for a range, then call merge with an output mode. The API supports merging unlimited PDFs and selected page ranges into one document. You can output to a file, a browser download, or a string depending on the merge mode you choose.
Does jurosh/pdf-merge require Ghostscript or ImageMagick?
No. It is a pure PHP library built on FPDI and FPDF, so it does not require Ghostscript, ImageMagick, PDFtk, or shell commands. That makes it easier to deploy in restricted hosting and queue worker environments. It still inherits FPDI/FPDF limitations around unsupported or malformed PDF structures.
What changed in jurosh/pdf-merge 2.0.0 and is there an upgrade guide?
The provided release notes for 2.0.0 are empty, so the exact breaking-change surface is unverified and no documented upgrade path is available in the supplied context. Treat 2.0.0 as a separate candidate from the 1.x line, inspect the source and diff tags, and re-baseline the API before migrating. If 1.x is already working in production, pin it until the 2.0.0 changes are documented.
Is jurosh/pdf-merge safe for production PDF merging?
It is suitable for common PDF merge tasks when pinned to a verified version and wrapped behind an application interface. Watch for known secondary risks: unsupported encrypted or malformed PDFs, memory pressure on very large documents, and limited handling of forms, signatures, bookmarks, and metadata. Because 2.0.0 shipped without release notes, validate runtime compatibility and breaking changes before production use.
What are alternatives to jurosh/pdf-merge for merging PDFs in Laravel?
Alternatives include setasign/fpdi for lower-level PDF manipulation, iio/libmergepdf, a Ghostscript or PDFtk process, or a managed document service. The right choice depends on whether you need pure PHP deployment, advanced PDF features, or operational simplicity. Because the jurosh integration surface is narrow, keeping it behind an interface makes a later pivot relatively cheap.
How should I test jurosh/pdf-merge in a Laravel application?
Run a spike that validates the package against your target PHP runtime, queue worker environment, and storage abstraction. Test page-range selection, output to file/download/string, malformed or encrypted PDFs, and memory behavior with large documents. Also confirm which 1.x or 2.0.0 API signatures your adapter depends on so future upgrades stay contained.
Is jurosh/pdf-merge actively maintained and widely adopted?
A 2.0.0 major release suggests maintainer engagement after a long gap since the 2018 1.x release, but the empty release notes are a governance warning and adoption may still be near zero. Historical signals such as 151 GitHub stars and no Packagist dependents should be re-checked rather than assumed. Treat it as a dependency to pin explicitly, with a private fork option if upstream stalls again.
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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib