[Prev][Next][Index][Thread]

Re: Printing problems with E/L



>>>>> "Naresh" == Naresh Sharma <sharma@IS.TWI.TUDelft.NL> writes:
In article <DLoH20.n4z@student.twi.tudelft.nl> sharma@IS.TWI.TUDelft.NL (Naresh Sharma ) writes:


    Naresh> The FAQ says that in default configs, lpr should work, and
    Naresh> if you want one can write a script executor_filter that
    Naresh> works like so:

    Naresh> executor_filter < faff.ps


    Naresh> So I wrote a script

    Naresh> #! /bin/sh lpr #1

    Naresh> That does what the FAQ say it should. The problem is that
    Naresh> I get a text printout of the postscript output file at the
    Naresh> printer.

    Naresh> TexEdit adds an extra % sign in front of %! PS-Adobe-3.0
    Naresh> to make it like %%! PS-Adobe-3.0

Nope, it's not TexEdit that is doing it, but a bug in Executor 1.99q.
This bug has been fixed internally (and in Executor/NEXTSTEP 1.99q2)
but I didn't realize it was causing problems, so I haven't yet made a
1.99q3 for Linux, but I can probably do so in the next 24 hours.

    Naresh> AFAIK, any line with a prepended %% is a comment in
    Naresh> postcript. Thus the whole file is seen by the
    Naresh> drivers-lpr-printers as text and not postscript. How can
    Naresh> one remedy this?

Revert to 1.99p9, wait for 1.99q3 or write a shell script that filters
out our botch.

Programming commentary follows -- feel free to skip this:

Although many of our bugs are incredibly esoteric and not worth
explaining to the programmers out there, what happened is that when we
adjusted our PostScript printing code to work again under NEXTSTEP we
changed a line that used to say (approximately):

fprintf (printer, PROLOG_STRING);

to

fprintf (printer, "%s%s%s", PROLOG_STRING_1, PROLOG_STRING_2, PROLOG_STRING_3);

since we had to break the prolog into different parts (under NEXTSTEP
we only need part 2, I think).  However if you do such a thing,
breaking the initial string into three pieces isn't sufficient, since
the original string had to have %% for each % since it was the format
argument to printf, rather than a literal argument to be printed by
%s.

Pretty embarrassing.  It slipped by our testing because our printer
doesn't auto-detect PostScript, we just use a variant that always
expects PostScript.

--Cliff
ctm@ardi.com


References: