I'm using pdflscape
for my landscape pages in an A5 portrait document. Then I use the following command line to prepare the PDF to be printed on A4 paper:
pdftk blank.pdf document.pdf output padded_document.pdf verbose && pdfnup --paper a4paper padded_document.pdf
The resulting padded_document-nup.pdf
, however, has all the landscape pages still in landscape in what amounts to an A6 format, instead of having them rotated and in A5.
Is there a way to automatically rotate them so they will appear in the intended size? I know I could replace pdflscape
by lscape
but I keep forgetting that and it'd be nice to have a solution that doesn't involve changing my document each time I want to print it. So either a clever trick in the PDF or something I can put in my command line.
\documentclass[a5paper]{article}
\usepackage{mwe}
\usepackage{pdflscape}
\begin{document}
\blindtext\blindtext
\begin{landscape}
\thispagestyle{empty}
\begin{figure}
\includegraphics[width=\linewidth]{example-image-a}
\caption{Landscape figure}
\end{figure}
\end{landscape}
\blindtext\blindtext
\blindtext\blindtext
\end{document}
Which as 4-up with page borders (not the desired 2-up without borders but you get the idea) looks like this:
What it should look like is this:
I faked this last one by just using lscape
instead of pdflscape
.
Best Answer
pdfnup
usespdfjam
, which in turn uses the LaTeX packagepdfpages
. The latter one knows the optionrotateoversize
, from the documentation:This option can be specified on the command line for
pdfnup
orpdfjam
: