tags:

views:

120

answers:

1

Want to send text to a network receipt printer using ruby. I know the IP address of the printer. The printer is accessible through the network, but it is not directly connected to the computer.

I'm using a Star TSP100LAN, but I'm sure it would be using the same protocol as other receipt printers.

+1  A: 

almost all printers do speak PJL, the Printer Job Language. a simple TCP connection to printer IP should be sufficient. i don't know which port to use, but the PJL command set is well defined here(PDF).

Adrien Plisson
Adrien, thanks for your answer, unfortunately my printer does not support PJL.It supports CUPS system "lpr -P printer_name receipt.pdf"But I want to be able to pass text directly to the printer rather than creating a PDF.
Richard Millan