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
psnup with other tools (
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.
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)