On Apr 04 21:03:11, Girish Venkatachalam wrote:
> On Wed, Apr 4, 2012 at 8:58 PM, Jan Stary <[email protected]> wrote:
> >> I try this against a HP Professional m1213ncj printer and it does nothing.
> >
> > Before using the script, try to get it printing with just lpr.
> >
>
> Failed. It is silent.
What failed? How does your /etc/printcap describe the printer?
> nmap reports port as open,
So the printer runs a lpd daemon that listens on 515/tcp?
>if I disable LPD script does not work,
Forget the script for now. Before you get it to print via lpr/lpd,
you will not get it to print with Net::LPD.
> so LPD seems sane but it refuses to respond.
What LPD, the printer's LPD daemon?
How do you talk to it that you know it refuses to respond?
> I did an nmap scan. Those are the only ports. It does listen on LPD. 515.
Good. It runs a lpd daemon. There must be a way to talk to it.
> >> I find this ppd in hpijs package but the printer is on the network.
> >
> > I must be missign something here: cannot PPD files be used
> > with remote printers just as with local printers, via foomatic-filters?
>
> You are not missing anything here. I want a config an /etc/printcap
> that can print to this fellow remotely. ;)
This is your problem. Not that your homegrown Perl script doesn't work.
Why didn't you say so?
If it speaks postcript (glancing at the specs it might),
you set it up just like any other remote printer
and send postcript files to it.
If it doesn't speak postscript, you might need to
preprocces the printing jobs using the PPD file,
using something like
HP:\
:lp=:rm=a.dd.re.ss:rp=name:\
:af=/etc/foomatic/file.ppd:\
:if=/usr/local/bin/foomatic-rip:\
:sd=/var/spool/output:\
:lf=/var/log/lpd-errs:\
:sh: