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?
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).
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.