[comp.laser-printers] TeX on the QMS PS-800+ printer

HANCHE@NORUNIT.BITNET (03/05/88)

In TeXhax 1988#10 and also in Laser-Lovers, I asked for help concerning
our new QMS PS-800+ laser printer.  Briefly, the problem was that we could
not produce teX output on it using the Textset DVILASER/HP (v.1.6) driver.
We are using IBM AT-compatible computers running MS-DOS.

I got several replies, have solved the problem, and will now summarize for
the lists like I promised to do.

John S. Gourlay <jsg@blue.arbortext.com> kindly informs me that Textset
have changed their name to ArborText, that they now ship version 4.6
of both their DVILASER/HP and DVILASER/PS, and that the latter works
fine with their own QMS PS printer.  Upgrades seem to be quite reasonable.

Gaspard A.  de Jong <GASPARD@HROEUR5> Uses the QMS PS-800 (*not* the
Plus) with DVILASER/PS v.4.0, and is very happy with it.  David J.
Buerger <dbuerger@scu.bitnet> also got that to work, but when he
upgraded to the Plus,

> [...] it stopped working all together.  I worked with
> an Arbortext technician to solve the problem, but despite her valiant
> efforts, we never solved the problem.  We tried coordinating our tests
> with QMS and they never solved it either.

He didn't get DVILASER/HP to work with the printer either.  Indeed, de
Jong offered the following insights on the sticky subject of HP LaserJet
emulation:

> I am not surprised you cannot obtain TeX output with the HP LaserJet
> emulation.
> We regularly evaluate laser printers at the computing center. One of the
> tests I use for the HP Laser Jet emulation that most claim to offer is
> a file of TeX output. Of all the printers tested so far the only ones that
> have passed this test are:
> HP LaserJet+
> HP LaserJet II.
> The problem arises with TeX output because this places high demands on the
> font management capabilities of the printer. And the font management is
> usually emulated incompletely by HP clones.
> The LaserJet II is a perfect (and very affordable) printer for TeX.

Ah, had I only known earlier!  Now, the good news, in Buerger's words:

> However, Nelson Beebe's DVIALW software works like a champ.  I love it.
> His DVIJEP (HP) driver does not work on the QMS in emulation mode either,
> but it works fine on a true LaserJet Plus/II.  Plus it's free. [...]
> Otherwise, the PS-800+ has been great.

I had been under the erroneus impression that DVIALW was only available
for Unix and VMS machines!  But no, it runs on MS-DOS computers too.

I got a hold of it and compiled it using Microsoft 4.0, and it works fine.
That is, I had to fix a bug in it first which caused a font change command
to be left out at the beginnings of some pages.  (Bug reported to Nelson
Beebe; I am sure it will be gone in the next release.)

By the way, I first tried compiling it using Microsoft 5.0 and it compiles
without error messages, but the linker produces no executable (also without
any error messages, most of the time).  It seems to work for others - maybe
something with my configuration?

My thanks also go to Harald Koenig who provided valuable help.
------
Here is my quick bug fix.  Use at your own risk only, until an
"official" workaround is found.  I do not claim to understand all the
subtleties of this program! If you do not usually have your laser
printer stop in midstream, don't apply this bug fix.  Your version of
DVIALW probably does not have this bug.

1.  You need to declare a global BOOLEAN variable ld_this_page.  It will
be TRUE if any characters have been loaded so far on this page.  The file
gblvars.h is the place for this I think, though dvialw.c will work too.

2.  In the routine bopact(), file dvialw.c, insert this statement someplace:

    ld_this_page=FALSE;        /* Force naming of first font (hh-o) */

3.  In the routine setstr() in dvialw.c, find a piece of code looking like

        if ( font_switched ||
            (fontptr->font_number != last_font_number))
        {
            OUT_FONTNAME;
            font_switched = FALSE;
        }
        loadchar(c);

(Maybe the if test is on one line - I don't remember and I am too lazy
to unpack the archive and find the original)  and change the if part
to look like

        if (!ld_this_page || font_switched ||
            (fontptr->font_number != last_font_number))

also, insert the statement

            ld_this_page = TRUE;

in between the curly brackets.

4.  Recompile and go.  And remember, I don't guarantee it...

- Harald