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:
- 2, 4, 8 and 16 on 1 are available (for
resize to
see below) - The
border shrink
option provides some space between slides - The
landscape
options is required depending on whether your pages are portrait/landscape.
\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.
Liam
“pdfpages” in the first paragraph is a typo?
tom
Thanks Liam! Best, Tom.
Jabba Laci
Thanks, just what I needed. I also use
to add border around the pages. If you put 2 on 1, repeat this line with …{2}… too.
tom
Hey, thanks for the addendum. Tom.
namvan
Thanks for very nice solution. I print my thesis in A4 to A5 (book) but the “landscape” option does work. How can i solve this problem? very appreciated.
tom
Hi! Are you trying to print a booklet? If so, see here for a solution. If not, please provide a minimal working example.
Thanks, Tom.
namvan
Thanks for quick response. I try to print my thesis as a book. The pdf file now in A4 but i want to print two A5 pages on one A4 page.
1. with the command:
It works but the A4 page in portrait not landscape
2. With your recommend i combine with another in separated tex file as:
It announces 3 errors and a pdf file is created but i can not open it.
Thanks you very much for your kind help.
namvan
tom
Hi namvan,
The following code works for me.
However, I’m using a very simple document.
Do you really need to load the
epsfig
package? How about converting eps to pdf?What do the errors say?
Best, Tom.
unai
Hi, how do you set the dimensions for the spread if a3. a4, a5 don’t do the job ?
tom
Hi Unai,
Thanks for your question. Take a look at the geometry package. It provides functionality to change the page size and layout.
Best, Tom