#@echo off
# Making two files out of one *.ps one,
#  to make an A5-format brochure from folded A4 sheets.
#  File 1 is input *.ps with upper left corner fitting to the A4 format
#  file 2 represents outer sides of A4 sheets,
#  file 3 the inner sides.
# Assuming reversed sequence of pages, like in our hp LJ 6L printer


### To get a correct PostScript file from the (linux) Acroread, not only should
### the Page Setup have A5 chosen, but also the Print options should have
### the ``Fit to Page'' box UNchecked. 
### Otherwise the composed two-page PostScript sheets become crazy!

# This file is valid for pstops patchlevel 17 --- there is no option
#    -p   in the original pstops!

psbook  $1 /tmp/2boo.ps

pstops '2:0L(210mm,0mm)+1L(210mm,148.5mm)' -pa4 /tmp/2boo.ps /tmp/tog.ps

psselect -o /tmp/tog.ps ${2-'out_sd.ps'}
psselect -e -r /tmp/tog.ps ${3-'inn_sd.ps'}


