Operating System - HP-UX
1827332 Members
6200 Online
109963 Solutions
New Discussion

Direct print to a port on a server

 
SOLVED
Go to solution
Terrence
Regular Advisor

Direct print to a port on a server

I need to send printed output to a server rather than a print queue and a particular port # on that server (10001). Anyone know the command?

I've tried lp -d combinations but nothing seems to work. The -p command on addqueue isn't really the same port type

Here is the request I received from the vendor and of course they only know how to do this on windows. Don't you love vendors?

"What I need is a printer setup for this that points to the IP Address of the fax server and a port (i.e. 10001)."
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Direct print to a port on a server

I would say the first thing to do is a command which bypasses all of lp.

cat myfile | /opt/hpnpl/bin/hpnpf -p 10001 -x remote_host (or IP address). If that works then add a network printer and then modify the hpnpf call within the interface to match your working combination.

Another tool which will do just what you want (and can be substitiuted for hpnpf in the lp interface file) is netcat.
http://gatekeep.cs.utah.edu/hppd/hpux/Networking/Admin/netcat-1.1.0/

It would help if your vendor can at least tell you if they are using tcp or udp protocols. (Probably tcp but I didn't write this). It would also be trivially easy to do this in Perl using the IO::Socket module.



If it ain't broke, I can fix that.
Terrence
Regular Advisor

Re: Direct print to a port on a server

Thanks for the reply. I don't know if your answer will work because no one is around to test so I'll just assign points under the assumption that you're usually correct.