There have been many hints here about combining PDFs over the years. All but one required either third party software, or old versions of OS X. The most recent hint notes that Automator has a combine PDF action built-in. This is great, of course, if you're using Automator. But what if you want to combine PDFs in an AppleScript, or from the Terminal? How come Automator gets to have all the fun?
Well, if you crack open the Combine PDF action bundle, Automator's PDF combining secrets are laid bare: a Python script! Not just that, but a Python script with usage info:
join [--output <file>] [--append] [--shuffle] [--preview] [--verbose]
And here is how it might be used:
$ python '/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py' -o '/path/to/output.pdf' '/path/to/input1.pdf' '/path/to/input2.pdf'Mac OS X Hints
http://hints.macworld.com/article.php?story=20060327192826493