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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stream ASCII data to print

Status
Not open for further replies.

aballant

Programmer
Jan 31, 2002
46
US
Hi,

I have a TCP client which sends ASCII data. If I configure the client to send the data to the port of the printer (lpd) then it will just spit it out? Correct?

cheers,
Andrew


cheers,
Andrew
 
No, LPD is a protocol that requires a series of messages to be passed between the LPR (the client) and the LPD (the server) to facilitate the printing task. Just sending raw ASCII text will not achieve much at all (apart from confusing the heck out of the printer).
 
Hi,

Many Thanks. Is there any simple way to stream data to a printer then? Any suggestions?

cheers,
Andrew

cheers,
Andrew
 
If you are talking about a LPD style printer across the network then the answer is no, you would have to interpose some form of lpr client software (either in your code or as a daemon) to handle the lpr/lpd protocols.

If you are talking to a local printer you might be able to bypass the OS spooler (depending on the OS) and talk direct to the parallel port but the printer would have to be capable of accepting plain text (ie not PCL or Postscript).

In this latter case obviously the printer would have to be dedicated to your application.
 
Hi,

I see what you mean. I will create my TCP server in Perl which will issue lpr requests on files,

This should be the simplest option,

Thanks,


cheers,
Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top