# Rearange pages from an A6 pdf to an A4 pdf

I have a pdf document with 22 pages. Each page is in A6 format so that four of these pages fit on one A4 page. The 22 pages are ordered so that the odd pages (1,3,5,...) are the front sites of the A6 postcards and the even pages (2,4,6,...) are the corresponding back sites

I now want to place the A6 pages on A4 pages so that the first A4 page contains pages 1,3,5 and 7 of the A6.pdf and the second A4 page of the desired output.pdf contains pages 2, 4, 6 and 8 of A6.pdf. The third page of the A4.pdf would then contain again four frontsides and page four of A4.pdf would then contain the corresponding backsides, and so on.

Printing the A4.pdf on a duplex printer and cutting the A4 page twice would then result in 4 A6 cards with matching front and backsides. The A6 pages are in landscape and one expects to turn the page on the short side - like a postcard.

So how do I convert my A6.pdf with the 22 pages in an A4.pdf with the desired ordering?

EDIT: This question is not a duplicate of Print pdf like a book - 2 pages per sheet double sided since I want to get a new A4 pdf with the described features and not a direct print.

I found want LaTeX based solution here https://tex.stackexchange.com/questions/261431/print-eight-a6-pages-on-one-two-sided-a4-sheet-in-a-book-folding-order.

Save the code snippet in a print.tex file and call pdflatex print.tex. Then a print.pdf with the desired page setup is generated.

\documentclass[a4paper,landscape]{article}
\usepackage[margin=0pt]{geometry}
\usepackage[skins,raster]{tcolorbox}
\pagestyle{empty}
\begin{document}
\begin{tcbraster}[raster height=\textheight,raster equal skip=0pt,blank,
graphics pages={1,3,5,7,  2,4,6,8,  9,11,13,15,  10,12,14,16, 17,19,21,21, 18,20,22,22}]
\tcbincludepdf{a6.pdf}% <-- The A6 document with 22 pages
\end{tcbraster}
\end{document}


This solution worked for me and its sufficient but from an academic point of view I am unhappy with it because it requires a full LaTeX installation which seems like an overkill. So I look forward to any other solutions!