Join Multiple PDF files to a Single One on Mac
Monday, December 28th, 2009 -- By ETI downloaded an ebook, it contains hundreds of one-page pdf files. I certainly don’t want to upload all of these one-pagers to my Kindle. To concatenate these files, there is no simply and easy way. Commercial software packages are available from $14.00 to 20Euro.
A simply perl hack does the job:
- Install the perl module:
perl -MCPAN -e 'install("PDF::Reuse")' - Create a perl program, call it “catpdf.pl”:
use strict;
use PDF::Reuse;prFile(“output.pdf”);
for(@ARGV) {
prDoc($_);
}prEnd();
- To concatenate, call it in two possible ways:
- perl catpdf.pl a.pdf b.pdf, or
- perl catpdf.pl *.pdf
————–
As a side note, it is really easy to concatenate mp3 files on mac, just do:
cat *.mp3>output.mp3

