Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Network Printing

Status
Not open for further replies.

mcregal

Programmer
Apr 5, 2001
6
US
Does anybody know how to print to a network port instead of LPT1 or COM ports? We need to have the ability to print to a network printer by specifying the port. Right now we can programatically open LPT1 and spool a file to it but I tried the same thing to a network printer, it does not work. To make this simple, if the following DOS commands work, we should be set to translate it to our C++ program.

for LPT 1 these commands work:

copy <filename> LPT1
or
type <filename> > LPT1

If these commands work for a network port, instead of LPT 1, we should be set. I tried adding a network printer port using Microsoft TCP/IP Printing and use the portname instead of LPT1, but it did not work. Any help will be much appreciated.

Thanks.
 
Try installing a JetDirect Port (use JetAdmin).

Cheers,

Mark ;-)
 
Try using the /b switch when copying to the network port.

Copy /b <filename> \\myport Joe Miller
joe.miller@flotech.net
 
Yea, use the JetDirect software CD if you have it. When it ask you if you want to software to Auto-Configure for you or you manually configure it. You choose manually configuring it. Just follow the instructions and make sure you put in a valid ip!
 
I have tried /b with the command the very first time and it does not seem to make any difference. Anyway, I still have to find a jet direct CD installation (does anybody know where I can find this in the web?). Anyway, to give you guys more detail on this, this problem is for a wireless network printer talking to a 802.11b accesspoint. The printer is for a handheld printer (same as what you see in rental cars). Knowing this, do you think the jet direct will still work. I will still give it a try as soon as I get the installation for HP jet direct. If you have any more ideas, share it with me. I appreciate it.

mcregal
 
The HP site has JetDirect for download. Try that and run the program. It will indicate the HP addresses (TCPIP or Netware) on your LAN. You need to print a config page from your printer to find out the IP address, unless it's the only network printer on your LAN.
 
I'm running windows 98 and trying to get a jetdirect to run. It works ok in windows but not for dos based programs. I have tried to capture the port, but it dosn't work. I have also tried the capture by sharing out the printer, no go also. I have also tried the NET USE LPT1 \\computer1\hp4v command but it says that this is not a server.

Please help
 
Is it feasable to captuer the printer port and copy to that port?
 
I have tried to capture a printer port (to a networked printer loaded on the local machine) on a 98 box and did not have success So the workaround that I did was to share the printer on another machine and redirect the local lpt1 to the printer shared on the other machine
 
crazydave, I had the same problem until I figured out that the command was net use lpt1 \\servername\sharename. You can't use the name of the printer, you have to use the share named, (So obviously, it has to by shared). Glen A. Johnson
Microsoft Certified Professional

&quot;All things are difficult before they are easy.&quot;
Thomas Fuller (1608 - 1661) English scholar, preacher.

 
We have resolved this issue by going through a different route. We used sockets to send this information to the IP and port of the printer. It worked. Thanks for all your reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top