Subject: Re: Printing not working with lpd, but fine to device
To: None <netbsd-help@netbsd.org>
From: None <dchapman@canwest.victoria.bc.ca>
List: netbsd-help
Date: 01/09/2001 11:40:04
* Bjoern Labitzke <hermit@hermit.home.cs.tu-berlin.de> [010109 04:01]:
> * dchapman@canwest.victoria.bc.ca (dchapman@canwest.victoria.bc.ca) Mon, Jan 08, 2001 at 08:25:30PM -0800:
> Just a blind guess: Could you try
> 
> gs -sModel=escp2-800 -sDEVICE=stp -sOutputFile=/dev/lpt0 xxx.ps
> 
> Instead of /dev/lpt0 use whatever device you want to print to. And
> make sure, that you have write permission for that device. I got funny
> error messages like you did when that device wasn't writable by me.
> 
Thanks.  This worked, although the print quality wasn't that great even
after adding -r720.

It doesn't work with the Postscript filter I'm trying to build.  The
relevant entery in /etc/printcap is:

# Ghostscript
ps|Ghostscript driver:\
	:lp=/dev/lpt0:\
	:sd=/var/spool/output/lpd:\
	:lf=/var/log/lpd-errs:\
	:mx#0:sh:if=/usr/local/libexec/lpfilter-ps:

and /usr/local/libexec/lpfilter.ps:

#!/bin/sh
#Treat LF as CR+LF
printf "\033&k2G" || exit 2
# Print the postscript file
/usr/pkg/bin/gs -dSAFER -dBATCH -dQUIET -dNOPAUSE -q -sDEVICE=stp \
-sModel=escp2-800 -dDensity=0.8 -r720 \
-dImageType=3  -sOutputFile=/dev/lpt0 -sPAPERSIZE=a4 - && exit 0
exit 2

When I print to lpr -h -P ps nothing happens.

The pursuit continues..... any ideas?

-- 
Dave Chapman                       |    "tar is not a plaything"
dchapman@canwest.victoria.bc.ca    |    bsimpson@dt.springfield.edu