home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / ultrix / 6339 < prev    next >
Encoding:
Internet Message Format  |  1992-08-19  |  5.0 KB

  1. Xref: sparky comp.unix.ultrix:6339 comp.sys.hp:9461 comp.sys.dec:4610
  2. Newsgroups: comp.unix.ultrix,comp.sys.hp,comp.sys.dec
  3. Path: sparky!uunet!morrow.stanford.edu!leland.Stanford.EDU!polly
  4. From: polly@leland.Stanford.EDU (polly siegel)
  5. Subject: Summary: How to enable Duplex printing from printcap?
  6. Message-ID: <1992Aug19.230414.15116@leland.Stanford.EDU>
  7. Sender: news@leland.Stanford.EDU (Mr News)
  8. Organization: DSG, Stanford University, CA 94305, USA
  9. References: <1992Aug18.164239.14725@leland.Stanford.EDU>
  10. Date: Wed, 19 Aug 92 23:04:14 GMT
  11. Lines: 89
  12.  
  13. I posted a query to the net on how to access the duplex feature on my
  14. HP LaserJet IIID printer (with PostScript) from the BSD lpr interface.
  15. I've received a lot of responses and have arrived at a couple of solutions to
  16. the problem, so I thought I'd summarize here.  Thanks to everyone who
  17. responded!
  18.  
  19. No solution seemed to solve the complete problem, but it looks like we have
  20. a hybrid solution that should work.
  21.  
  22. First, to summarize the problem:
  23.  
  24. We have an HP LaserJet IIID printer which has duplex (two-sided) printing
  25. and PostScript, along with some other options.  The printer is connected
  26. to a DEC 5000/240 running Ultrix 4.2.  Other machines access the printer
  27. through the network; most of the machines are DEC machines, but not all.
  28. I wanted to be able to access the fancy features of the printer through the
  29. lpr rather than having to manually set them on the printer.
  30.  
  31. Possible solutions:
  32.  
  33. 1. Modify lpr.  If you read the lpr man page, you'll notice that for
  34. normal printers, no general capabilities are provided to access special
  35. features of a particular printer (as in the system V lp command).  Since I
  36. didn't have the source to lpr, and since that would change with any operating
  37. system upgrade, I decided not to modify lpr to add my own options (which would
  38. then get sent to my print filters).
  39.  
  40. 2. Configure the printer as a DEC Print Server.  If you read the lpr man page
  41. further, you'll find that lpr supports a bunch of printer-specific options
  42. which includes the features I wanted access to.  However, you must enable the
  43. printer as a Print Server to gain access to them.  The DEC documentation
  44. refers to specific DEC printers when talking about print servers, and despite
  45. trying various options in printcap, I could never get this to work for
  46. my printer.  So I gave up on this option.  (Maybe someone has some more
  47. information on this?)
  48.  
  49. 3. Use an existing option to lpr that isn't being used.  Here, we can snarf
  50. an unused option (say, -i or something) and modify the input filter to snag
  51. it and output the appropriate PostScript code.  This approach is tempting but
  52. is potentially perilous since you can't be sure that no one will want to use
  53. that option.  This solution also requires an understanding of the filters that
  54. the printer uses (as set in /etc/printcap) so that you can insert the
  55. postscript code at the appropriate place.
  56.  
  57. What I finally settled on was a script and a filter.  The script, supplied by
  58. Andy Sun (andy@ie.utoronto.ca) (and modified slightly by me), is for printing
  59. PostScript files.  It simply prepends the appropriate PostScript codes for the
  60. options you want.  The flags to lpr are the same as the flags documented for
  61. Print Servers -- so -K2 will get you duplex printing.  To print a postscript
  62. file you then simply say "lprscript -K2 myfile" and it will print it with
  63. duplex printing to $PRINTER.  If you're interested in this you can send me
  64. mail...
  65.  
  66. Gary Beckmann (gary@zeus.dfci.harvard.edu) sent me a pointer to the program
  67. "psf", written by Tony Field (tony@ajfcal.cuc.ab.ca).  This can be ftp'd
  68. from pub/psf/psf3.5.tar.Z at fsa.cpsc.ucalgary.ca.  This program (or set
  69. of programs) provided filters for normal text files and other sorts of files
  70. to allow you to access both special capabilities of the printer and to
  71. do other special printing things, such as 2-up and 4-up printing.  It's
  72. basically a postscript filter that runs in front of lpr which inserts all
  73. the appropriate options in postscript.  So, to print a text file 4-up and
  74. in duplex mode (for major space savings), you'd say "psf -4 -D myfile | lpr".
  75.  
  76. psf is really easy to install and supports just about any printer you'd
  77. want to support.  Be aware that the printer definition file for the
  78. HP LaserJet IIID with PostScript Plus has some errors, so if you're interested
  79. I can send you my modified PostScript definition file.
  80.  
  81. So I can use lprscript for PostScript files, and psf for non-PostScript files
  82. to access the full capabilities of the printer.
  83.  
  84. I would still like to be able to configure this printer as a Print Server, and
  85. I might work on this some more.  If someone out there knows
  86. that it either can or can't be done, I'd appreciate hearing about it.
  87.  
  88. We had also had some trouble getting the right printcap definition, so if
  89. anyone is interested I can send that to them too.  (Should this stuff possibly
  90. go in a FAQ just in case anyone else is interested in it?)
  91.  
  92. Thanks again for all the responses!
  93.  
  94. - polly
  95.  
  96. --------
  97. Polly Siegel
  98. Stanford University
  99. (polly@grover.stanford.edu)
  100.  
  101.  
  102.