Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to create a CUPS printer queue which accepts books with A5 pages and automatically arranges them as booklets on A4 paper before printing them. Essentially, this is done wonderfully using the following pipe:

psbook -s4 | psnup -Pa5 -pa4 -2

I've created a CUPS queue that uses this pipe and everything works perfectly, the pages are arranged and printed exactly as I want to, except that the output from psnup confuses my printer and duplexing options are ignored (possibly debian bug 168954). I've found claims on the web that psutils is broken which offer a workaround, but since I do not understand how the workaround is supposed to be used, I'm trying to replicate the behaviour psbook and psnup with other tools (pstops and mpage for now).

The problem is that all instructions on making booklets on the web assume that I have A4 pages which I want to scale down to A5 and turn into a booklet, and unfortunately I'm not doing anything so insane. I want something more simpler – take the A5 pages and arrange them over the A4 pages. The question is how?

I came up with the following pagespec for pstops which downscales the A4 pages:


And if I upscale my A5 pages to A4 beforehand, it works. Unfortunately, everything is slightly off (the scale, the borders), and I cannot modify the pagespec to correctly position the A5 pages.

I tried placing the A5 page in the middle of an A4 page and use scale @1, but when I adjust the offsets, my text gets cropped anyway.

And mpage seems to be designed for scaling only, I couldn't find any way to force it not to scale.

P.S. I checked that the resulting postscript file contains all duplex settings right before arriving at the printer, although CUPS adds some of them twice (because the printing goes through two queues)

share|improve this question
By the way, passing the output through ps2pdf and then through pdf2ps fixes my original issue with psbook and psnup, but that's a very nasty and slow way to do it. – Rosh Oxymoron Aug 3 '11 at 14:49

Start with an A5 PDF file with the pages in sequence. Turn the following into a pipeline script:

pdftops FILE.pdf
psbook -q
psnup -q -la4 -pa4 -Pa5 -2

That should give you a FILE_SIG.pdf.

Note: looks wrong but prints correctly. Changing it to a PDF saves space and displays correctly.

Now all you have to do is get your printer to print out the sheets back to back without screwing up.

share|improve this answer
Thanks but I've got psnup: invalid option -- 'a' and I solved omiting the -la4: psnup -pa4 -Pa5 -2 – Dorian Feb 16 '13 at 2:04
Regarding the "back to back" part, it is likely thet you will have to print this using the "short-edge flip" option. – aronisstav Nov 26 '15 at 16:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .