(Its a 1mb download but half of it is the example PDFs I put - generously provided by the United States Internal Revenue Service.)
Born out of my frustration in merging PDFs together in PHP, PDF Merger lets you concatenate PDFs (or certain pages of) together. If someone could take a look at my class in PDFMerger.php and offer some feedback I'd appreciate it.
You can merge all the pages or do it printer style - 1, 3, 17, 22-43 or 'all'. After you unpack, upload it and then the code is as follows.
Code: Select all
<?php
include 'PDFMerger.php';
$pdf = new PDFMerger;
$pdf->addPDF('samplepdfs/one.pdf', '1, 3, 4')
->addPDF('samplepdfs/two.pdf', '1-2')
->addPDF('samplepdfs/three.pdf', 'all')
->merge('file', 'samplepdfs/TEST2.pdf');
//REPLACE 'file' WITH 'browser', 'download', 'string', or 'file' for output options
//You do not need to give a file path for browser, string, or download - just the name.