make two-sided pdf layout with multiple pages per sheet

83 views Asked by At

Say I have the attached pdf with eight A6 (i.e., 105 x 74.25 mm) pages (marked, e.g., A A' B B' C C' D D'), I want to make a pdf with two A5 (i.e., 210 x 148.5 mm) page that can be two-sided printed. So basically the two pages should be

-----------
| A  | B  | 
-----------
| C  | D  | 
-----------

and

-----------
| B' | A' | 
-----------
| D' | C' | 
-----------

I tried pdf2ps test.pdf test1.ps; psbook -s4 test1.ps test2.ps; psnup -w21cm -h14.85cm -W10.5cm -H7.43cm -4 test2.ps test3.ps; ps2pdf test3.ps, to no avail. Following ChatGPT I also tried pdfjam --paper a5paper --landscape --nup 2x1 --outfile output.pdf test.pdf 1,2 3,4 5,6 7,8 but it did not work either. Any idea? Thanks in advance!

1

There are 1 answers

0
K J On

To get a result like :- enter image description here

You can use cross platform Coherent Graphics cpdf, there are downloadable binaries and API / SDK versions available. https://github.com/coherentgraphics

The command per file will be similar to 3 steps (reorder, assemble, rescale)

cpdf -merge "/path to/test.pdf" 1,3,5,7,4,2,8,6 AND -impose a4landscape AND -scale-to-fit a5landscape -o "/path to/output.pdf"