Join Multiple PDF files to a Single One on Mac
By ET
I 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

December 28th, 2009 at 7:20 pm
Hi this is cool!
By the way, there is a free GUI tool to join PDF files called PDFSAM, available on Windows, Mac, Linux, etc.
The cat tip is also cool. Didn’t know that. Looking forward to more of these tips.
(I am using both Windows and Red Hat Enterprise Linux.)
Share a PDF tip: Some PDF files have extremely small font, especially those behavioral and psychological journal papers. What I do is to crop out the white borders before I print to get human readable font (by a Windows software).
January 2nd, 2010 at 10:54 am
nice PDF tip. what software is that?
fortunately my Kindle DX automatically crops the borders.
January 4th, 2010 at 11:04 am
The Windows software is Foxit PDF Phantom.
In my opinion it can replace Acrobat Pro for most purposes.
It’s still in its 1.0 stage. In the future it probably will include the PDFSAM functions we want.
(The current version can also work under WINE emulator in Linux.)
January 5th, 2010 at 1:38 pm
en, adobe acrobat pro is way too bloated, taking almost 1GB space.
I installed Foxit PDF before in my virtual windows machine on the mac, just to replace Acrobat Reader, it’s cool if it can replace acrobat pro too.
February 6th, 2010 at 11:57 pm
yet another way to concatenate mp3 files:
http://mpgedit.org
After installing the commandline, just type:
mpgedit -o output.mp3 -e- *.mp3