[net.unix-wizards] print filter

jgw1@ihuxi.UUCP (J. Whelan) (01/03/85)

Does anyone have a filter that can deal with a printer that doesn't support
backspacing?  This would be used to print "bold" characters from nroff.
Any help would be appreciated.  Thanks in advance.

	ihnp4!ihuxi!jgw1

david@infopro.UUCP (Buckaroo Banzai) (01/04/85)

The original poster wanted a print program that could support printers
without backspacing, for use with nroff output. Simply define the
appropriate control characters in termcap (i.e. so and se strings for
standout (bold) start and end, and us/ue for underscore start/end),
then use ul as your filter, as in:

	nroff file | ul -Tprinter > /dev/print_device

Not all implementations of ul support both us/ue and so/se at once,
but you should be able to get at least one to work.
If this still isn't clear, I will post an example on request. If you
don't have ul, of course, you are out of luck or must write an
equivalent. You can also write a translation filter that processes the
output of col from the strings intended for a Diablo to the ones
needed for your printer; I also have a program of that nature if you wish.
Hope this helps.
-- 
          Dave Fiedler
{harpo,astrovax,whuxcc,clyde}!infopro!dave
USMail: InfoPro Systems, 3108 Route 10, Denville, NJ 07834
People Phone: (201) 989-0570

Doug Gwyn (VLD/VMB) <gwyn@Brl-Vld.ARPA> (01/04/85)

What you need is an "overstrike" filter, assuming the non-backspacing
printer can do a carriage-return without also advancing the line.
John Quarterman did one of these and I adapted it for distribution
as part of the Multiple-Device Queueing System (MDQS) distributed by
Doug Kingston <dpk@brl-tgr.ARPA>.

willcox@ccvaxa.UUCP (01/04/85)

I believe such a beast comes with 4.2BSD.  On our system it lives in
/usr/lib/lpf.  Don't expect any documentation for it, however.  We
use it by putting "if=/usr/lib/lpf" in our /etc/printcap file.

Barry Gold <lcc.barry@UCLA-LOCUS.ARPA> (01/07/85)

The Fortune Systems 32:16 has a really neat way of handling printers.  There is
a printcap file, analogous to termcap, which is used by the lp daemon.
This makes it easy to adapt a wide variety of printers for use with their
system.  (A good idea with a supermicro that's likely to be used with anything
from decwriters to expensive NEC and Diablo printers or even multi-font, high-
resolution dot matrix printers.)

Unfortunately, only their word processing software (Fortune:Word) actually
makes use of printcap.  I haven't found any way to make other things (like
nroff) make use of it.  I've been considering an nroff-output to Fortune:Word
filter for some time.  Also nroff input (mm/ms) to/from F:W.

Real soon now...

Meanwhile it would be nice if Fortune Systems made the various parts of their
system work together.  I've got this *really nice* home computer that's
rapidly becoming obsolete as things like the PC/AT come out with more advanced
unix systems.

barry gold
lcc.barry@ucla-cs
ucbvax!ucla-cs!lcc!barry