This package is a wrapper for the
TCPDF class that provides an elegant API for merging PDF files.
You can install the package via composer:
composer require karriere/pdf-merge
$pdfMerge = new PdfMerge(); $pdfMerge->add('/path/to/file1.pdf'); $pdfMerge->add('/path/to/file2.pdf'); $pdfMerge->merge('/path/to/output.pdf');
Please note, that the
merge method will throw an
NoFilesDefinedException if no files where added.
You can check if a file was already added for merging by calling:
Apache License 2.0 Please see LICENSE for more information.