Search code examples
pdfpdftkimposition

automatically imposing 4 pdf pages into A4 sheet following custom order


I want to reassemble my PDF documents to print them on A5 using the A4 format from my printer. Also I need to print two sites (slides) on each A5 page which of course should be double sided. Hence the A4 page is in landscape format. Than I want to cut it in the middle. A short example for 9 slides:

first A4   first back    second A4
 [1][5]      [3][7]       [9][-]
 [2][6]      [4][8]       [-][-]

After cutting it it would get me slides 1-4, 5-8, 9 on a two-sided A5 paper.

Printing this using "Booklet Printing" has not worked yet. I thought of reassembling the PDF pages automatically with a shell script using pdftk and calculates mod 8 as changing the order manually is not an option. After I rearanged the order I can easily print the slides using the options of my printer.

How could that be done or is there an easier way to it? Thanks


Solution

  • Even though its been a little while since you asked this question, you might try jPdf Tweak to arrange your (current/future) pdf slides. Supposing your base slides are printed as landscape A4, a possible config string for the n-up layout you initially asked for, would be
    8:!+1N0.5+0.0%+100.0%,+5N0.5+100.0%+100.0%,+2N0.5+0.0%+0.0%,+6N0.5+100.0%+0.0%,!+3N0.5+0.0%+100.0%,+7N0.5+100.0%+100.0%,+4N0.5+0.0%+0.0%,+8N0.5+100.0%+0.0%
    the corresponding layout looks like (ignore the preset title here):
    enter image description here

    If you start with postscript files a similar string could be used with pstops.