Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jul 2011 15:54:05 -0500
From:      Antonio Olivares <olivares14031@gmail.com>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: printing to a HP Deskjet 812C printer
Message-ID:  <CAJ5UdcPL6XirL33L=tc9HEmOvUAkzoT15vWpKi2y7yHk6CQ_4g@mail.gmail.com>
In-Reply-To: <CAJ5UdcM-BbvZHdMLsNH0xckFhgL8z-PfcyB_Q-eTnrfhjYHtUg@mail.gmail.com>
References:  <CAJ5UdcM-BbvZHdMLsNH0xckFhgL8z-PfcyB_Q-eTnrfhjYHtUg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 27, 2011 at 2:51 PM, Antonio Olivares
<olivares14031@gmail.com> wrote:
> Dear folks,
>
> I have a working installation 8.2 Release AMD64 and I am trying to
> follow a printing howto :
>
> http://www.wonkity.com/~wblock/docs/html/lpdprinting.html
>
> I am copying the settings and I can't print.
>
> quadcore# lpq -a
> lp:
> Warning: no daemon present
> Rank =A0 Owner =A0 =A0 =A0Job =A0Files =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Total Size
> 1st =A0 =A0root =A0 =A0 =A0 0 =A0 =A0(standard input) =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A017 bytes
> 2nd =A0 =A0root =A0 =A0 =A0 1 =A0 =A0(standard input) =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A089 bytes
>
> quadcore# lpd
> chkprintcap: Warning: blanks after trailing '\', at line 62 (entry lp)
> chkprintcap: Warning: values-line after line with NO trailing '\', at lin=
e 63
> chkprintcap: =A0 =A02 warnings from skimming /etc/printcap
>
> quadcore# cat /etc/printcap
> # =A0 =A0 =A0 @(#)printcap =A0 =A05.3 (Berkeley) 6/30/90
> # $FreeBSD: src/etc/printcap,v 1.14.30.1.6.1 2010/12/21 17:09:25 kensmith=
 Exp $
>
> #
> # This enables a simple local "raw" printer, hooked up to the first
> # parallel port. =A0No kind of filtering is done, so everything you pass
> # to the "lpr" command will be printed unmodified.
> #
> # Remember, for further print queues you're going to add, you have
> # to choose different spool directories (the "sd" capability below),
> # otherwise you will greatly confuse lpd.
> #
> # For some advanced printing, have a look at the "apsfilter" package.
> # It plugs into the lpd system, allowing you to print a variety of
> # different file types by converting everything to PostScript(tm)
> # format. =A0For more information about apsfilter visit
> #
> # =A0 =A0 =A0 =A0 =A0 =A0http://www.apsfilter.org/
> #
> # If you don't have a PostScript(tm) printer, don't panic, but do
> # also install the latest "ghostscript" package for best printer support.
> #
> # Do also refer to the "printing" section of the handbook.
> #
> # =A0 =A0 =A0 http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/p=
rinting.html
> #
> # A local copy can be found under
> #
> # =A0 =A0 =A0 /usr/share/doc/handbook/handbook.{html,latin1}.
> #
> # Banner pages are now suppressed by default. =A0Remove the :sh: capabili=
ty
> # to turn them back on.
> #
> #lp|local line printer:\
> # =A0 =A0 =A0 :sh:\
> # =A0 =A0 =A0 :lp=3D/dev/lpt0:sd=3D/var/spool/output/lpd:lf=3D/var/log/lp=
d-errs:
> #
> # Sample remote printer. =A0The physical printer is on machine "lphost".
> # You can perform any kind of local filtering directly. =A0If you need
> # local filters (e.g. LF -> CR-LF conversion for HP printers), create
> # a filter script that sends the proper escape sequence to the printer
> # and then concatenates stdin to stdout.
> #
> #remote|sample remote printer:\
> # =A0 =A0 =A0 :sh:\
> # =A0 =A0 =A0 :rm=3Dlphost:sd=3D/var/spool/output/lphost:lf=3D/var/log/lp=
d-errs:\
> # =A0 =A0 =A0 :if=3D/usr/local/libexec/if-script:
> #
> # Simple Russian printer with hardware CP866 character set, output filter
> # used for KOI8-R -> CP866 conversion
> #
> #lp|Russian local line printer:\
> # =A0 =A0 =A0 :sh:of=3D/usr/libexec/lpr/ru/koi2alt:\
> # =A0 =A0 =A0 :lp=3D/dev/lpt0:sd=3D/var/spool/output/lpd:lf=3D/var/log/lp=
d-errs:
>
> # add for HP Deskjet 812C
> lp:\
> =A0 =A0 =A0 =A0:lp=3D/dev/ulpt0:\
> =A0 =A0 =A0 =A0:sh:\
> =A0 =A0 =A0 =A0:mx#0:\
> =A0 =A0 =A0 =A0:sd=3D/var/spool/lpd/lp:\
> =A0 =A0 =A0 =A0:if=3D/usr/local/libexec/psif:\
> =A0 =A0 =A0 =A0:lf=3D/var/log/lpd-errs:
>
> quadcore# cat /usr/local/libexec/ps2pcl
> #!/bin/sh
> /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=3Ddeskjet -sOUTFILE=3D- -
>
> quadcore# ls -l /usr/local/libexec/ps2pcl
> -rwxr-xr-x =A01 root =A0wheel =A081 Jul 27 14:18 /usr/local/libexec/ps2pc=
l
> quadcore# cat /usr/local/libexec/psif
> #!/bin/sh
> IFS=3D"" read -r first_line
> first_two_chars=3D`expr "$first_line" : '\(..\)'`
>
> case "first_two_chars" in
> %!|\033%%)
> =A0 =A0 =A0 =A0# %! or ESC% : Postscript job, print it.
> =A0 =A0 =A0 =A0echo "$first_line" && cat && printf "\004" && exit 0
> =A0 =A0 =A0 =A0exit 2
> =A0 =A0 =A0 =A0;;
> *)
> =A0 =A0 =A0 =A0# otherwise, format with enscript
> =A0 =A0 =A0 =A0( echo "$first_line"; cat ) \
> =A0 =A0 =A0 =A0 | /usr/local/bin/enscript -o - && printf "\004" && exit 0
> =A0 =A0 =A0 =A0exit 2
> =A0 =A0 =A0 =A0;;
> esac
>
> quadcore# ls -l /usr/local/libexec/psif
> -rwxr-xr-x =A01 root =A0wheel =A0378 Jul 27 14:26 /usr/local/libexec/psif
>
> I modified the -sDEVICE to =A0-sDEVICE=3Ddeskjet =A0since the machine is =
an
> Desjet. =A0The printer is on a USB and it is connected. =A0I have tried t=
o
> change
>
> /dev/ulpt0 and /dev/unlpt0 and still get the same thing. =A0Any
> pointers/advice/hints?
>
> Thanks in Advance,
>
> Antonio
>

I have found a page in OpenPrinting:

http://www.openprinting.org/printer/HP/HP-DeskJet_812C

But the device /dev/ulpt0 and/or /dev/unlpt0 are not found :(

quadcore# ls /dev/ulpt0
ls: /dev/ulpt0: No such file or directory
quadcore# ls /dev/unlpt0
ls: /dev/unlpt0: No such file or directory

I need to add them somewhere in /etc/rc.conf, or in /boot/loader.conf ?

Thanks,

Antonio



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ5UdcPL6XirL33L=tc9HEmOvUAkzoT15vWpKi2y7yHk6CQ_4g>