home *** CD-ROM | disk | FTP | other *** search
- % ------
- % ATPS.BNR 10/5/93
- % ------
- %
- % This is an example external PostScript banner for use with
- % ATPS.NLM. By default, when the ATPS print server prints a banner,
- % it does this by sending the printer PostScript or text data which is built
- % into ATPS.NLM. The external banner capability of ATPS allows you to replace
- % the default PostScript banner with one customized to your environment.
- % You could modify the banner to use a different font, include your
- % organization's logo, or be localized to your language and locale.
- %
- % When a version of ATPS.NLM that supports the external banner
- % tries to print a PostScript banner, it goes through the following steps:
- %
- % 1) transmits 9 strings with information about the print job
- % 2) transmits an optional message string definition (for example,
- % the text of a PostScript error)
- % 3) checks for the existence of SYS:SYSTEM\NW-MAC\ATPS.BNR
- % 4) transmits the contents of this file, or the ATPS internal banner
- % if it is not present
- % 5) waits for confirmation from the printer that the banner has
- % been output
- %
- % The banner PostScript code should use the string operands previously
- % pushed on the stack to generate a banner. It should also
- % check to see if the optional message string has been defined,
- % and, if so, include the message on the banner. Your finished ATPS.BNR
- % file should be placed in SYS:SYSTEM\NW-MAC for use by ATPS. This
- % sample print out the standard ATPS banner in a different font.
- %
- % The strings are transmitted in this order, and are thus present on the
- % stack in the *reverse* order:
- %
- % string 1 the localized date
- % string 2 the localized time
- % string 3 the server name
- % string 4 the queue name
- % string 5 the job's description
- % string 6 the job owner's NetWare name
- % string 7 the job number (in hexadecimal format)
- % string 8 the job's file name (set in Printcon for DOS users)
- % string 9 the job's user name (set in Printcon for DOS users)
- %
- % ---------
- % VARIABLES
- % ---------
-
- /HeaderFont
- /Helvetica findfont 12 scalefont def
- /NameFont
- /Helvetica findfont 30 scalefont def
- /MsgFont
- /Helvetica findfont 18 scalefont def
- /BordStart {72 72} def
- /BordTall 632 def
- /BordWide 468 def
- /ShadeStart {500 72} def
- /ShadeWide 39 def
- /HeadOff {18 BordTall 18 sub} def
-
- % ----------
- % PROCEDURES
- % ----------
-
- /doborder % draws the border
- { newpath
- BordStart moveto
- 0 BordTall rlineto
- BordWide 0 rlineto
- 0 BordTall neg rlineto
- closepath
- .5 setlinewidth
- stroke } def
-
- /doshade % print a shaded strip along the right edge
- { gsave
- newpath
- ShadeStart moveto
- 0 BordTall rlineto
- ShadeWide 0 rlineto
- 0 BordTall neg rlineto
- closepath
- .9 setgray
- fill
- grestore} def
-
- /HeaderPosition % move to the upper left of the top panel
- { BordStart moveto
- HeadOff rmoveto
- rmoveto } def
-
- /domsg % print the message text
- { MsgFont setfont
- 0 -340 HeaderPosition
- /MsgText load show } def
-
- /doheader % print the bannner information
- { NameFont setfont
- 96 -24 HeaderPosition
- show
- HeaderFont setfont
- 0 -66 HeaderPosition
- (Job Name: ) show
- 96 -66 HeaderPosition
- show
- 0 -90 HeaderPosition
- (Job Number: ) show
- 96 -90 HeaderPosition
- show
- 0 -114 HeaderPosition
- (User Account: ) show
- 96 -114 HeaderPosition
- show
- 0 -138 HeaderPosition
- (Description: ) show
- 96 -138 HeaderPosition
- show
- 0 -162 HeaderPosition
- (Queue: ) show
- 96 -162 HeaderPosition
- show
- 0 -186 HeaderPosition
- (Server: ) show
- 96 -186 HeaderPosition
- show
- 0 -210 HeaderPosition
- (Time and date: ) show
- 96 -210 HeaderPosition
- show
- ( ) show
- show } def
-
- % ------------
- % MAIN PROGRAM
- % ------------
-
- doborder
- doheader
- doshade
- userdict /MsgText known {domsg} if
- showpage
-
-