5

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.

babuntu
  • 85
  • Welcome to TeX.sx! A MWE would be great start. :) In general, when I have to achieve something similar, I use pdfpages and manually set the pages to include and in which order. To ease my life, I have a script to generate the sequence for me. – Paulo Cereda Nov 19 '15 at 17:42
  • i hoped there is a package already that does that. yea i can write a script easily when im sure about the formula :) the "picture" above is basically the MWE? \documentclass[a4paper,twoside]{article} \usepackage{pdfpages,geometry} \begin{document} \includepdf[pages={1,3,5,7,4,2,8,6},nup=2x2]{file} \end{document} – babuntu Nov 19 '15 at 18:04
  • Oh the picture gaves us the general idea indeed, I just wanted to be sure we were on the same page (no pun intended). :) Although, on a second thought, using pdfpages for this task is almost vernacular... :) – Paulo Cereda Nov 19 '15 at 18:07

1 Answers1

6

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

Andrew Stacey
  • 153,724
  • 43
  • 389
  • 751
  • nice! it seems to do what i want! (just one correction, i copied the page layout ascii-drawing from a different question, thats why the first page is actually the 2nd i knew it would cause confusion, sorry about this). is there a way to use \includepdf{page=-} with this? so i can have my document and a print.tex? – babuntu Nov 19 '15 at 20:40
  • @babuntu It would be simple enough to swap the pages. I presume you mean that the two printed pages should be swapped. I haven't tried it with \includepdf but I know of no reason why it shouldn't work. – Andrew Stacey Nov 19 '15 at 21:20
  • for me it will overlay all pages onto the first page i only replaced the document block: \begin{document} \includepdf[pages=1-2]{datei} \end{document} – babuntu Nov 19 '15 at 21:46
  • @babuntu I just tried it with \includepdf and it works for me. – Andrew Stacey Nov 19 '15 at 21:59
  • i updated my question with an image and code of the now error :( – babuntu Nov 20 '15 at 10:48
  • @babuntu The difficulty is that it works for me with a PDF that I have, and I don't have the PDF that you are trying with, so I can't test it for you. Try with another PDF and see if it works with that. – Andrew Stacey Nov 20 '15 at 17:48
  • 2
    Perhaps it *should* be on CTAN, though? This isn't the first kind of question of this sort. Although I would ideally like to see pdfpages do this, since it doesn't in any easy way.... – cfr Nov 21 '15 at 00:40
  • @cfr Unfortunately, as I only upload to CTAN infrequently, I have to relearn all of the intricacies every time and I just don't have the space in my days for that any more. I'll quite happily separate it out from the tex-sx package and put it on github, but that's as far as I can reasonably get for the moment. – Andrew Stacey Nov 21 '15 at 14:17
  • I can understand that, but I think it is a shame that there are lots of packages around which are clearly useful and clearly don't duplicate existing work, but which never make it to CTAN because of the frustrations people experience trying to upload work there. Tell me: if there was a script, say, such that you could say something like ctanup <package name> and it would be automated (or require minimal interaction), would that make a difference? Suppose you just had to create a <package name>.ctan file before you ran the script specifying some basic bits of information, for example. – cfr Nov 21 '15 at 21:16
  • @cfr That would be a big help. I mean no disrespect to the CTAN team - I know they are all volunteers. But it just takes me so long to figure it out each time, and I always get something wrong and end up feeling bad that I've created extra work for the team. So something that meant I could know that it was right would be fantastic. – Andrew Stacey Nov 21 '15 at 21:26
  • I know. That's been my experience, too. Even when I've done just the same thing as last time, it's been wrong because they've changed their preferences. I don't know if I can write something which would work, but I will think if I can try. Writing something to create the thing to upload shouldn't be hard. It is the uploading bit I'm not sure about. [At least, assuming I can figure out the current requirements, of course. But maybe I could get input with that, since it would make the CTAN team's lives easier, too, if a script helped people get it right. Even if it wasn't 100% perfect.] – cfr Nov 21 '15 at 21:32
  • @cfr See edit at top of post ... – Andrew Stacey May 09 '19 at 18:48
  • I am not a programmer. I am just trying to save paper printing some manuals with the very way described above (I am trying to avoid to one page per sheet by printing 8 of them in one). I came up witht the sequence myself but I cannot paste that in the printing options, I dont know why. Any suggestions? Thanks in advanced. – CARLOS FIGUEREDO Mar 03 '20 at 15:54
  • @AndrewStacey Could you elaborate on how the order is achieved? I can not see how to change it, but would like to have all pages up to half of total on one side and the rest on the other. That way one can easily bulk cut the pages and have them sorted. (See here](https://tex.stackexchange.com/questions/544907/how-to-reorder-included-pdf-pages-for-bulk-cutting-for-paper-saving) – BadAtLaTeX May 23 '20 at 16:55
  • @AndrewStacey: Where do I provide my A6 sized PDF file? Your code just gives 2 pages with verbatim Pages 1-8 in the order desired for A4 printing. Please clarify. – vrgovinda Mar 29 '22 at 12:15
  • @VrajarajaGovindaDas it's all one document. The code here is added to the existing document to produce the desired layout. – Andrew Stacey Mar 29 '22 at 21:26