Printing Multiple Pages Per Sheet

This page assumes you've already got a printer installed that you can print to using the lp command.

To print multiple pages per sheet, use the mpage program. It accepts postscript files, so if you want to print a different kind of file, open that file in its application and print it to a poscript file first, then use mpage as described here.

mpage -4 -dp -P -R -a file.ps

-4 prints 4 pages per sheet
-dp means the input file is postscript (as opposed to ascii)
-P means print to default printer (lpr) instead of stdout

Without -a or -R, the output is like this (shown in landscape format, but it's the same for portrait format -- just mentally rotate each digit below 90 degrees clockwise):

+-----------+
|  2  |  1  |
+-----+-----+
|  4  |  3  |
+-----+-----+

With -a the output is like this (use this if your postscript file is in portrait format):

+-----------+
|  3  |  1  |
+-----+-----+
|  4  |  2  |
+-----+-----+

With -R, it's like this:

+-----------+
|  1  |  3  |
+-----+-----+
|  2  |  4  |
+-----+-----+

With -R and -a together, it's like this (use this if your postscript file is in lanscape format):

+-----------+
|  1  |  2  |
+-----+-----+
|  3  |  4  |
+-----+-----+

Use the -j option to select which sheets (output sheets, not individual pages from the input file) to print:

-j 1-1 will print just the first sheet (so used with -4, you'll get 4 pages on a single printed sheet, and that's it)

-j 1-2 will print the first 2 sheets

-j 5 will print from sheet 5 to the last sheet

You can also use the %x modifier to -j to specify that you only want to print every xth sheet:

-j 1%2 will print every other sheet starting at 1, so it'll print just the odd sheets (so again, if you're using -4 also, then you'll get these pages from the input file: 1,2,3,4, then 9,10,11,12, then 17,18,19,20, etc., with 1,2,3,4 on the first sheet, 9,10,11,12 on the second, and so on)

-j 2%2 will print every other sheet starting at 2, so just the even sheets

-j 1-10%2 will print just the odd sheets from 1 to 10 (so 1,3,5,7, and 9)

So to print an entire document, with 4 pages per sheet, and print on both sides of each sheet, first do:

mpage -4 -dp -P -a -j 1%2 file.ps (add -R if postscript file is landscape)

That will give you all the odd output sheets, so take the stack of sheets and reverse it (reverse the order; don't flip individual sheets over!), then put them back in the printer and do this:

mpage -4 -dp -P -a -j 2%2 file.ps (add -R if postscript file is landscape)

Which will print the even sheets on the backs of the odd sheets. Note that if there's an odd overall number of sheets, then there will be one sheet left in the printer at this point.