hubdesksa/pdf-merge

A Fork of PHP PDF Merger

Installs: 66

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 36

pkg:composer/hubdesksa/pdf-merge

2.0.1 2020-11-24 06:58 UTC

This package is not auto-updated.

Last update: 2025-12-18 06:20:15 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 :)