This file is kept up to date at http://www.warwick.ac.uk/go/pdfjam.
PDFjam is a small collection of shell scripts which provide a simple interface to some of the functionality of the excellent pdfpages package (by Andreas Matthias) for pdfLaTeX. At present the utilities available are:
In every case, source files are left unchanged.
A potential drawback of these utilities is that any hyperlinks in the source PDF are lost. On the positive side, there is no appreciable degradation of image quality in processing PDF files with thse programs, unlike some other indirect methods such as pdf2ps | psnup | ps2pdf (in the author's experience). [Better than the rather indirect approach taken here would be filters that work directly on the PDF code, to produce output files with hyperlinks intact.]
These tools are designed for Unix-like systems, including Mac OS X. I am told that pdfnup works fine also on Windows computers with MikTeX and the cygwin unix tools; I know of no reason why pdfjoin and pdf90 should not also work in that way.
An alternative set of PDF manipulation tools, which are java-based, is provided by the Multivalent project. They do much the same things as PDFjam, and quite a bit more. Hyperlinks don't seem to be preserved there either, though, when n-upping a document.
For Mac OS X, n-up with a more visual interface is provided by PDF Nup Maker. Like PDFjam, this is a front end to pdflatex/pdfpages.
The PDFjam software is made available free, under GPL version 2 (see the file named COPYING that is included with the package). It comes with ABSOLUTELY NO WARRANTY of fitness for any purpose whatever.
Download the shell scripts as pdfjam_1.20.tgz.
Bernhard Walle has kindly made available an RPM package for Linux.
For Mac OS X droplets, see below.
PDFjam is a project at freshmeat: please subscribe there to receive update announcements.
Look at the small block of lines flagged CONFIGURATION in each of the scripts. The main requirement is to provide the correct path to pdflatex on your system. If pdflatex is in your search path (as it ought to be), no change should be needed. Also set here are defaults for paper size etc. These settings can be changed by editing the scripts themselves, or (better) by putting them in a site-configuration file (at /etc/pdfnup.conf, /usr/share/etc/pdfnup.conf, /usr/local/share/pdfnup.conf, or /usr/local/etc/pdfnup.conf) and/or a user-defaults file ~/.pdfnup.conf to be read in that order when any of pdfnup, pdfjoin or pdf90 runs (if present these configuration files will override corresponding settings found in the scripts themselves).
Make sure that the scripts are executable by all who might need to execute it. If they are to be available to all users on your system, perhaps move them to /usr/local/bin (or make symbolic links to them there). The man pages should be installed on the MANPATH of all who need to read them.
Once the scripts are installed, help on usage can be obtained by
pdfnup --help
pdfjoin --help
pdf90 --help
For pdfnup,
pdfnup mywork/wasteful.pdf --nup 2x2will produce a new 4-up file wasteful-2x2.pdf in directory mywork , and
pdfnup mywork/wasteful.pdf --nup 2x1 --outfile mywork2/halfthewaste.pdfproduces a 2-up file halfthewaste.pdf in directory mywork2. The source pdf file wasteful.pdf is left unchanged.
pdfnup file1.pdf file2.pdf --frame true --nup 2x2makes new files file1-2x2.pdf and file2-2x2.pdf in the current directory, with a border printed around the 4 input pages on each output page.
Other options to pdfnup include --pages, --paper, --orient, --trim, --delta, --offset, --scale and --openright.
For pdfjoin,
pdfjoin file1.pdf file2.pdf file3.pdf --fitpaper trueproduces a new file file3-joined.pdf in the current directory, with all pages included at their original sizes.
pdfjoin file1.pdf file2.pdf file3.pdf --fitpaper false --paper a4paper --outfile ~/docs/mybigfile.pdfscales all of the pages to fit on A4-size paper, and makes the resultant file as ~/docs/mybigfile.pdf .
One possible use for pdfjoin, then, is to change the paper size of a PDF file, for example
pdfjoin USletterfile.pdf --paper a4paper --fitpaper false --outfile USletterfile-A4size.pdf
Other options to pdfjoin include --trim and --offset. The output filename and location are determined by the last input file if --outfile is not specified.
For pdf90,
pdf90 file1.pdf --outfile stuff/myrotatedfile.pdfrotates all pages and puts the result in myrotatedfile.pdf in subdirectory stuff of the current directory, while
pdf90 file1.pdf file2.pdfmakes new files file1-rotated.pdf and file2-rotated.pdf in the current directory. pdf90 retains original page sizes in the output file.
These droplets assume that your pdflatex is at /usr/local/teTeX/bin/powerpc-apple-darwin-current/pdflatex. If pdflatex lives somewhere else on your system, the droplets won't work until you include in your home directory a file named .pdfnup.conf (or there is a system-wide file pdfnup.conf at one of the four locations listed above), containing the line
pdflatex=/path/to/pdflatexwhere /path/to/pdflatex is the answer you get when you type which pdflatex in the Terminal.
1. Why "PDFjam"?
Because it's for PDF files, and jam is what I like best
on my toast (well, second best after marmalade, anyway).
2. The thing runs but the output doesn't look the way it should. Why?
Most likely either your pdfTeX or your pdfpages installation is an old version. (Check also that pdftex.def, to be found in in .../texmf/tex/latex/graphics/, is up to date.) If the problem persists even with up-to-date versions of pdfTeX, pdftex.def and pdfpages, then please do let me know about it.
1.20: added minimal man pages; added extra possible locations for the site-wide configuration file [2005-01-25]
1.11: added the --scale option to pdfnup, which allows page margins either to be enlarged (e.g,. --scale 0.9) or reduced (e.g,. --scale 1.1) by scaling the page contents. By popular request! [2004-10-13]
1.10: output files now appear by default in same directory as input, rather than in the current working directory; fixed a bug that caused the scripts not to work on some versions of Solaris (thanks to Daniel Gebhart); major improvements to the Mac OS X sample droplets. [2004-06-24]
1.03: minor changes towards POSIX compliance. [2004-05-09]
1.02: added a COPYING file to the package. [2004-05-08]
1.01: fixed a bad (and accidental) feature in pdfjoin whereby it would leave a file named "temp" in the user's home directory; some new options added to pdfnup and pdfjoin. [2004-05-08]
1.00: package re-named PDFjam. [2004-05-07]
0.99a: a minor change to the output of pdfnup --help and pdfjoin --help [2004-05-06]
0.99: various improvements to pdfnup, including the handling of multiple PDF input files. Added pdfjoin and pdf90. [2004-05-05]
0.97: corrections to the output of pdfnup --help [2004-04-23]
0.96: minor changes to comments in the pdfnup script [2004-02-12]
0.95: added the possibility of site-specific and user-specific configuration files (thanks to Jason Lewis for suggesting this) [2004-01-28]
0.9: added --openright (thanks to Jason Lewis for suggesting this) [2004-01-28]
0.8: added pdfnup --help facility (thanks to Wilfrid Kendall for this suggestion) [2003-09-12]
0.7: paths involving spaces now permitted; page trimming added (thanks to Alex Montgomery for suggesting that); default output filename now has a dash inserted before the "nup" label (as in wasteful-2x2.pdf ); sample Mac OS X droplets provided [2003-01-26]
0.6: use of paths involving spaces now reports an error [2002-08-22]
0.5: fixed a bug which caused incompatibility with some types of unix [2002-06-24]
0.4: better error trapping, improved portability [2002-04-30]
0.3: first public release of pdfnup (2002-04-04)