[comp.unix.xenix.sco] Problems with troff output on a laser printer

rao@hsi86.hsi.com (Ananth Rao) (01/29/91)

Has anyone got 'troff' to work with a laser printer, specifically the
HP Laserjet III?  

I know that troff writes to /dev/cat, so I created this device special 
file with the same major and minor numbers as those of my parallel port
device /dev/lp0 (using mknod). I then configured the printer to deal 
with the new device name (using mkdev lp).  When I print out stuff, 
the printer spews out troff binary rather than text.

Is there something I'm doing wrong?

I have SCO Xenix 2.2.3, running on a 386  25 MHz m/c.


Thanks is advance.

Ananth Rao                                    {uunet,yale}!hsi!rao
3M Health Information Systems                          rao@hsi.com
Wallingford, Connecticut
-- 
Ananth Rao                                    {uunet,yale}!hsi!rao
3M Health Information Systems                          rao@hsi.com
Wallingford, Connecticut

davidsen@sixhub.UUCP (Wm E. Davidsen Jr) (01/30/91)

In article <2984@hsi86.hsi.com> rao@hsi86.hsi.com (Ananth Rao) writes:
| 
| Has anyone got 'troff' to work with a laser printer, specifically the
| HP Laserjet III?  

| Is there something I'm doing wrong?

  An LJ3 is not a c/a/t. What you need is software to convert the output
in the format required for the cat device to output for the LJ3 device.
They are totally different, the c/a/t is a 2000 dpi (from memory) output
device to film. The LJ3 is very nice for a low resolution printer, but
it doesn't take the c/a/t commands (or produce production quality
output).

  I think jetroff does this, I know you can use the ELAN Eroff package
and get great results doing this.
-- 
bill davidsen - davidsen@sixhub.uucp (uunet!crdgw1!sixhub!davidsen)
    sysop *IX BBS and Public Access UNIX
    moderator of comp.binaries.ibm.pc and 80386 mailing list
"Stupidity, like virtue, is its own reward" -me

chip@chinacat.Unicom.COM (Chip Rosenthal) (01/30/91)

In article <2984@hsi86.hsi.com> rao@hsi86.hsi.com (Ananth Rao) writes:
>Has anyone got 'troff' to work with a laser printer, specifically the
>HP Laserjet III?  

Yes...and they tend to use Chris Lewis' psroff to do so.  Trying to
redirect C/A/T typesetter commands to your LaserJet is about as productive
as sending PCL commands to a plotter.  You need something which converts
the C/A/T codes into something the device understands, and psroff does
this.  Note that this is a nontrivial operation -- it's more than just
translating a raw byte stream.  The typesetter needs some sort of knowledge
of the target device (in particular the font widths) to produce reasonable
output.

Other things to look into...

    - If you've got g++, you might want to look into groff.  I've
      heard good things about it - but have no first hand experience.

    - If you get your hands on a vanilla DWB, such as the one Interactive
      distributes, it is quite usable with `jetroff' as the backend.  The
      main difficulty is that ISC distributes on filesystem floppies, so
      you will need access to a SysV/386 machine to unload the stuff.  Also,
      I ran all the executables through `coffconv' to make them x.out formats
      (which in retrospect I'm not sure is required), and they all ran fine
      except for `pic' which dumped core.

    - Myself, I'm using Elan's eroff which is a pricey but solid package.
      Even though it includes LaserJet support, I ended up chucking it
      and using `jetroff' as the backend.  Jetroff is so much superior
      and flexible.

    - There are other third party DWB's ranging from the inexpensive
      (e.g. Leverage) to pricey (e.g. Xroff).

I wish I had some good things to say about psroff - but the simple fact
of the matter is that I haven't used it.  On paper, it looks exactly like
what you need, and Chris is active in supporting the package.  You should
be able to find it at a comp.sources.unix archive site.  Patches have
been released to comp.sources.bugs.
-- 
Chip Rosenthal  512-482-8260  |  If software look-and-feel can be protected,
Unicom Systems Development    |  then I'd like to claim a copyright upon
<chip@chinacat.Unicom.COM>    |  `Memory fault - core dumped'.

chip@chinacat.Unicom.COM (Chip Rosenthal) (02/01/91)

In article <3026@sixhub.UUCP> davidsen@sixhub.UUCP (bill davidsen) writes:
>In article <2984@hsi86.hsi.com> rao@hsi86.hsi.com (Ananth Rao) writes:
>| Has anyone got 'troff' to work with a laser printer, specifically the
>| HP Laserjet III?  
>  I think jetroff does this [...]

Not quite.  Jetroff requires DIT (device independant troff) input.  There
is a `CAT2dit' utility in one of the comp.sources archives which does
translate C/A/T to dit, so in theory you could stuff it between SCO's
troff and jetroff.  In practice, the results are unacceptable.  The problem
is that troff makes it's decisions based upon font metrics on the C/A/T
typesetter, and this give very goofy looking results on a LaserJet.

> [...] I know you can use the ELAN Eroff package and get great results
>doing this.

So true.  Even still, I have chucked Elan's backend and use jetroff.  I've
got some utilities which integrate HP's Type Director fonts into jetroff,
and the results are superb.

However, given it all to do over again, I would certainly investigate
psroff and groff before plunking down $1000 for eroff.
-- 
Chip Rosenthal  512-482-8260  |  If software look-and-feel can be protected,
Unicom Systems Development    |  then I'd like to claim a copyright upon
<chip@chinacat.Unicom.COM>    |  `Memory fault - core dumped'.

mikel@taumet.com (Michael S. Lueke) (02/05/91)

chip@chinacat.Unicom.COM (Chip Rosenthal) writes:

>In article <3026@sixhub.UUCP> davidsen@sixhub.UUCP (bill davidsen) writes:
>>In article <2984@hsi86.hsi.com> rao@hsi86.hsi.com (Ananth Rao) writes:
>>| Has anyone got 'troff' to work with a laser printer, specifically the
>>| HP Laserjet III?  
>>  I think jetroff does this [...]

>Not quite.  Jetroff requires DIT (device independant troff) input.  There
>is a `CAT2dit' utility in one of the comp.sources archives which does
>translate C/A/T to dit, so in theory you could stuff it between SCO's
>troff and jetroff.  In practice, the results are unacceptable.  The problem
>is that troff makes it's decisions based upon font metrics on the C/A/T
>typesetter, and this give very goofy looking results on a LaserJet.

>> [...] I know you can use the ELAN Eroff package and get great results
>>doing this.

I went through all this mess about 6 months ago.  The best solution, and
cheapest, was to purchase a package called "Leverage Programmable
Publishing System" from Urban Applied Science.  It includes a ditroff with
commonly used macros, a jetroff which is already ported to Xenix and some
interesting graphs you can make - which I don't use.  It costs about
$250 and it works just fine.  I don't have to think about it. However,
I'm not sure if the jetroff has been upgraded to include the Laserjet III
features.  You can reach them at:

	{attmail,uunet}!urban!sales
	(201) 242-7230

I'm also not sure what the current price is for Xenix.
	
-- 
	Michael S. Lueke
	TauMetric Corporation, San Diego
	mikel@taumet.com