Home Contact Research Tools LaTeX

Print Tools Manual Page


Print tools (version 2011/06/01)


p1up [options] [file(s)]
p2up [options] [file(s)]
p4up [options] [file(s)]
p8up [options] [file(s)]
pbook [options] [file(s)]

These scripts are used to print PS or PDF documents with multiple pages on each side of the paper, at the best possible scale. The tools compute exactly how much space is occupied by the contents of each page, and use this to calculate the optimal scale and orientation to print the document with multiple pages per side. The pNup scripts print N pages per side; pbook prints two pages per side, with the page order rearranged in such a way that the output pages can be stapled in the middle to obtain a booklet.

If no input files are given on the command line, the scripts normally operate as filters: they read from standard input and write to standard output. If one or more input files are specified, output is normally written to a PostScript file: if the input file is or foo.pdf, the output file is or, depending on which script is used. The scripts allow the user to override the normal output destination with the -P option: with this option, output is piped via lpr to the specified printer.



Base the optimal scale on all pages of the input document. Normally, the scripts base the choice of scale on pages 2–9 only, because calculating the occupied space of a page can take a long time (the title page of a document is excluded because it often has a deviating layout).


Force the print tools to overwrite existing files, instead of pausing and prompting you.


Show a brief overview of the options and features, then quit.


Format the output pages for Letter paper instead of A4.

-m margin

Use this option to set the desired (outer) margin around the output pages. The margin is specified in PostScript points, of which there are 72 in an inch. The default is 36 (.5in) for p1up, p2up and pbook, and 20 (7mm) for p4up and p8up.

-M margin

Use this option to set the (inner) margin to keep between the pages of the original document that are printed on a single output page. The margin is specified in PostScript points, of which there are 72 in an inch. The default is 72 (1in) for p2up and pbook, and 20 (.7mm) for p4up and p8up. The p1up script does not support this option.

-p range

Specify a page range on which the optimal scale will be based (as in -p3-8). The range argument has the same syntax as for the psselect utility. The specified range is relative to the range of pages selected for printing—see the -r option below. The range must start with an odd page.

-P printer

This causes the scripts to send all output pages to the specified printer.

-r range

Specify the range of pages to be printed. For example, -r-10 selects the first ten pages for printing, and -r2- selects all pages except the first.


Switches page tumbling (on printers that support this), meaning that you will have to flip the output pages along the short side of the paper instead of the long side to turn them over—except with pbook, which behaves oppositely.


To print an article as a booklet on the laserjet printer:

pbook -Plaserjet article.pdf

To make large printouts of the slides of a presentation on the default printer:

p1up -m20 < presentation.pdf | lpr

To create a handout of the slides:

p8up presentation.pdf

The handout will be saved as If you prefer to save the handout as a PDF document (the PostScript output file can be very large), use:

p8up < presentation.pdf | ps2pdf - handout.pdf

But beware: the duplexing/tumbling directives in the PostScript output will be lost in the conversion to PDF.