Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Feb 2002 13:14:13 -0600
From:      "Mike Meyer" <mwm-dated-1014146053.7891fc@mired.org>
To:        Kirk <kirkrw@mediaone.net>
Cc:        questions@freebsd.org
Subject:   Re: printer woes
Message-ID:  <15468.3205.343042.817770@guru.mired.org>
In-Reply-To: <2750594@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
Kirk <kirkrw@mediaone.net> types:
> I am trying to get a NEC 870 printer working through apsfilter. Does anyone 
> know how I should configure my printcap file? 

No, not without telling us what you're trying to do with it.

> 	:sh:\
> lp|superscript870:\
> 	:sh:\
> 	:ml#0:\
> 	:mx#0:\
> 	:sd=/var/spool/output/lpd:\
> 	:lp=/dev/lpt0:\
> 	:lf=/var/log/lpd-errs:\
> 	:if=/usr/local/libexec/gimp-print:\	
> 	
> Specifically should I get rid of the gimp-print filter line at the end (or is 
> that needed?).  I am still stuck with the stair step problem when I lptest to 
> lpt0

I have *no* idea what gimp-print does, and have never seen it used
before. The :sh:\ at the top is certainly wrong.

There are basically four ways to do things using lpd, depending on
whether your printer is a WinPrinter or not, and depending on whether
you want a traditional Unix printer setup where you create files of
the proper type to send to the printer, or an intelligent setup where
the printer subsystem tries to figure out how to generate text to send
to the printer.

If your printer is a WinPrinter, you have one entry for the
printer. It eithere uses an if that runs ghostscript so that it reads
standard input and writes bits for your printer to standard output, or
it uses an if that runs an intelligent filter that will figure out how
to generate postscript for your input, then run that through
ghostscript as above. The first form is the traditional Unix method,
and you have to generate the postscript by hand; the second form is
the intelligent front end.

If your printer isn't a WinPrinter, then you may want two entries. One
will be the entry as described above, for handling postscript
files. The other - if you need it - will look like the first one,
except the spool directory and printer names will be different.  It
will also use an if entry that converts newlines to the
newline-linefeed pair expected by DOS printers. See the Handbook
printer setup troubleshooting section on the "stairstep" problem for
information about that.

If you're using the traditional Unix approach, you'll need a second
entry as above. If you're using an intelligent filter, it will do
something with text files to print them.

The two intelligent filters I've looked at are apsfilter and
magicfilter. apsfilter is the easier one to install. It walks you
through a dialog, and then adds the appropriate entry(ies) to
/etc/printcap for you. The downside is that it converts *everything*
to postscript, then runs ghostscript on that to generate the
output. It also uses a shell script to do this, so you run a lot of
processes to figure out what things are. Worse yet, it means that
printing a simple text file will cause it to send a page of graphics
to the printer, which will take a long time, and may well fail because
you've run the printer out of memory.

Magicfilter doesn't do the setup, but instead looks at your system and
installs executable files in /usr/local/libexec/magicfilter that uses
the programs it sees to handle the various types of files they read
for the printers it knows about. That list is unfortunately dated, and
you have to create the termcap entry by hand. The upside is that it
has the text filter built in, so printing a text file will just send
the text to the printer if the printer can handle it. It can also
handle various file types that apsfilter can't, like PCL and PJL
files. Finally, magicfilter itself is a C program that uses reads the
executables in /usr/local/libexec/magicfilter as scripts, so the
system overhead for using it is much lower.

My, I'm feeling wordy today.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15468.3205.343042.817770>