# Fold paper lengthwise into a booklet

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

\documentclass[12pt]{article}