|
|
1.1 ! root 1: # ! 2: # Center pages and put cropmarks at each corner. Physical page size ! 3: # is set with -w and -h. The default is 8.5 by 11.0 inches. Device ! 4: # dependent code to change paper size (e.g. with setpageparams) goes ! 5: # in the prologue. You may need to customize the device dependent ! 6: # code that we distribute. By default it only supports variable page ! 7: # sizes on Linotronic typesetters, and assumes those typesetters are ! 8: # using 12 inch wide paper. Use -d to disable execution of device ! 9: # dependent PostScript code. ! 10: # ! 11: # What's here was written quickly and will likely be very different ! 12: # in our next release. It should be part of a more general program!! ! 13: # ! 14: ! 15: POSTLIB=/usr/lib/postscript ! 16: PROLOGUE=$POSTLIB/cropmarks.ps ! 17: ! 18: EXPANDPAGE=true ! 19: PAGEWIDTH=8.5 ! 20: PAGEHEIGHT=11.0 ! 21: SCALETOFIT=false ! 22: XOFFSET=0.0 ! 23: YOFFSET=0.0 ! 24: ! 25: NONCONFORMING="%!PS" ! 26: ENDPROLOG="%%EndProlog" ! 27: BEGINSETUP="%%BeginSetup" ! 28: ENDSETUP="%%EndSetup" ! 29: ! 30: while [ -n "$1" ]; do ! 31: case $1 in ! 32: -d) EXPANDPAGE=false;; ! 33: ! 34: -h) shift; PAGEHEIGHT=$1;; ! 35: -h*) PAGEHEIGHT=`echo $1 | sed s/-h//`;; ! 36: ! 37: -s) SCALETOFIT=true;; ! 38: ! 39: -w) shift; PAGEWIDTH=$1;; ! 40: -w*) PAGEWIDTH=`echo $1 | sed s/-w//`;; ! 41: ! 42: -x) shift; XOFFSET=$1;; ! 43: -x*) XOFFSET=`echo $1 | sed s/-x//`;; ! 44: ! 45: -y) shift; YOFFSET=$1;; ! 46: -y*) YOFFSET=`echo $1 | sed s/-y//`;; ! 47: ! 48: -L) shift; PROLOGUE=$1;; ! 49: -L*) PROLOGUE=`echo $1 | sed s/-L//`;; ! 50: ! 51: --) shift; break;; ! 52: ! 53: -*) echo "$0: illegal option $1" >&2; exit 1;; ! 54: ! 55: *) break;; ! 56: esac ! 57: shift ! 58: done ! 59: ! 60: echo $NONCONFORMING ! 61: cat $PROLOGUE ! 62: echo $ENDPROLOG ! 63: echo $BEGINSETUP ! 64: echo "CropmarkDict begin" ! 65: echo "/pageheight $PAGEHEIGHT def" ! 66: echo "/pagewidth $PAGEWIDTH def" ! 67: echo "/expandpage $EXPANDPAGE def" ! 68: echo "/scaletofit $SCALETOFIT def" ! 69: echo "/xoffset $XOFFSET def" ! 70: echo "/yoffset $YOFFSET def" ! 71: echo "setup" ! 72: echo "end" ! 73: echo $ENDSETUP ! 74: ! 75: cat $* ! 76:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.