tomsgu/pdf-merger
A Laravel/PHP package for merging multiple PDF files into one document. It offers a simple API to combine PDFs, control page order, and add PDF merging to your workflows with minimal setup.
Architecture fit
tomsgu/pdf-merger is a thin, framework-agnostic utility: instantiate, add PDFs with page ranges, merge to file/download/browser. It has no Laravel service provider, config, facade, or queue integration, which is acceptable for a bounded document-assembly concern but means all orchestration, validation, storage, and error handling remain our responsibility.PdfMerger interface in a service class or queued job, not called directly from controllers. This keeps the package replaceable and prevents its API from leaking into domain code.Integration feasibility
Technical risk
Key questions
qpdf or Ghostscript, or are we restricted to pure PHP?Stack fit
iio/libmergepdf, direct FPDI, or an external qpdf/Ghostscript service is a configuration change, not a rewrite.Migration path
tomsgu/pdf-merger, (b) iio/libmergepdf or direct FPDI, and (c) external qpdf/Ghostscript via Symfony Process. Score each against the real PDF corpus, not synthetic samples.Compatibility
memory_limit, max_execution_time, and temp-directory permissions in queue workers and web nodes.Sequencing
PdfMerger interface and acceptance criteria using a real customer PDF corpus, including known problematic files.Maintenance
Support
Scaling
qpdf/Ghostscript service is more robust and easier to isolate than pure-PHP merging.Failure modes
Ramp-up
How can I help you explore Laravel packages today?