Friday, April 24, 2009

Kiosk development - Star Micronics TSP-100 thermal printer

Thermal printers are great for printing receipts. Thermal printers requires no ink as it prints by making "burns marks" on the special thermal paper.

Star Micronics TSP-100 claims to support Linux drivers which essentially mean Red Hat variants via .rpm driver. Eg. RHEL, CentOS.

Couldn't convert the supplied .rpm file to .deb using alien but managed to find somebody who's kind enough to iron out all the dependencies and packaged a .deb

If you're using latest version of Ubuntu then it'll probably work out of the box.

To print receipts from your webapp, issue system commands directly from your controller.

Eg. using Rails

def print_receipt
system "lpr -P printer_name receipt.pdf

"lpr" is unix print command that will send print jobs to cups daemon. Better still, set the thermal printer as default printer then

system "lpr receipt.pdf"

To view print jobs on Ubuntu, either view from "System" > "Administation" > "Printing" or in browser "http://localhost:631"

To cancel all print jobs in terminal

cancel -a

1 comment:

crawler said...

Hi! Can i have example pdf file that you send to tcp100? I have same task, but do not have that printer in my hands. Thank you!

My email: