NetBSD-Users archive

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

Re: Use network printer from NetBSD



Rocky Hotas <rockyhotas%firemail.cc@localhost> writes:

> In fact, the printer is not directly connected to my NetBSD host: it
> is a stand-alone network printer, with its own LAN IP address.  I know
> the printer hostname and its IP address. How to send from NetBSD a
> print job?

The first thing to understand is what format the printer wants.  Back in
the old days, printers were postscript, and you basically had to send
them postscript.  (Or HP's PCL.)

> I tried with and without pjlfilter, and also with and without
> /usr/libexec/lpr/lpf. It makes no difference. I also tried port 515
> instead of 9100: they are surely open. Printer also supports `LDP (PC
> Fax Send)', `Raw Port', `IPP', `Mopria', `AirPrint'.

I think 9100 is what HP called "jetdirect".  I somewhat fuzzily think
that connecting to that is just like sending bytes over a serial port.

> For my attempts, after starting the lpd daemon, I simply use:
>
> $ lpr -P remote a_test_file
>
> The curious fact is that, in any of these attempts:
> - when a_test_file is a plain-text file, the printer display just lights
> up, but nothing else happens;
> - when a_test_file is a non-blank PDF, the printer seems to print, but
> the output is an endless series of white papers. I have to stop the job
> from the printer stop button.

That doesn't really surprise me if the printer expects postscript.  You
omitted the model from your email.

> Am I doing something wrong? What is the correct way to configure
> /etc/printcap in this case?

0) read enough docs/etc. to find out what the printer wants

1) Try a postscript file.

2) what you are basically trying to do is have  a printer configured,
just like it was attached, except you it isn't physically attached.  For
a 'network printer', my preferred approach is

  - put it on an Ethernet by itself, hooked up to an extra interface on
    a computer, firewalled, because printers have poor cybersecurity
    hygiene

  - configure a print server that owns the printer, perhaps cups, and
    probably use the 9100 raw port instead of a serial/usb/parallel
    port.  Cups or whatever has to do conversion from whate1ver input
    format is printed to the format understood by the printer.

  - make all access go through the daemon.  Mutliple users accessing a
    network printer at once is a bit of a mess anyway.


Home | Main Index | Thread Index | Old Index