home *** CD-ROM | disk | FTP | other *** search
/ Chip 1995 March / CHIP3.mdf / demo / pctcp / program / disk4 / ps.hd_ / ps.hd
Encoding:
Text File  |  1993-06-03  |  2.3 KB  |  103 lines

  1. %!
  2.  
  3. % $Header:   J:\pctcp.dos\vcs\dosapps\lpd\src\ps.hdv   1.1   03 Jun 1993 14:02:06   natalia  $
  4.  
  5. % heeere's the prologue start
  6.  
  7. /$doLPDheader {
  8.  gsave
  9.   32 dict begin
  10.     8 array astore /args exch def
  11.  
  12.     /p {
  13.       0.0 coffset sub 0 translate
  14.       coffset
  15.       /coffset noffset def
  16.       /noffset exch def
  17.       coffset 0 translate
  18.       copypage erasepage newpath 0 pgtop moveto
  19.     } def
  20.  
  21.     /n {
  22.       spacing 0 3 -1 roll ashow
  23.       0 linepitch rmoveto
  24.       /y currentpoint exch pop def
  25.       y 0 lt {p} {0 y moveto} ifelse
  26.     } def
  27.  
  28.     /r {
  29.       spacing 0 3 -1 roll ashow
  30.       /y currentpoint exch pop def
  31.       0 y moveto
  32.     } def
  33.  
  34.     /q {
  35.       spacing 0 3 -1 roll ashow
  36.       /y currentpoint exch pop def
  37.     } def
  38.  
  39.     /HB {/Helvetica-Bold findfont exch scalefont setfont} def
  40.     /TR {/Times-Roman findfont exch scalefont setfont} def
  41.  
  42.     /linepitch -16.0 def
  43.     /spacing 0.0 def
  44.     /coffset 32.4 def
  45.     /noffset 32.4 def
  46.  
  47.     clippath pathbbox
  48.     /pgtop exch def
  49.     pop /y exch def y translate
  50.     /pgtop pgtop y sub 14.2 sub linepitch add def
  51.     coffset 0 translate
  52.     newpath 0 pgtop moveto
  53.  
  54.     /FN {16.0 TR} def
  55.     /FV {18.0 HB} def
  56.  
  57.     14.0 HB () n () n
  58.     72.0 HB args 0 get n () n () n
  59.     FN (username:  ) q
  60.     FV args 0 get n () n
  61.     FN (jobname:  ) q
  62.     FV args 1 get n () n
  63.     FN (originating host: ) q
  64.     FV args 2 get n () n
  65.     FN (class:  ) q
  66.     FV args 3 get n () n
  67.     FN (printed:  ) q
  68.     FV args 4 get n () n
  69.     FN (at server ) q
  70.     FV args 5 get q
  71.     FN ( on printer ) q
  72.     FV args 6 get q
  73.     FN ( on device ) q
  74.     FV args 7 get q
  75.     p
  76.   end
  77.  grestore
  78. } def
  79. % this is the end of the prologue
  80.  
  81. % the application prints the prologue, then print the arguments
  82. % as strings (in parens with parentheses escaped i.e. (\() and call
  83. % $doLPDheader as in this example below.
  84.  
  85. % (joel) (postscript.tst) (abs.ftp.com) (abs)
  86. % (thursdays aren't the best) (albion) (qms) (lpt2)
  87. % $doLPDheader
  88.  
  89. % that is all.
  90.  
  91. % $Log:   J:\pctcp.dos\vcs\dosapps\lpd\src\ps.hdv  $
  92.    
  93.       Rev 1.1   03 Jun 1993 14:02:06   natalia
  94.    Merged the changes from 2.22
  95.    
  96.       Rev 1.0.1.0   06 Apr 1993 09:14:36   natalia
  97.    No change.
  98.    
  99.       Rev 1.0   16 Oct 1992 13:42:46   plummer
  100.    Initial revision.
  101.  
  102.