[comp.lang.postscript] putting DRAFT on PS output

cyrus@hi.unm.edu (Tait Cyrus) (09/29/88)

Don't know if something like this has already been posted here.......

Recently, I needed to be able to place in 2 inch letters diagonally
across all pages output from ptroff (Transcript) the word DRAFT in
faint letters.

Below is shell script that takes as `stdin' the output from `ptroff -t'
and sends to `stdout'.  I called this shellscript `makedraft' and
would be called via:
	ptroff -t <other flags & input_files> | makedraft | lpr -Pps

There are probably easier ways to do this, or more efficient, but
it does work.

#!/bin/csh -f
sed 's/^%%EndProlog/\/DRAFT {save \/Times-Roman findfont 200 scalefont setfont\\
	72 3 mul 72 1 mul moveto\\
	60 rotate 0.99 setgray (DRAFT) show restore } def\\
%%EndProlog/' |\
sed 's/^BP/DRAFT\\
BP/'

I found it very useful and thought other might also.

---
W. Tait Cyrus   (505) 277-0806		e-mail: cyrus@pprg.unm.edu
University of New Mexico			
Dept of ECE - Parallel Processing Research Group
Albuquerque, New Mexico 87131