[Tex/LaTex] Print A6 book on A4 double-sided in correct order

book-designdouble-sidedpdfpages

How can i print out a A6 sized book onto A4 paper, so that i can cut it into 4 pieces and glue-bind them to a book?
i am NOT looking for a BOOKLET!

i think the order i need would be:

A4 sheet #1 - front   A4 sheet #1 - back  
+--------|--------+  +--------|--------+  
|        |        |  |        |        |  
|        |        |  |        |        |  
| page 1 | page 3 |  | page 4 | page 2 |  
|        |        |  |        |        |  
+--------|--------+  +--------|--------+  
|        |        |  |        |        |  
| page 5 | page 7 |  | page 8 | page 6 |  
|        |        |  |        |        |  
|        |        |  |        |        |  
+--------|--------+  +--------|--------+  

the problem seems to be that the back side is "reversed"
basically i just need the following page on the backside of the paper matching the front page.

edit: you have to include pgfmorepages BEFORE pdfpages, else it might put all pages one the first page causing a big clutter.

Best Answer

I wrote the pgfmorepages (CTAN and github) extension of pgfpages for instances such as this.

The layout you want isn't predefined, but is straightforward to make.

\documentclass{article}
%\url{http://tex.stackexchange.com/q/279042/86}
\usepackage{pgfmorepages}
\usepackage{graphicx}

\pgfpagesdeclarelayout{8 on 2, book format}
{%
  \edef\pgfpageoptionheight{\the\paperheight}
  \edef\pgfpageoptionwidth{\the\paperwidth}
  \def\pgfpageoptionborder{0pt}
  \def\pgfpageoptionfirstshipout{1}
}%
{%
  \pgfpagesphysicalpageoptions
  {%
    logical pages=8,%
    physical pages=2,%
    physical height=\pgfpageoptionheight,%
    physical width=\pgfpageoptionwidth,%
    current logical shipout=\pgfpageoptionfirstshipout%
  }
  \pgfpagesphysicalpage{1}{}
    \pgfpageslogicalpageoptions{4}
    {%
      border shrink=\pgfpageoptionborder,%
      resized width=.5\pgfphysicalwidth,%
      resized height=.5\pgfphysicalheight,%
      center=\pgfpoint{.25\pgfphysicalwidth}{.75\pgfphysicalheight}%
    }%
    \pgfpageslogicalpageoptions{2}
    {%
      border shrink=\pgfpageoptionborder,%
      resized width=.5\pgfphysicalwidth,%
      resized height=.5\pgfphysicalheight,%
      center=\pgfpoint{.75\pgfphysicalwidth}{.75\pgfphysicalheight}%
    }%
    \pgfpageslogicalpageoptions{8}
    {%
      border shrink=\pgfpageoptionborder,%
      resized width=.5\pgfphysicalwidth,%
      resized height=.5\pgfphysicalheight,%
      center=\pgfpoint{.25\pgfphysicalwidth}{.25\pgfphysicalheight},%
    }%
    \pgfpageslogicalpageoptions{6}
    {%
      border shrink=\pgfpageoptionborder,%
      resized width=.5\pgfphysicalwidth,%
      resized height=.5\pgfphysicalheight,%
      center=\pgfpoint{.75\pgfphysicalwidth}{.25\pgfphysicalheight},%
    }%
  \pgfpagesphysicalpage{2}{}
    \pgfpageslogicalpageoptions{1}
    {%
      border shrink=\pgfpageoptionborder,%
      resized width=.5\pgfphysicalwidth,%
      resized height=.5\pgfphysicalheight,%
      center=\pgfpoint{.25\pgfphysicalwidth}{.75\pgfphysicalheight}%
    }%
    \pgfpageslogicalpageoptions{3}
    {%
      border shrink=\pgfpageoptionborder,%
      resized width=.5\pgfphysicalwidth,%
      resized height=.5\pgfphysicalheight,%
      center=\pgfpoint{.75\pgfphysicalwidth}{.75\pgfphysicalheight}%
    }%
    \pgfpageslogicalpageoptions{5}
    {%
      border shrink=\pgfpageoptionborder,%
      resized width=.5\pgfphysicalwidth,%
      resized height=.5\pgfphysicalheight,%
      center=\pgfpoint{.25\pgfphysicalwidth}{.25\pgfphysicalheight},%
    }%
    \pgfpageslogicalpageoptions{7}
    {%
      border shrink=\pgfpageoptionborder,%
      resized width=.5\pgfphysicalwidth,%
      resized height=.5\pgfphysicalheight,%
      center=\pgfpoint{.75\pgfphysicalwidth}{.25\pgfphysicalheight},%
    }%
}


\pgfpagesuselayout{8 on 2, book format}

\newcommand\dopage{%
\noindent\resizebox{.99\linewidth}{!}{Page \thepage}
  \newpage}

\begin{document}
\dopage\dopage
\dopage\dopage
\dopage\dopage
\dopage\dopage
\end{document}

First page:

First Page

Second page:

Second Page