3 # make-ps-header - make a PostScript header page on stdout
4 # Installed in /usr/local/libexec/make-ps-header
8 # These are PostScript units (72 to the inch). Modify for A4 or
9 # whatever size paper you are using:
19 echo "Usage: `basename $0` <user> <host> <job>" 1>&2
24 # Save these, mostly for readability in the PostScript, below.
32 # Send the PostScript code to stdout.
38 % Make sure we do not interfere with user's job that will follow
43 % Make a thick, unpleasant border around the edge of the paper.
45 $border $border moveto
46 $page_width $border 2 mul sub 0 rlineto
47 0 $page_height $border 2 mul sub rlineto
48 currentscreen 3 -1 roll pop 100 3 1 roll setscreen
49 $border 2 mul $page_width sub 0 rlineto closepath
50 0.8 setgray 10 setlinewidth stroke 0 setgray
53 % Display user's login name, nice and large and prominent
55 /Helvetica-Bold findfont 64 scalefont setfont
56 $page_width ($user) stringwidth pop sub 2 div $page_height 200 sub moveto
60 % Now show the boring particulars
62 /Helvetica findfont 14 scalefont setfont
64 [ (Job:) (Host:) (Date:) ] {
65 200 y moveto show /y y 18 sub def
68 /Helvetica-Bold findfont 14 scalefont setfont
70 [ ($job) ($host) ($date) ] {
71 270 y moveto show /y y 18 sub def