[techtalk] printing images

Robert Kiesling kiesling at mainmatter.com
Thu Mar 2 22:27:19 EST 2000


>  I tried to add a filter directly to the printcap (if) and the printer
> stopped working altogether; when I then looked at the Printool, it seemed
> to indicate the presence of _two_ printers: the original one (no filter)
> and an "identified" one (filter). I would certainly prefer to communicate
> with the 'puter directly, rather than graphically, but I will use whatever
> works.
> 
> I am happy to try _any_ filter at this point, ghostscript and gcc both
> seem to be working fine. Suggestions for what to try next would be much
> appreciated.

I couldn't say without looking at the printcap entry.  If Printtool
defined another printer that uses gs, then you would need to specify
it on the command line, if it's the non-default (virtual) printer:
"lp -Ppostscript image.ps."  There's an environment variable 
that you can set to tell lpd which one is the default printer.  

If printing plain text works (worked) all right, and gs seems to 
be installed correctly, then it's in the printcap entry where 
the problem lies.  As a test, I would try using gs on a file 
on the command line to translate the file, then dumping it 
directly to the printer, something like this:

# gs -sDEVICE=deskjet -dNOPAUSE -sOutputfile=graphic.hpl \
> graphic.ps -quit
# cat graphic.hpl >/dev/lp1

Then you could substitute the stdin and stdout, according to
my printcap manual page:


if="/usr/local/bin/gs -sDEVICE=deskjet -dNOPAUSE -sOutputFile=- - quit"

The difference between using if and of is that if is executed for
each print job, so it's probably better to use.  

If you need only a standard filter, then APSfilter, as I said, 
works great.  It has the advantage of determining the correct
filter for each file type automatically, which you can do with
the "file" command.  

Hope this helps!

Bob

-- 

<a href="coffee://localhost/cream/">stop</a>   http://www.mainmatter.com/

************
techtalk at linuxchix.org   http://www.linuxchix.org




More information about the Techtalk mailing list