hubdesksa / pdf-merge
A Fork of PHP PDF Merger
2.0.1
2020-11-24 06:58 UTC
Requires
- php: >=5.6.20
- setasign/fpdf: ^1.8
- setasign/fpdi: ^2.0
This package is not auto-updated.
Last update: 2024-04-24 21:44:04 UTC
README
PDF Merge library for PHP.
Install with composer:
composer require hubdesksa/pdf-merge
Should add dependency:
"hubdesksa/pdf-merge": "^2.0"
Highlights
Pdf merging with modes portrait/landscape.
Usage
// Autoload composer classses... // and now we can use library $pdf = new \Jurosh\PDFMerge\PDFMerger; // add as many pdfs as you want $pdf->addPDF('path/to/source/file.pdf', 'all', 'vertical') ->addPDF('path/to/source/file1.pdf', 'all') ->addPDF('path/to/source/file2.pdf', 'all', 'horizontal'); // call merge, output format `file` $pdf->merge('file', 'path/to/export/dir/file.pdf');
That's it!
Enjoy and leave star if you like it :)