Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Jun 2001 08:15:56 -0500
From:      Mike Meyer <mwm@mired.org>
To:        pjklist@ekahuna.com
Cc:        questions@FreeBSD.ORG
Subject:   Re: Better printing from the command-line
Message-ID:  <15148.44428.854605.20679@guru.mired.org>
In-Reply-To: <3B2C4533.11707.8C0F84@localhost>
References:  <6147922@toto.iv> <3B2C4533.11707.8C0F84@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
Philip J. Koenig <pjklist@ekahuna.com> types:
> Thanks.  I'm going to read Ted's writeup on printing and see
> what I can glean from that first.  I think what I need really
> is just to have a simple way to send some PCL commands to the
> printer before/after print jobs.  I would prefer something with
> a rudimentary menu for common things (ie set pitch, set lines per
> inch, margins) but I suppose I can make do with something more 
> manual.

Reading Ted's writeup is probably a good idea. I haven't had a need
for it, so haven't read it. Do let us know if you find anything.

What I'm contemplating doing to magicfilter is using the lpr "class"
option to indicate that something magic should be done. Mostly, I want
it to drive the duplexer attached to my lj5m, but the same hooks could
be used for a lot of other things. That way, I could do something like
"lpr -C duplex filename" or "lpr -C simplex filename"; you could then
do "lpr -C pitch10 filename" or "lpr -C pitch12 filename" - all
assuming the appropriate configuration had been done.

The real catch is that different things should be done for different
types of jobs. Trying to make that work in a manner as flexible as
magicfilter's basic implementation isn't being easy.

> (This is all like Deja-Vu from the bad 'ol days printing from DOS 
> programs to laser printers, but even worse because even in those days 
> there were printer control programs and most popular applications 
> understood the various printer options so you didn't usually have to 
> muck around with PCL commands.)  

There's a reason for that.  Windows provides an API for printer
drivers so that applications don't have to know anything about the
printer, which is good. DOS didn't do that, so the applications had to
know about all each printer in order to be able to use that
printer. This is why a lot of printer emulated other printers - so you
had some chance that any given application would be able to use the
printer, if not use all of its capabilities. Unix is like DOS in that
it doesn't provide an interface, so applications have to know how to
talk to the printer. But most applications assume the printer is a
postscript printer, and the printer spooler doesn't do much beyond
pass bytes to the printer.

The only exception I've seen to this was Ultrix, which had an lpr
command with all kinds of options for talking to printers - but it
only worked with DEC's printers.

	<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?15148.44428.854605.20679>