3

I have a pdf named prebooklet.pdf that is n pages long and I want to create a booklet that folds lengthwise. The prebooklet.pdf uses \usepackage[paperwidth=80mm, paperheight=297mm]{geometry} to ensure the text does not span to wide.

When adding the pages together using \includepdf[pages=-,nup=2x1]{prebooklet.pdf} the order of the pages become wrong in the purpose of folding the printed copy. However by adding the booklet or signature command to fix this, the pages are placed above one and eachother in a fashion that is not desired in this case. (It would be if prebooklet.pdf was in the format of an A5-paper and I wanted to fold it sideways.) See visual representation further down. As a final output, four of the pages in prebooklet.pdf will be printed on a single sheet of paper and repeated until all of the pages in prebooklet.pdf are covered.

There are plenty of related articles regarding inserting A5-paper into an A4-paper and folding it into a booklet, however I was unable to find a method regarding this issue.

Code for creating prebooklet.pdf

\documentclass{article}
\usepackage[paperwidth=80mm, paperheight=297mm]{geometry}
\usepackage{lipsum}
\begin{document}
\lipsum
\end{document}

Code for creating booklet

\documentclass[12pt]{article}
\usepackage[a4paper]{geometry}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages=-,nup=2x1]{prebooklet.pdf}
%\includepdf[pages=-,nup=2x1,booklet]{prebooklet.pdf}
\end{document}

In short I want the pages arranged like this
source

      /|=====>>/|=====>>/|
  n->/ | n-2->/ | n-4->/ |
    /  |     /  |     /  |
   /n-1|    /n-3|    /n-5|
   |\  |    |\  |    |\  |
   | \ |    | \ |    | \ |
   |  \     |  \     |   |
   |   |    |   |    |   |
   | 1 |    | 3 |    | 5 |
    \  |     \  |     \  |
     \ |<-2   \ |<-4   \ |<-6
      \|=====>>\|=====>>\|

(left) Without booklet (center) With booklet (right) Desired result (left) Without booklet (center) With booklet (right) Desired result

1

One possible way to achieve this is by hard-coding the order of the pages. While not recommended it is a solution until an easier one is found. Take for example a document that is eight pages long. The code for creating booklet will in that case be:

\documentclass[12pt]{article}
\usepackage[a4paper]{geometry}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages={8,1,2,7,6,3,4,5},nup=2x1]{prebooklet.pdf}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.