home *** CD-ROM | disk | FTP | other *** search
/ Executor 2.0 / executorv2.0.iso / pc / linux / extra / docs / maillist / text / archive.96 / text0373.txt < prev    next >
Encoding:
Text File  |  1996-07-25  |  2.2 KB  |  63 lines

  1. >>>>> "Naresh" == Naresh Sharma <sharma@IS.TWI.TUDelft.NL> writes:
  2. In article <DLoH20.n4z@student.twi.tudelft.nl> sharma@IS.TWI.TUDelft.NL (Naresh Sharma ) writes:
  3.  
  4.  
  5.     Naresh> The FAQ says that in default configs, lpr should work, and
  6.     Naresh> if you want one can write a script executor_filter that
  7.     Naresh> works like so:
  8.  
  9.     Naresh> executor_filter < faff.ps
  10.  
  11.  
  12.     Naresh> So I wrote a script
  13.  
  14.     Naresh> #! /bin/sh lpr #1
  15.  
  16.     Naresh> That does what the FAQ say it should. The problem is that
  17.     Naresh> I get a text printout of the postscript output file at the
  18.     Naresh> printer.
  19.  
  20.     Naresh> TexEdit adds an extra % sign in front of %! PS-Adobe-3.0
  21.     Naresh> to make it like %%! PS-Adobe-3.0
  22.  
  23. Nope, it's not TexEdit that is doing it, but a bug in Executor 1.99q.
  24. This bug has been fixed internally (and in Executor/NEXTSTEP 1.99q2)
  25. but I didn't realize it was causing problems, so I haven't yet made a
  26. 1.99q3 for Linux, but I can probably do so in the next 24 hours.
  27.  
  28.     Naresh> AFAIK, any line with a prepended %% is a comment in
  29.     Naresh> postcript. Thus the whole file is seen by the
  30.     Naresh> drivers-lpr-printers as text and not postscript. How can
  31.     Naresh> one remedy this?
  32.  
  33. Revert to 1.99p9, wait for 1.99q3 or write a shell script that filters
  34. out our botch.
  35.  
  36. Programming commentary follows -- feel free to skip this:
  37.  
  38. Although many of our bugs are incredibly esoteric and not worth
  39. explaining to the programmers out there, what happened is that when we
  40. adjusted our PostScript printing code to work again under NEXTSTEP we
  41. changed a line that used to say (approximately):
  42.  
  43. fprintf (printer, PROLOG_STRING);
  44.  
  45. to
  46.  
  47. fprintf (printer, "%s%s%s", PROLOG_STRING_1, PROLOG_STRING_2, PROLOG_STRING_3);
  48.  
  49. since we had to break the prolog into different parts (under NEXTSTEP
  50. we only need part 2, I think).  However if you do such a thing,
  51. breaking the initial string into three pieces isn't sufficient, since
  52. the original string had to have %% for each % since it was the format
  53. argument to printf, rather than a literal argument to be printed by
  54. %s.
  55.  
  56. Pretty embarrassing.  It slipped by our testing because our printer
  57. doesn't auto-detect PostScript, we just use a variant that always
  58. expects PostScript.
  59.  
  60. --Cliff
  61. ctm@ardi.com
  62.  
  63.