Hello

When I try to print a page test with hplip and cups, I get : filter failed.

When I try  to prind with openbsd lpd and hplip, I get from lpd-err :

On 09/05/2023 19:16, Jon Fineman wrote:h x1.lacomte.net /etc/foomatic/HP-LaserJet_P1005.ppd
/usr/local/bin/foo2zjs-wrapper: -w: unknown option
May 12 15:13:33 x1 lpd[50502]: restarting lp

cups also says: it needs a proprietary driver. That is why I look for foo2zjs. But it does not downlad a ppd file and I don't know what to do next.

bye
I have a HP Office Jet 6970 (ink jet) and all I did was install cups
and hplip (which is in ports).

To get lpr to work without cups is a little more adventurous. The
three scripts below should get you started. They depend on unix2dos (I
forget which tools bundle this is from) and gs (which is in
ghostscript). Printing just PS is pretty straight forward. However you
should be aware that firefox and friends are hard coded to use a cups
defined printer. At least I haven't figured out how to fool their
print dialog box. Follow the man pages for setting up lpd.


You need to create an /etc/printcap entry similar to to:
lp|hp_prt:\
         :lp=9100@hp_prt:\
         :sh:\
         :mx#0:\
         :sd=/var/spool/lpd/hp_prt:\
         :if=/usr/local/libexec/f_smart:\
         :lf=/var/log/lpd-errs:

And f_smart is:
#!/bin/sh
#
#  sfif - Print PDF or PostScript or plain text on a PCL printer
#
IFS="" read -r first_line
first_two_chars=`expr "$first_line" : '\(..\)'`

case "$first_two_chars" in
%!|\033%%|%P)
     # %! or ESC% or %P : PostScript or ? or PDF job, convert it to PCL.
     ( echo "$first_line" ; cat ) | /usr/local/libexec/f_ps2pcl && exit 0
     exit 2
     ;;
*)
     # otherwise just print it followed by a form feed to eject page
     ( echo "$first_line" ; cat ) | \
     /usr/local/bin/unix2dos && printf "\f" && exit 0
     exit 2
     ;;
esac

And f_ps2pcl:
#!/bin/sh
/usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=ljet4 -sOutputFile=- -




BESSOT Jean-Michel <jean-michel.bes...@lacomte.net> writes:

Hello

I have a hp P1005 ( I know hp) and I try to install it on opennbsd. So I
installed cups and foo2zjs but foo2zjs download an img file and I don't
know what to do with it. There is no mention of img file in the INSTALL
file.

What do I need to do to make the printer work with the openbsd lpr or cups ?

Bye

Reply via email to