|
-
Mar 17th, 2005, 03:27 PM
#1
Thread Starter
Lively Member
text to printer
Hi all ,
can anyone show their insight how to send . txt file to a printer that got an IP adddress
-
Mar 17th, 2005, 03:54 PM
#2
Re: text to printer
Do you mean that it is attached to a different computer, or does it have a print server box connected to the lan? For my printer, I select it from my computer (I have a wireless laptop and print to the desktop printer) the computer (by ip address) and then the printer name. Then, I can print directly to it from VB.
VB Code:
Printer.Print "This is some text"
Printer.EndDoc
-
Mar 17th, 2005, 03:56 PM
#3
Re: text to printer
The easiest way would be to install it's printer driver and use it like any other Windows printer. The more complicated way would be to implement an LPR system through Winsock TCP. You can find the protocol specification here:
http://www.brooksnet.com/faq/rfc1179.html
Last edited by Comintern; Mar 17th, 2005 at 03:57 PM.
Reason: Fix typo
-
Mar 17th, 2005, 04:16 PM
#4
Thread Starter
Lively Member
Re: text to printer
the one iam working are wrapper printers ... iam trying to network the printers ( printer 1 thru printer 5 and has got IP addresses associated with each one of them)and send customized text file which had got message data and text. iam trying to develop a VB code.. can anyone tell me the best way of doing this. If yes in VB ,, can anyone post sample code.
thanks in advance
-
Mar 17th, 2005, 05:02 PM
#5
Re: text to printer
It's possible, but is definately not a trivial task. The easy part is using a Winsock control to connect to the printer via TCP. The hard part is figuring out how to format the output. If the printers are post-script printers, that might not be too hard. Just create a local printer that prints to PS files (HP driver would be a good bet.) and grab the output file. Then write it to the socket that you've opened along with the appropriate control codes from the LPR specification. If you aren't comfortable with doing your own raw socket writes, I'd try to find appropriate printer drivers to use and let Windows do the work. You could also look into using IPP or print through HTTP if you will be using IIS. This page has more infomation:
http://www.microsoft.com/technet/pro.../contchov.mspx
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|