% This file is sent at the start of each Linotronic job. % It defines @bannerpage, @footerpage and a PostScript error handler. % It also defines page sizes and orientations, margin, and cutmark procedure. statusdict begin /waittimeout 300 def end % wait 5 minutes /@bannerpage % called below { initgraphics statusdict begin 842 72 0 1 setpageparams % width height margin orientation end 25 0 translate % move origin to the right /vpos 55 def % initial vertical pos 0 vpos moveto % start near top left corner /newline { /vpos vpos 15 sub def % decrease vertical pos by 15pt 0 vpos moveto % move to start of new line } def /newline2 { /vpos vpos 10 sub def % decrease vertical pos by 10pt 0 vpos moveto % move to start of new line } def /Courier findfont % Courier typewriter font 9 scalefont setfont % at 9pt (****************************************************************************\ **********************************************************) show newline2 /Courier findfont % Courier typewriter font 15 scalefont setfont % at 15pt @USER show newline % user name and file spec /Courier findfont % Courier typewriter font 9 scalefont setfont % at 9pt @DATE show newline2 @NOTE show newline2 (----------------------------------------------------------------------------\ ----------------------------------------------------------) show /#copies 1 def % print only 1 copy of banner page systemdict /showpage get exec } def /@footerpage % called at end of job or after error { initgraphics statusdict begin 842 72 0 1 setpageparams % width height margin orientation end 25 0 translate % move origin to the right /vpos 55 def % initial vertical pos 0 vpos moveto % start near top left corner /newline { /vpos vpos 15 sub def % decrease vertical pos by 15pt 0 vpos moveto % move to start of new line } def /newline2 { /vpos vpos 10 sub def % decrease vertical pos by 10pt 0 vpos moveto % move to start of new line } def /Courier findfont % Courier typewriter font 9 scalefont setfont % at 9pt (----------------------------------------------------------------------------\ ----------------------------------------------------------) show newline2 /Courier findfont % Courier typewriter font 15 scalefont setfont % at 15pt @USER show newline % user name and file spec /Courier findfont % Courier typewriter font 9 scalefont setfont % at 9pt @DATE show newline2 (PAGE COUNT: ) show statusdict begin pagecount % current pagecount end @oldpagecount % pagecount saved in banner.ps sub ( ) cvs show newline2 % show pages printed (****************************************************************************\ **********************************************************) show /#copies 1 def % print only 1 copy of footer page systemdict /showpage get exec } def % Redefine the error handler in errordict to show a suitable error message. /@errpage 64 dict def @errpage begin /prnt { dup type/stringtype ne{=string cvs}if dup length 6 mul/tx exch def/ty 10 def currentpoint/toy exch def/tox exch def 1 setgray newpath tox toy 2 sub moveto 0 ty rlineto tx 0 rlineto 0 ty neg rlineto closepath fill tox toy moveto 0 setgray show } bind def /nl {currentpoint exch pop lmargin exch moveto 0 -11 rmoveto} def /== {/cp 0 def typeprint nl} def /typeprint { dup type dup currentdict exch known {exec}{unknowntype}ifelse } readonly def /lmargin 72 def /rmargin 72 def /tprint { dup length cp add rmargin gt{nl/cp 0 def}if dup length cp add/cp exch def prnt } readonly def /cvsprint {=string cvs tprint( )tprint} readonly def /unknowntype {exch pop cvlit(??)tprint cvsprint} readonly def /integertype {cvsprint} readonly def /realtype {cvsprint} readonly def /booleantype {cvsprint} readonly def /operatortype {(//)tprint cvsprint} readonly def /marktype {pop(-mark- )tprint} readonly def /dicttype {pop(-dictionary- )tprint} readonly def /nulltype {pop(-null- )tprint} readonly def /filetype {pop(-filestream- )tprint} readonly def /savetype {pop(-savelevel- )tprint} readonly def /fonttype {pop(-fontid- )tprint} readonly def /nametype {dup xcheck not{(/)tprint}if cvsprint} readonly def /stringtype { dup rcheck{(\()tprint tprint(\))tprint}{pop(-string- )tprint}ifelse } readonly def /arraytype { dup rcheck{dup xcheck {({)tprint{typeprint}forall(})tprint} {([)tprint{typeprint}forall(])tprint}ifelse}{pop(-array- )tprint}ifelse } readonly def /packedarraytype { dup rcheck{dup xcheck {({)tprint{typeprint}forall(})tprint} {([)tprint{typeprint}forall(])tprint}ifelse}{pop(-packedarray- )tprint}ifelse } readonly def /courier /Courier findfont 10 scalefont def /@oldhandleerror errordict /handleerror get def % save current error handler end % of @errpage errordict /handleerror % redefine error handler { systemdict begin $error begin @errpage begin newerror { /newerror false store vmstatus pop pop 0 ne { grestoreall } if initgraphics newpath clippath pathbbox % push LLx LLy URx URy lmargin exch 360 sub moveto % subtract 5" from URy pop pop pop % remove URx LLy LLx courier setfont (POSTSCRIPT ERROR: ) prnt errorname prnt nl (OFFENDING COMMAND: ) prnt /command load prnt nl $error /ostack known { (OPERAND STACK:) prnt nl $error /ostack get aload length {==} repeat } if /#copies 1 store % print only one error page systemdict /showpage get exec userdict begin @footerpage end % then print footer page /newerror true store /@oldhandleerror load end end end exec } { end end end } ifelse } dup 0 systemdict put dup 4 @errpage put bind readonly put @bannerpage % print the banner page /@oldpagecount % used in @footerpage statusdict begin pagecount end def % margin is offset (in pts) from paper edge. % psprint must make sure that one of the following page setups is called. % The built-in page setups are available in version 42.5 but not 38.0. /A3Lsetup { /margin 0 def % margin + width must be <= 842 = 11.7in statusdict begin margin setpagemargin end a3 % built-in procedure in userdict } def /A4Psetup { /margin 0 def % margin + width must be <= 842 = 11.7in statusdict begin margin setpagemargin end A4 % built-in procedure in userdict } def /A4Lsetup { /margin 25 def statusdict begin margin setpagemargin end a4 % built-in procedure in userdict } def /A5Psetup { /margin 25 def statusdict begin margin setpagemargin end A5 % built-in procedure in userdict } def /A5Lsetup { /margin 25 def statusdict begin margin setpagemargin end a5 % built-in procedure in userdict } def /B5Psetup { /margin 25 def statusdict begin margin setpagemargin end B5 % built-in procedure in userdict } def /B5Lsetup { /margin 25 def statusdict begin margin setpagemargin end b5 % built-in procedure in userdict } def /cornercuts { % draw short lines at corners of page image area initgraphics newpath clippath pathbbox % push LLx LLy URx URy /URy exch def /URx exch def % don't use LLx LLy because they don't allow for margin setting pop pop newpath % remove clipping path % line length = 10pt URx URy moveto -10 0 rlineto URx URy moveto 0 -10 rlineto 0 0 moveto 10 0 rlineto 0 0 moveto 0 10 rlineto 0 URy moveto 10 0 rlineto 0 URy moveto 0 -10 rlineto URx 0 moveto -10 0 rlineto URx 0 moveto 0 10 rlineto 0.2 setlinewidth stroke } def % psprint will override this default if user asks for -nocut: /@cutmarks { cornercuts } def % Redefine userdict showpage to first call @cutmarks, then showpage % from systemdict, then a thin blank page to separate job pages: /showpage { @cutmarks % draw any cut marks systemdict /showpage get exec % show current page statusdict begin pageparams end % get width height margin orientation /oldorientation exch def /oldmargin exch def /oldheight exch def /oldwidth exch def % save current page setups /old#copies #copies def % save current #copies /#copies 1 def % only print 1 gap page statusdict begin 842 18 0 1 setpageparams % 18pt = .25" gap end systemdict /showpage get exec % show gap page /@oldpagecount @oldpagecount 1 add def % increment @oldpagecount oldwidth oldheight oldmargin oldorientation statusdict begin setpageparams end % restore saved page setup /#copies old#copies def % restore saved #copies } def