[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Print Screen




I've made a little progress.  I know know that I can use 'xwd' to create
an output file in the "xwd" format,  and that XV can look at,  and thus
print that format.  It works but isn't really what I want.  I want a user
to be able to click on a window and have it come rolling out of the
nearest laser printer.

I also disovered some wierd tools I have on my machine that pertain to pnm
files,  whatever they are.  Included is one that converts XWD to PNM
(called xwdtopnm),  and also one that converts PNM to Postscript (called
pnmtops).  So I string these together like:

xwd | xwdtopnm | pnmtops | lpr -P{printer_name}

and I get:

xwdtopnm: writing PPM file
pnmtops: maxval of 65535 is too large for PostScript
lpr: stdin: empty input file
Broken pipe


and no output from the printer (obviously).  Anyone have any experience
with these PNM tools, and why they don't work.  I've also tried

xwd | xwdtopnm | pnmtotiff -lzw | \
  gs -dNOPAUSE -sDEVICE=tifflzw -sOutputFile=- -  | \
  lpr -P{printer-name}

But Ghostscript dies complaining  of some arcane format error.

But I can "xwd | xwdtopnm | pnmtotiff -lzw > file.tiff", and look at
file.tiff in XV.

And I thought I was so close.  These programs come from the netpbm package
included with Redhat 4.2