% fixed stuff - don't mess beyond this point unless you know what you're doing % still to do: % handle lf/cr % headings (positioned but not found - are they available?) /NumberUpDict 3 dict dup begin 1 3 dict dup begin /Xup 1 def /Yup 1 def /Rotate false def end def 2 3 dict dup begin /Xup 2 def /Yup 1 def /Rotate true def end def 4 3 dict dup begin /Xup 2 def /Yup 2 def /Rotate false def end def % for tree killing managers who deserve to go blind ... % 8 3 dict dup begin /Xup 4 def /Yup 2 def /Rotate true def end def % 9 3 dict dup begin /Xup 3 def /Yup 3 def /Rotate false def end def % 16 3 dict dup begin /Xup 4 def /Yup 4 def /Rotate false def end def end NumberUp 2 copy known not {pop 1}if get def /CW 0.6 sz mul aspect mul def % correct for Courier /Tab CW 8 mul def /Orient Land {{PW 0 translate 90 rotate}}{{}}ifelse def /ln 0 def /pg 0 def /pgn 8 string def /Showpage {pg NumberUp mod 0 eq {showpage}if} def /PosnPage {NumberUpDict begin PW PH Rotate {PW 0 translate 90 rotate exch} if PH Yup mul div exch PW Xup mul div exch scale pg NumberUp mod dup Xup mod PW Hadj 2 mul sub mul Xup 2 idiv Hadj mul add exch Xup idiv neg Yup add 1 sub PH Vadj 2 mul sub mul Yup 2 idiv Vadj mul add translate} def /SF aspect 1 eq {{sz scalefont}}{[[sz aspect mul 0 0 sz 0 0] /makefont load cvx]cvx}ifelse def /nl {grestore 0 sz neg rmoveto /ln ln 1 add % move down, count line 2 index dup length 1 eq {0 get 12 eq}{pop false}ifelse % is the text formfeed ? {1 eq {0 sz rmoveto 0}{65535}ifelse} % yes: are we at start of job or not ? {dup lpp gt {grestore Showpage gsave Page}if}ifelse % no: was page full ? store gsave}def /Page {PosnPage Orient mar top moveto pop 1 Bars {gsave -2 -2.25 sz mul rmoveto 3 sz mul CW wid mul 3 add 3 6 lpp {pop 0 2 index neg rlineto dup 0 rlineto 0 2 index rlineto dup neg 0 rlineto 0 2 index -2 mul rmoveto} for 0.95 setgray fill pop pop grestore}if currentpoint -2 sz rmoveto lpp 1 add sz mul 2 add dup 0 exch neg rlineto CW wid mul 3 add 0 rlineto 0 exch rlineto /pg pg 1 add store Head {gsave /Courier-Bold findfont SF 0.8 scalefont setfont pg pgn cvs dup length 5 add CW mul 0.8 mul neg 2 rmoveto (Page )show show 2 copy sz 2 add add moveto statusdict begin /jobname where {pop jobname}{()}ifelse show end grestore}if closepath Box {gsave 1.2 setlinewidth stroke grestore}if clip moveto }def /Courier findfont SF setfont gsave 0 Page pop 0 sz rmoveto gsave {currentfile S readline not {showpage exit} if nl {<09> search not {exit}if show pop currentpoint pop mar sub dup CW 0.5 mul add Tab div ceiling Tab mul exch sub 0 rmoveto} loop show}loop