#!/usr/bin/perl # Usage: perl flip2.pl inputfile.ps > outputfile.ps # Second attempt at flipping postscript pages. Useful for transparencies if # you want to write on the opposite side to the printer ink. # Iain Murray Nov 2003 -- www.iainmuray.net # This version assumes a4. Should work out translation from the bounding box, # but this is trick as the ps file might use (atend) can have changing bounding # boxes, etc. Need to think about this. Gah! Basically postscript isn't easily # hackable without interpretting the damn lot. while (<>) { print; if (/^%%Page:/) { print "595 0 translate\n-1.000 1.000 scale\n"; } }