Hallo, eine kleine Ergänzung. Falls man einen 2-seitigen Drucker hat, kann man mit folgendem Script aus einer pdf-Datei ein Din-A5-Buch zum Blättern erstellen:
Aufruf: dina5_book filename.pdf ------------------- #!/bin/bash # the next line restarts using wish \ exec tclsh "$0" "$@"
Von Michael Roessler am Mi, 18. August 2004 um 11:14 #
Und das ganze ohne tclsh dafür mit Rückkonvertierung in PDF und mit pdftops aus dem xpdf-Paket: #!/bin/bash # # call with dina5_book file.pdf file=$1 filebase=$(basename $file .pdf) pdftops $file output.ps psbook output.ps tmp.ps pstops "4:0L@.7(21cm,0)+1L@.7(21cm,14.85cm),2R@.7(0,29.7cm)+3R@.7(0,14.85cm)" tmp.ps > ${filebase}-book.ps rm -f output.ps tmp.ps echo "Converting back to pdf ..." ps2pdf ${filebase}-book.ps
Aufruf: dina5_book filename.pdf
-------------------
#!/bin/bash
# the next line restarts using wish \
exec tclsh "$0" "$@"
set filename [lindex $argv 0]
regsub -all ".pdf" $filename "" fileroot
regsub "[file dirname $fileroot]/" $fileroot "" fileroot
catch "exec pdf2ps ${filename} bla.ps" bla; puts $bla
catch "exec psbook bla.ps tmp.ps" bla; puts $bla
catch "exec pstops \"4:0L@.7(21cm,0)+1L@.7(21cm,14.85cm) ,2R@.7(0,29.7cm)+3R@.7(0,14.85cm)\" tmp.ps > ${fileroot}-book.ps" bla; puts $bla
file delete bla.ps tmp.ps
exec ls -l ${fileroot}-book.ps
-----------------------
#!/bin/bash
#
# call with dina5_book file.pdf
file=$1
filebase=$(basename $file .pdf)
pdftops $file output.ps
psbook output.ps tmp.ps
pstops "4:0L@.7(21cm,0)+1L@.7(21cm,14.85cm),2R@.7(0,29.7cm)+3R@.7(0,14.85cm)" tmp.ps > ${filebase}-book.ps
rm -f output.ps tmp.ps
echo "Converting back to pdf ..."
ps2pdf ${filebase}-book.ps