From owner-freebsd-questions Sun Jun 17 6:16:19 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id 1D68037B409 for ; Sun, 17 Jun 2001 06:15:58 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 6476 invoked by uid 100); 17 Jun 2001 13:15:57 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15148.44428.854605.20679@guru.mired.org> Date: Sun, 17 Jun 2001 08:15:56 -0500 To: pjklist@ekahuna.com Cc: questions@FreeBSD.ORG Subject: Re: Better printing from the command-line In-Reply-To: <3B2C4533.11707.8C0F84@localhost> References: <6147922@toto.iv> <3B2C4533.11707.8C0F84@localhost> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Philip J. Koenig 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. 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