plan9port

[fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port # fast
git clone https://src.adamsgaard.dk/plan9port.git # slow
Log | Files | Refs | README | LICENSE Back to index

banner.ps (973B)


      1 %
      2 % Simple program to print a banner page
      3 %
      4 
      5 /banner {
      6 	/saveobj save def
      7 	erasepage initgraphics
      8 
      9 	/#copies 1 def
     10 	/inch {72 mul} bind def
     11 	/pagebbox [clippath pathbbox newpath] def
     12 
     13 	/font /Helvetica def
     14 	/size 20 def
     15 	/height pagebbox 3 get def
     16 	/width pagebbox 2 get .09 mul def
     17 
     18 	.92 setgray
     19 	pagebbox 0 get pagebbox 1 get moveto
     20 	width 0 rlineto 0 height rlineto width neg 0 rlineto closepath eofill
     21 	pagebbox 2 get pagebbox 1 get moveto
     22 	width neg 0 rlineto 0 height rlineto width 0 rlineto closepath eofill
     23 	0 setgray
     24 
     25 	font findfont size scalefont setfont
     26 	/linesp size size .15 mul add neg def
     27 	/tab (Destination) stringwidth pop 1.5 mul def
     28 	/nextline {0 0 moveto show tab 0 moveto show 0 linesp translate} def
     29 
     30 	pagebbox 0 get 1.5 width mul add pagebbox 3 get 2.0 width mul sub translate
     31 	(Bin)  nextline
     32 	(Name) nextline
     33 	(Owner) nextline
     34 	(File) nextline
     35 	(Account) nextline
     36 	(Destination) nextline
     37 	(Spooldate) nextline
     38 	showpage
     39 	saveobj restore
     40 } bind def