shihjay2 / tcpdi-merger
PDF Importer that supports PDF versions 1.6+. Based on: https://github.com/pauln/tcpdi
0.5
2020-12-15 17:26 UTC
Requires
- php: >=5.3.0
- tecnickcom/tcpdf: ^6.2
README
TCPDI-merger. Merge PDF files using the TCPDI library.
###Make it work!
composer require shihjay2/tcpdi-merger
- Copy the example directory.
- Run it!
###Example code
<?php
require 'vendor/autoload.php';
use shihjay2\tcpdi_merger\MyTCPDI;
use shihjay2\tcpdi_merger\Merger;
$m = new Merger(true);
$m->addFromFile("example/A.pdf");
$m->addFromFile("example/lorem.pdf");
$m->addFromFile("example/PDF17.pdf");
$m->addFromFile("example/PDF16.pdf");
$m->merge();
$m->save("example/merged-document.pdf");
?>