Site icon texblog

Printing multiple pages on one with pgfpages

Your operating system can print several pages on one. Sometimes however you may want to have the PDF showing several slides on a single page, e.g. for handouts of a presentation. On a Linux system, psnup/pdfnup are extremely flexible if you are familiar with these commands and their options. But it’s definitely faster and more convenient to do it from inside a LaTeX document using pgfpages with just two lines of code.

Example 1: Two on One

\usepackage{pgfpages}
\pgfpagesuselayout{2 on 1}[a4paper,border shrink=5mm]

Example 2: Four on One

\usepackage{pgfpages}
\pgfpagesuselayout{4 on 1}[a4paper,border shrink=5mm,landscape]

Some remarks:

\pgfpagesuselayout{resize to}[a4paper,border shrink=5mm]

Using resize to will resize any page to the selected page format (a4paper/letterpaper).

The package is quite limited in its functionality. However, since gpfpages is really easy to use and it’s a good choice in the most common situations.

Note, if you are using a table of contents, the page numbers may be wrong. To solve this issue, comment out the \pgfpagesuselayout{...}[...] command and typeset the document. This will set the page numbers right. Next you uncomment the line again and add a \nofiles command on a separate line. That will prevent Latex from overwriting “meta”-files and therefore leave the page numbers in your index untouched.

Exit mobile version