Er wandelt Postscriptdateien um, wie auch im Source steht, ich habe ihn ein bisschen verändert, da Bugs auftauchten, jetzt sollte es stimmen:
Code
- !/usr/bin/perl -sw
- ##
- ## it converts a postscript file to a book format with two pages
- ## of text on each side of an A4 sheet. the sheets fold and bind
- ## into a book of same form-factor as most trade paperbacks.
- ##
- ## syntax: makeabook -book=file.ps
- ##
- ## Copyright (c), Vipul Ved Prakash. All rights reserved.
- ## This code is free software; you can redistribute it and/or modify
- ## it under the same terms as Perl itself.
- ## modded by fred777, bugs fixxed
- ##
- ## $Id$
- die unless $book;
- my $filename = $book;
- $book =~ s/\.ps$//i;
- print "realigning pages...\n";
- system "psbook -s4 $filename > $book-tempA.ps";
- print "\nmerging pages...\n";
- system "psnup -2 $book-tempA.ps > $book-tempB.ps";
- system "rm $book-tempA.ps";
- print "\nwriting front sides...\n";
- system "psselect -o $book-tempB.ps > $book-FRONT.ps";
- print "\nwriting back sides...\n";
- system "psselect -e $book-tempB.ps > $book-BACK.ps";
- system "rm $book-tempB.ps";