karriere/pdf-merge

v1.2.0 2021-09-06 13:02 UTC

This package is auto-updated.

Last update: 2021-09-06 13:10:12 UTC


README

687474703a2f2f7777772e6b617272696572652e61742f696d616765732f6c61796f75742f6b61746c6f676f2e737667    

Pdf Merge Solution for PHP

This package is a wrapper for the TCPDF class that provides an elegant API for merging PDF files.

Installation

You can install the package via composer:

composer require karriere/pdf-merge

Usage

$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.

Check for file existence

You can check if a file was already added for merging by calling:

$pdfMerge->contains('/path/to/file.pdf');

License

Apache License 2.0 Please see LICENSE for more information.