home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / vms / 17554 < prev    next >
Encoding:
Internet Message Format  |  1992-11-06  |  4.5 KB

  1. Path: sparky!uunet!ogicse!uwm.edu!zazen!psl.wisc.edu!dbk
  2. From: dbk@pslu1.psl.wisc.edu (Don Katz)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: Postscript SETUP modules for use with DECprint
  5. Message-ID: <1992Nov5.222936.23759@pslu1.psl.wisc.edu>
  6. Date: 5 Nov 92 22:29:36 GMT
  7. Article-I.D.: pslu1.1992Nov5.222936.23759
  8. Organization: Physical Sciences Lab, UW-Madison
  9. Lines: 100
  10.  
  11. In article <1992Oct30.220409.13671@pslu1.psl.wisc.edu>, I wrote:
  12. >
  13. >We are running DECprint Printing Services (CPS) as the symbiont to
  14. >serve our DEC 2150 Postscript laser printer. We would like to have
  15. >forms that would allow people to print text files with various numbers
  16. >of characters per line and lines per page, for example, 132x66, or
  17. >200x66, or 105x48 in landscape. We already do this for our old LN03. I
  18. >have read the DECprint manual, which has an example, but although I know a
  19. >little postscript, it is difficult to write a setup file without
  20. >knowing more about the Postscript emitted when a text file is sent to
  21. >a CPS printer.
  22. >
  23. >Question 1) Is there someone who has done this already? I would be
  24. >eternally grateful if you would share your setup modules with me.
  25.  
  26. Two respondents, RABINOWITZ@bear.com (Ari Rabinowitz, WorkStations
  27. x6518) and rz81154@mcvax2.d48.lilly.com (John Hiday, Eli Lilly)
  28. enlightened me with the information that CPS is designed to understand
  29. LN03 escape sequences. So we were able to use our existing library of
  30. setup modules by doing the following:
  31.  
  32. 1) redefine the searchlist used for setup modules to include
  33. laser.tlb (our LN03 setup library).
  34.  
  35. $ define/sys/exec cps_lib cps$devctl,"laser/data_type=ansi"
  36.  
  37. The /data_type=ansi qualifier is required. This indicates that the
  38. library should only be searched when the input in ANSI data, and that
  39. the contents are ANSI escape sequences, and should be so interpreted.
  40.  
  41. 2) Stop and restart the queue to force it to read the new logical name.
  42.  
  43. $ stop/queue/next psl_alcove_ps
  44. $ start/queue psl_alcove_ps
  45.  
  46. Couldn't have been simpler. Thank you very much to both Ari and John.
  47.  
  48. Carl Lydick < CARL@SOL1.GPS.CALTECH.EDU > provided access to his
  49. postscript setup modules:
  50.  
  51. Send>  mail to FILESERV@SOL1.GPS.CALTECH.EDU containing the line
  52. > SEND ASCII_TO_POSTSCRIPT
  53. > as the body of the message.  You'll receive several files that do the sort of
  54. > stuff you're asking about (not to mention one that prints crossword puzzles :-)
  55.  
  56. These looked great, but although they worked fine when I prepended
  57. them to a text file, using them as setup modules did not work for me
  58. (the printer just sat there waiting for data until I killed the
  59. entry). I did not try to diagnose the problem, since the first
  60. solution worked for us.
  61.  
  62. In answer to my second question:
  63.  
  64. > Question 2) Is there a way to capture the postscript emitted by the
  65. > symbiont into a file, so I can more easily write and test setup
  66. > modules?
  67.  
  68. Ari Rabinowitz replied:
  69. > Yes, again.  What I did for this is to create a postscript setup module
  70. > which just reads the input sent to the printer and prints it back to
  71. > the user.  To use it you have to specify /SETUP=PSSAVE/PARAM=MESS=KEEP
  72. > which creates a log file in your SYS$LOGIN.  The Postscript setup module
  73. > must be inserted into a postscript device control library which is
  74. > pointed to by the Library Search List defined above.
  75. > The actual postscript module follows:
  76. > %! PSSAVE setup module to save the Postscript output from the Symbiont
  77. > save /stl 65535 string def /gtl { currentfile stl readline { sl } { sl
  78. > exit } ifelse } def /sl { print (\n) print } def /rdt { { gtl } loop
  79. > restore } def rdt
  80. > What this does is save the current context, then define a maximum length
  81. > string to store the input.  It then defines gtl which reads the line and
  82. > calls sl to print the line, and exit if at the end of input.  Sl  simply
  83. > writes the line to the messages, which go to the log file if you specify
  84. > /PARAM=MESS=KEEP.  rdt just loops calling gtl until gtl exits, then it
  85. > restores the context.
  86. > Be warned that the ANSI translator has a tendency to send a lot of
  87. > postscript preamble before your actual data.
  88.  
  89. I did not try this. This postscript module uses the same principle as
  90. Carl Lydick's modules, that is, the postscript code reads its own
  91. input stream.
  92.  
  93. Thanks to everyone who replied. The net has proven its worth once
  94. more.
  95.  
  96. Don 
  97.  
  98. -- 
  99. -----------------------------------------------------------------------------
  100. Don Katz                                .         Physical
  101.                                        .- / \ -.      Sciences
  102. University of Wisconsin - Madison   ./'  /+-+\  `\.       Laboratory   E-MAIL
  103.