|
|
|
|
| Sending print jobs from Unix/Linux to a HP JetDirect print server |
|
Problem: How to let Unix/Linux processes send print jobs to a networked HP printer? Setting up printcap and spooling is near impossible without running X on the server.
|
Solution:Newer JetDirect adapters supports FTP printing, simply upload the file you want to print.
Alternatively, send the print jobs directly to the printer via the LPR/BSD protocol on port TCP/515. This ancient protocol is supported even by the oldest JetDirect cards and can be used in several different ways.
1. Use LPRng (by far the simplest approach)
" cat printme.txt | lpr -h @192.168.1.2"
2. If you are using Perl, download and install Net::Printer from www.CPAN.org
3. Write your own TCP client that speaks LPR/BSD (The protocol is very very simple)
More information can be found in this excellent tutorial on printing and network print spoolers:
http://www.lprng.org/LISA98.ppt
|
|
|
|
|
|
This is free technical advice without any warranties.
Use at your own risk. Solutions offered may not apply to your particular problem at all.
Opinions and views expressed in the articles are the authors' personal
and may not necessarily reflect or coincide with those of Ano-Tech Computers.
We take no responsibility if anything bad happens from following any of
the intructions given. If you don't understand and accept this, please
contact us for personal assistance instead.
To read our full disclaimer, go
here.
We welcome anyone who is willing to contribute to this public knowledge base,
contact siteadmin@atc.no
if you have information you would like to share. The idea is not to replace
the commercial support sites, but to publish those hard-to-find
solutions you've found yourself looking for over and over again.
Show all articles