home *** CD-ROM | disk | FTP | other *** search
/ Between Heaven & Hell 2 / BetweenHeavenHell.cdr / 300 / 251 / psdown.txt < prev    next >
Text File  |  1986-12-23  |  11KB  |  289 lines

  1. %                             PSDOWN.TXT
  2.  
  3. % This collection of definitions allows a PC-WRITE user to use a PostScript
  4. % printer such as the Apple LaserWriter or the QMS PS-800.  This file 
  5. % must be downloaded to your PostScript printer before printing with PC-Write. 
  6. % To download this file use the DOS PRINT command.  Make sure you have access 
  7. % to the PRINT.COM file.  At the DOS prompt type:
  8.  
  9. %              PRINT PSDOWN.TXT  <Enter>
  10.  
  11. % If this is the first time you have invoked the PRINT command, you will be
  12. % prompted for the port your printer is attached to (probably COM1 or COM2).
  13. % Once PSDOWN.TXT is downloaded, you can either print to a file with PC-Write
  14. % and use DOS PRINT for output, or you can use the XON/XOFF capabilities of
  15. % PC-Write by printing to SER1 or SER2.
  16.  
  17. % REMEMBER, each time you turn your printer on, and want to print using
  18. % PC-Write, you must download the PSDOWN.TXT file as described above.
  19. % Be sure you have selected the Adobe PostScript driver from the MENULAZ
  20. % program.
  21.  
  22. % This file was written for Quicksoft by George A. Miller.
  23.  
  24.  
  25. statusdict begin statusdict /waittimeout 0 put end %set no time out
  26.  
  27. 300 dict begin
  28. /reencsmalldict 12 dict def
  29. /ReEncodeSmall
  30.   {reencsmalldict begin
  31.    /newcodesandnames exch def
  32.    /newfontname exch def
  33.    /basefontname exch def
  34.    /basefontdict basefontname findfont def
  35.    /newfont basefontdict maxlength dict def
  36.    basefontdict
  37.      {exch dup /FID ne
  38.         {dup /Encoding eq
  39.            {exch dup length array copy newfont 3 1 roll put}
  40.            {exch newfont 3 1 roll put} ifelse }
  41.         {pop pop} ifelse } forall
  42.    newfont /FontName newfontname put
  43.    newcodesandnames aload pop
  44.    newcodesandnames length 2 idiv
  45.    {newfont /Encoding get 3 1 roll put} repeat
  46.    newfontname newfont definefont pop end } def
  47.  
  48. /pcwritevec [
  49. 8#321 /Ccedilla
  50. 8#322 /udieresis
  51. 8#323 /eacute
  52. 8#324 /acircumflex
  53. 8#325 /adieresis
  54. 8#326 /agrave
  55. 8#327 /aring
  56. 8#330 /ccedilla
  57. 8#331 /ecircumflex
  58. 8#332 /edieresis
  59. 8#333 /egrave
  60. 8#334 /idieresis
  61. 8#335 /icircumflex
  62. 8#336 /igrave
  63. 8#337 /Ddieresis
  64. 8#340 /Aring
  65. 8#342 /Eacute
  66. 8#344 /ocircumflex
  67. 8#345 /odieresis
  68. 8#346 /ograve
  69. 8#347 /ucircumflex
  70. 8#354 /ugrave
  71. 8#355 /ydieresis
  72. 8#356 /Odieresis
  73. 8#357 /Udieresis
  74. 8#360 /aacute
  75. 8#362 /iacute
  76. 8#363 /oacute
  77. 8#364 /uacute
  78. 8#366 /ntilde
  79. 8#367 /Ntilde
  80.             ] def
  81. /c321 {(\321) fullshow} def
  82. /c322 {(\322) fullshow} def
  83. /c323 {(\323) fullshow} def
  84. /c324 {(\324) fullshow} def
  85. /c325 {(\325) fullshow} def
  86. /c326 {(\326) fullshow} def
  87. /c327 {(\327) fullshow} def
  88. /c330 {(\330) fullshow} def
  89. /c331 {(\331) fullshow} def
  90. /c332 {(\332) fullshow} def
  91. /c333 {(\333) fullshow} def
  92. /c334 {(\334) fullshow} def
  93. /c335 {(\335) fullshow} def
  94. /c336 {(\336) fullshow} def
  95. /c337 {(\337) fullshow} def
  96. /c340 {(\340) fullshow} def
  97. /c342 {(\342) fullshow} def
  98. /c344 {(\344) fullshow} def
  99. /c345 {(\345) fullshow} def
  100. /c346 {(\346) fullshow} def
  101. /c347 {(\347) fullshow} def
  102. /c354 {(\354) fullshow} def
  103. /c355 {(\355) fullshow} def
  104. /c356 {(\356) fullshow} def
  105. /c357 {(\357) fullshow} def
  106. /c360 {(\360) fullshow} def
  107. /c362 {(\362) fullshow} def
  108. /c363 {(\363) fullshow} def
  109. /c364 {(\364) fullshow} def
  110. /c366 {(\366) fullshow} def
  111. /c367 {(\367) fullshow} def
  112. /c245 {(\245) fullshow} def
  113. /c361 {(\361) fullshow} def
  114. /c341 {(\341) fullshow} def
  115. /c242 {(\242) fullshow} def
  116. /c243 {(\243) fullshow} def
  117. /c246 {(\246) fullshow} def
  118. /c343 {(\343) fullshow} def
  119. /c353 {(\353) fullshow} def
  120. /c277 {(\277) fullshow} def
  121. /c241 {(\241) fullshow} def
  122. /c253 {(\253) fullshow} def
  123. /c273 {(\273) fullshow} def
  124. /c225 {(\225) fullshow} def
  125. /c312 {(\312) fullshow} def
  126. /c267 {(\267) fullshow} def
  127. /c264 {(\264) fullshow} def
  128. /c250 {(\250) fullshow} def
  129. /c374 {gsave currentpoint exch pop rightmargin exch sub 16 sub
  130.        0 -6 rmoveto 0 exch rlineto stroke grestore} def
  131. /c375 {gsave currentpoint newpath exch pop rightmargin exch sub 16 sub dup
  132.        0 -6 rmoveto 0 exch rlineto
  133.        0 6 lineheight add rlineto
  134.        neg 0 rlineto closepath gsave stroke grestore
  135.        currentgray .8 setgray fill setgray grestore } def
  136. /Times-Roman /Times-Roman-PCWrite pcwritevec ReEncodeSmall
  137. /Times-Italic /Times-Italic-PCWrite pcwritevec ReEncodeSmall
  138. /Times-Bold /Times-Bold-PCWrite pcwritevec ReEncodeSmall
  139. /Helvetica /Helvetica-PCWrite pcwritevec ReEncodeSmall
  140. /Helvetica-Bold /Helvetica-Bold-PCWrite pcwritevec ReEncodeSmall
  141. /Courier /Courier-PCWrite pcwritevec ReEncodeSmall
  142. /Times-Roman /Times-Roman-PCWrite pcwritevec ReEncodeSmall
  143.  
  144. /2dup {dup 3 -1 roll dup 4 1 roll exch} def % duplicates top two elements
  145. /command (# ) def % this is the command string
  146. /ccommand (c   ) def % this is the character command string
  147. /checkHeight {scalefont} def % dup 1.15 mul /lineheight exch def 
  148. /#B {/Times-Bold-PCWrite findfont 10 checkHeight setfont} def
  149. /#C {/Times-Roman-PCWrite findfont 8 checkHeight setfont} def
  150. /#D {/Helvetica-Bold-PCWrite findfont 15 checkHeight setfont} def
  151. /#E {/Courier-PCWrite findfont 10 checkHeight setfont} def
  152. /#F {/Courier-PCWrite findfont 12 checkHeight setfont} def
  153. /#I {/Times-Italic-PCWrite findfont 10 checkHeight setfont} def
  154. /#J {/Courier-PCWrite findfont 15 checkHeight setfont} def
  155. /#P {/Times-Roman-PCWrite findfont 10 checkHeight setfont} def
  156. /#Q {/Times-Roman-PCWrite findfont 12 checkHeight setfont} def
  157. /#V {/Helvetica-PCWrite findfont 8 checkHeight setfont} def
  158. /#H { currentpoint 0 lineheight 4 div translate moveto .75 .75 scale} def
  159. /#h { 4 3 div dup scale currentpoint 0 lineheight 4 div neg translate moveto} def
  160. /#L { currentpoint 0 lineheight 6 div neg translate moveto .75 .75 scale} def
  161. /#l { 4 3 div dup scale currentpoint 0 lineheight 6 div translate moveto} def
  162. /#M { .3 setgray } def
  163. /#N {isExecute not {fullshowpage} if} def
  164. /#O {/isCrossout true def} def
  165. /#o {/isCrossout false def} def
  166. /crossout % string CROSSOUT => {backs up and draws an a strike line}
  167.   {stringwidth pop /width exch def
  168.   lineheight 20 div dup mul setlinewidth
  169.   /linewidth lineheight 4 div def
  170.   width neg linewidth rmoveto
  171.   width 0 rlineto gsave stroke grestore 0 linewidth neg rmoveto} def
  172. /#m { 0 setgray } def
  173. /## {(#) fullshow} def
  174. /isUnderline false def
  175. /#U {/isUnderline true def} def
  176. /#u {/isUnderline false def} def
  177. /underline % string UNDERLINE => {backs up and draws an underline}
  178.   {stringwidth pop /width exch def
  179.   lineheight 20 div dup mul dup setlinewidth dup add /linewidth exch def
  180.   width neg linewidth neg rmoveto
  181.   width 0 rlineto gsave stroke grestore 0 linewidth rmoveto} def
  182. /isDoubleUnderline false def
  183. /#W {/isDoubleUnderline true def} def
  184. /#w {/isDoubleUnderline false def} def
  185. /doubleUnderline % string DOUBLEUNDERLINE => {backs up and draws two underline}
  186.   {stringwidth pop /width exch def
  187.   lineheight 20 div dup mul dup setlinewidth dup add /linewidth exch def
  188.   width neg linewidth neg rmoveto
  189.   width 0 rlineto gsave stroke grestore 0 linewidth rmoveto
  190.   /linewidth linewidth 3 mul def
  191.   width neg linewidth neg rmoveto
  192.   width 0 rlineto gsave stroke grestore 0 linewidth rmoveto} def
  193. /isCrossout false def
  194. /isSecondStrike false def
  195. /#S {/isSecondStrike true def} def
  196. /#s {/isSecondStrike false def} def
  197. /secondStrike % string SECONDSTRIKE => {backs up and writes the string again}
  198.   {dup stringwidth pop neg lineheight 20 div dup mul add 0 rmoveto show} def
  199. /#R % leaves the currentpoint on the stack for the begining of a box
  200.    {currentpoint lineheight add 3 -1 roll} def
  201. /#r % assumes the upper left hand corner of a box is on the stack and the
  202.    % current point is the lower right hand corner.  If the halftone is on,
  203.    % (/M) then the box will be filled with a light shading.
  204.    { gsave 3 1 roll currentpoint
  205.      lineheight 20 div dup mul 6 mul sub % lower the box line a bit
  206.      newpath 2dup moveto
  207.      3 1 roll 2dup exch lineto
  208.      4 1 roll 3 -1 roll 2dup exch lineto
  209.      3 -1 roll lineto
  210.      pop pop closepath
  211.      1 setlinewidth
  212.      stroke
  213.      grestore} def
  214. /isPortrait true def
  215. /portrait {initmatrix 22 10 translate
  216.            /rightmargin 576 def
  217.            /isPortrait true def /line startline def } def
  218. /landscape {initmatrix 90 rotate 10 -794 translate
  219.            /rightmargin 756 def
  220.            /isPortrait false def /line startline def } def
  221. /#Y {/pagelength 66 def /lines 0 def portrait leftmargin line moveto} def
  222. /#Z {/pagelength 49 def /lines 0 def landscape leftmargin line moveto} def
  223. /#z {isPortrait {#Y} {#Z} ifelse} def
  224.  % this is home command
  225. /cexecute {/ccommand exch def currentdict ccommand cvn known
  226.            {ccommand cvx exec}
  227.            {(*** error *** unknown character command:) = ccommand =} ifelse} def
  228. /#G % will show a special character, eg. #G c321. will display the cedilla
  229.     %  IMPORTANT: a period must follow the number.
  230.    {(.) search { cexecute pop } if} def
  231. /#A % adjusts the lineheight. Eg. #A 12. will set the lineheight to 1/12th
  232.    % of an inch.  IMPORTANT: a period must follow the number.
  233.    {(.) search { cvi 72 exch div /lineheight exch def pop } if} def
  234. /#a % moves the current point to the right.  Eg. #a 12. will insert 1/12th
  235.    % of an inch of white space.  IMPORTANT: a period must follow the number.
  236.    {(.) search { cvi 72 exch div 0 rmoveto pop } if} def
  237. /isExecute false def     %flag for the execute mode
  238. /#T {/isExecute true def} def
  239. /#t {/isExecute false def} def
  240. /lineheight 12 def
  241. /leftmargin 0 def
  242. /startline 760 def
  243. /line startline def
  244. /lines 0 def
  245. /pagelength 66 def
  246. /buffer 2000 string def
  247. /final {{dup (*end) eq {false} {true} ifelse} {false} ifelse} def
  248. /fullshowpage {showpage isPortrait {#Y} {#Z} ifelse} def
  249. /fullshow % executes string or shows then checks for underline et cetera
  250.   { isExecute {cvx exec} { dup show
  251.    isUnderline {dup underline} if
  252.    isDoubleUnderline {dup doubleUnderline} if
  253.    isCrossout {dup crossout} if
  254.    isSecondStrike {dup secondStrike} if
  255.   pop} ifelse} def
  256. /execute { command 1 3 -1 roll put currentdict command cvn known
  257.            {command cvx exec}
  258.            {(*** error *** unknown command:) = command =} ifelse} def
  259. /strip { % strips off the string before # and prints it then executes
  260.          % the character following the #
  261.        (#) search
  262.        {fullshow pop
  263.           dup length 1 gt
  264.           {dup 0 get exch dup length 2 sub 2 exch getinterval exch}
  265.           {0 get () exch}
  266.           ifelse execute}
  267.        {fullshow () } ifelse
  268.        } def
  269. /showBuffer % processes the string on the top of the stack
  270.            {{dup length 0 le {exit} if strip } loop pop } def
  271. /IncLine {line lineheight sub /line exch def
  272.           lines 1 add dup pagelength ge
  273.          {pop 0 fullshowpage /line startline def} if /lines exch def} def
  274. /create {leftmargin line moveto showBuffer IncLine} def
  275. /anotherline {input buffer readline pop create} def % final {exit} ifelse
  276. /input (%stdin) (r) file def
  277. /*start  {/line startline def /lines 0 def #E #Y %default font and orientation
  278.           {anotherline} loop } def
  279.  
  280. *start
  281.  
  282. #z #Y #F #A 6.
  283. #D #D The PSDOWN.TXT file has been successfully downloaded to your printer.#F #F 
  284.  
  285. #P #P When printing the PC-Write PRINT.TST first remove the X font line.  The X font in the PostScript driver goes into raw PostScript#F #F 
  286. #P #P mode, which hangs the printer when printing PRINT.TST.#F #F 
  287. #N #F #A 6.#z
  288.  
  289.