How to reorder included pdf-pages for bulk cutting ? [for paper saving]
Situation and Problem
I receive continuously updated lecture scripts as (A4) PDFs that I need to print.
The text area apparently fits onto A5 paper due to the large margins (that are usual with default LaTeX-documents).
In order to save some paper, I would like to print these A4 files as A5 but without resizing them (things become too small), but rather cutting edges.
Since I don't know how many pages this will be in the end, I can not use signature
.
I know that this is bad from an aesthetical standpoint.
In the MWE below you can see, that I am trimming the included pages (try to use not nup=1x2, landscape
but frame, noautoscale
) from margins I found with \layout
command.
However, I am unable to rearrange the order of the nup=1x2
pages such that I could cut them in bulk and get ordered usual A5 sheets.
Later on I want to cut the pages and manually either glue- or hole-punch-bind them together.
Question
How to reorder included
pdfpages
withnup=1x2, landscape
to get bulk cut-able A5 pages?
Let me show the desired order with an adapted scheme from here (please give Village credit). It would be more practical for processing bigger volumes if the order was like this:
..[think of overlaying not folding here].. [folding-view here]
(front of 1st paper) (back of 1st paper) (stacking order)
________ ________ ________ ________ /|======>>/| ...==>>/|
| | | | | | 1 ->/ | 3 ->/ | h-1->/ |
| | | | | | / | / | / |
| | | | | | / 2 | / 4 | / h |
|_____1__|___h+1__| |__2_____|__h+2___| |\ | |\ | |\ |
| \ | | \ | ... | \ |
(front of 2nd paper) (back of 2nd paper) | \ | \ | \
________ ________ ________ ________ | | | | | |
| | | | | | |h+1| |h+3| |n-1|
| | | | | | \ | \ | \ |
| | | | | | \ |<-h+2 \ |<-h+4 \ | <- n
|_____3__|___h+3__| |__4_____|__h+4___| \|======>>\| ...==>>\|
...
(front of last paper) (back of last paper)
________ ________ ________ ________
| | | | | |
| | | | | |
| | | | | |
|___h-1__|___n-1__| |__h_____|__n_____|
... for n
pages with h := n/2
.
MWE
\documentclass[
12pt,
twoside
]{article}
\usepackage[a4paper]{geometry}
\usepackage{pdfpages}
% Border space as numbered in layout scheme ( https://tex.stackexchange.com/a/376643/ )
% top = 2 - 4 + 5 + 6
\newlength{\distup}
\setlength{\distup}{\dimexpr\voffset+1in+\topmargin+\headheight+\headsep\relax} % looks good with geometry a4paper but not without
% % left = 1+3
\newlength{\distleft}
\setlength{\distleft}{\dimexpr1in+\hoffset+\oddsidemargin\relax}
% \addtolength{\distleft}{20pt} % doesnt work due to twosided import
% % bottom = 11 + ? // = paperheight - oben - textheight
\newlength{\distdown}
\setlength{\distdown}{\dimexpr\paperheight-\distup-\textheight\relax}
% \addtolength{\distdown}{5pt} % we can cut a little more
% % right = 9 + 10 + ? // = paperwidth - link - textwidth
\newlength{\distright}
\setlength{\distright}{\dimexpr\paperwidth-\distleft-\textwidth\relax}
% \addtolength{\distright}{20pt} % doesnt work due to twosided import
% %
\begin{document}
\includepdf[
pages=-,
nup=1x2,
landscape,
clip,
trim={{\distleft} {\distdown} {\distright} {\distup}},
offset={-9pt 0pt}, % -9pt centers // works with twoside but not nup=1x2, landscape
% noautoscale,
frame
]{testfile.pdf}
\end{document}
I am using a given PDF but this should work for the MWE (though I noticed, that my margins don't seem to fit here?):
testfile.tex
\documentclass[
12pt
]{article}
\usepackage{pdfpages}
\usepackage{lipsum}
\begin{document}
\lipsum
\end{document}
notes:
The first case "(might be easier to implement ?)" is solved in my own answer below, but not the remaining above. I will keep this question up in order to focus on and accept answers for that part.
pgfmorepages
which should be able to cover the first layout.