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

Re: Still can't Print



*is* it on lpt0 in the first place?

Can the printer take PLAIN TEXT and print it?
(eg: printf "foo\nbar\n^L\n" >/dev/lpt0    should print out some lines and emit
(that ^L is CONTROL L  aka formfeed)).

If the basics don't work, then all the fluff you put in front of it
won't help.

Quoting dla (dla_(_at_)_comhem_(_dot_)_se):
> >Is anyone out there printing with OpenBSD?  Please tell me how you're 
> >doing it.
> 
> hello, atleast this works on my hp deskjet 5655 using /usr/ports/*/ghostscript.
> 
> /etc/printcap
> 
> lp|local line printer:\
> 	:sh:lp=/dev/lpt0:sd=/var/spool/output:lf=/var/log/lpd-errs:\
> :if=/usr/libexec/printer.sh:
> 
> And my /usr/libexec/printer.sh taken from freebsd handbook
> 
> #!/bin/sh
> 
> printf "\033&k2G" || exit 2
> 
> read line
> 
> post_script=$(expr "$line" : '\(..\)')
> 
> if [ "$post_script" = "%!" ]; then
> 
> 	exec 3>&1 1>&2
> 
> 	/usr/local/bin/gs -dSAFER -DNOPAUSE -q -sDEVICE=cdjcolor -sPAPERSIZE=a4 -sOutputFile=/dev/fd/3 -  && exit 0
> 
> 	/usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=cdjcolor -sPAPERSIZE=a4 -sOutputFile=- - && exit 0
> 
> else
> 
> echo $line && cat && printf "\f" && exit 0
> fi
> 
> exit 34