ronisaha / easy-merge2pdf
Easy to use PHP library for merging Images and PDFs. Wrapper for ajaxray/merge2pdf
Installs: 1 062
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 2
Open Issues: 0
Requires
- php: >=7.4
- ext-json: *
- symfony/options-resolver: ^5.0|^6.0
- symfony/process: ^5.0|^6.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.2
- phpunit/phpunit: ^9.5
README
EasyMerge2pdf is a PHP library for merging Images and PDFs. It uses the excellent merge2pdf command available for OSX, linux, windows.
Installation
composer require ronisaha/easy-merge2pdf
Usages
<?php require_once 'vendor/autoload.php'; $m = new \EasyMerge2pdf\Merger(['auto' => true]); or $m = new \EasyMerge2pdf\Merger(['binary' => '/path/to/merge2pdf']); $m->addInput('/path/to/input.pdf', '1,3-8,2,1'); try { $m->merge('/path/to/out.pdf'); } catch (Exception $exception) { echo $exception->getMessage(); }