shihjay2/tcpdi-merger

PDF Importer that supports PDF versions 1.6+. Based on: https://github.com/pauln/tcpdi

0.4.1 2018-06-24 04:13 UTC

This package is auto-updated.

Last update: 2020-07-17 08:29:43 UTC


README

TCPDI-merger. Merge PDF files using the TCPDI library.

###Make it work!

  1. composer require shihjay2/tcpdi-merger
  2. Copy the example directory.
  3. 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");

?>