[ale] Setting up pseudo-printer
John Mills
johnmills at speakeasy.net
Fri Jan 16 22:15:58 EST 2004
Dow -
Thanks very much for your note and suggestions.
On Fri, 16 Jan 2004, Dow Hurst wrote:
[...]
> However, even the lp system can use filters, so a little
> searching might find a HOWTO on setting a filter that would
> do what you want. The Netpbm library is a powerful package
> for converting image files. I looked at a tiff2ps package
> that looked very nice. I don't have the link for that with me.
> Am I understanding the question correctly? Which is that
> you want to print an image? Gimp will print images
> fantastically after you set it up for your printer.
I guess my question was too indirect or not well put. I have a short
script that decodes a text-encoded image file (typically a JPEG) and pipes
it to 'display' which puts it on my screen. I could use any utility that
could accept an image format at <stdin>; I just happen to be using
'display'. This is exactly what I want it to do as though it were a
printer.
My question is:
How can I access this script so that 'lpr' will _use_it_ as though it
were a printer. I want to invoke 'lpr -P viewer <file>' on the text file
and just _see_ the image on the screen. No printed copy at all.
I was trying to put my script as a processing filter (a'la _ghostscript_)
with its text output (and errors) going to /dev/null, and its graphic
output going transparently to the screen. The problem must be analogous to
putting a printer filter on a stream being sent to a remote printer,
except that text output is sent to /dev/null and the image is
transparently redirected to the screen.
Any ideas?
> John Mills wrote:
> > I have a script to pipe through a decoding filter, and uses 'display' to
> > show an image on the screen. For example, I can show an image with:
> > % cat <encoded_jpeg_file> | /usr/local/bin/viewer_filter
> > I'm having some trouble setting this up as a printer, so that I could
> > invoke it with [say]:
> > % lpr -P viewer <encoded_jpeg_file>
TIA.
- John Mills
john.m.mills at alum.mit.edu
More information about the Ale
mailing list