*BSD News Article 38974


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!news.unimelb.edu.au!ucsvc.ucs.unimelb.edu.au!lugb!latcs1!wongm
Newsgroups: comp.os.386bsd.questions
Subject: Re: printcap filters
Message-ID: <D0DG9L.F35@latcs1.lat.oz.au>
From: wongm@latcs1.lat.oz.au (M.C. Wong)
Date: Tue, 6 Dec 1994 04:24:56 GMT
References: <RICK.94Nov24045024@vox.trystero.com>
Organization: Comp Sci, La Trobe Uni, Australia
Lines: 67

In article <RICK.94Nov24045024@vox.trystero.com> rick@vox.trystero.com (Richard E. Nickle) writes:
>
>Hi,
>
>Well, this might be an FAQ, or at least a previously asked
>question.
>
>I tried to install a fake printer that filters postscript
>through the ghostscript program before putting it out to
>the device (in this case, a remote printer running on a
>non-Unix system).
>
>What I tried is various iterations of setting the 'if'
>(and later 'of') variable in /etc/printcap.  
>
>When the printjob is spooled, however, it is never passed
>to the filter program.  I even went so far as to have the
>filter program emit some text to a seperate logfile to at
>least verify if it was ever called.
>
>A cursory search of the sources turned up no references
>to anything that looks like a run of the 'if' or 'of' strings
>running the of or if' program specified in printcap.
>
>I also did a string search for strings looking like a 
>call to a filter (fil, if, of, etc) and turned up nothing.
>
>Anybody solve this problem before?  
>
>
>
>--
>--
>"When personal freedom's being abused, you have to move to limit it."
>
>- President Bill Clinton (sworn defender of the Constitution)
>  3-22-94, MTV's "Enough is Enough" 
>
>Richard Nickle                      http://www.trystero.com/rick.html

While I haven't got the soluation s to your problem, I did have the similar
unsuccessful experience of using filter for printing non-ASCII file. BTW,
I am using apsfilter-1.11 as the input filter. Hen I said :

lpr -v file.ps

the spawned lpd coredumped, and lpq will say no daemon present! lpd.core can be
found in the spool directory for the printer used (default lp). However, I guess
it's wrong to say lpd is not using if in printcap, since when printing ASCII
file, it is OK, and I know apsfilter does gets invoked because I uncomment
set -x to get it emit verbose info, and it did. But when it is dealing with
lpr -v or lpr -d (I think in general attempt to use if explicitly), lpd 
coredumps.

I guess, I can do :

lpr file.ps

and let apsfilter figures out it is a PS or DVI or etc file, as apsfilter does
detect file type. I haven't got the chance to test it yet, but I will test
it today, and if that works, I am diving into lpd codes.

-- 
- wongm@latcs1.lat.oz.au (M.C Wong)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   - Just an enthusiastic and curious learner of computing technology.