Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to print from web application to receipt printer?

I was asked by my client to print receipts on an Epson TM U220 (http://pos.epson.com/products/TM-U220.htm) from my web application. I have no idea how to do that. Are there any java applets or something else that I can use for printing? Should i use JasperReports? (Does JasperReports help to cope with this problem?) If there are flash apps that could be used, I have no objection to using that.

I am using Grails for my web apps.

like image 908
nightingale2k1 Avatar asked Feb 03 '10 14:02

nightingale2k1


People also ask

How do I print from Web application?

Web applications can print to local printers installed on your device using the browser print function which is accessible by pressing the Ctrl+P keys. Without using the browser's print function, web application cannot access printers on your device.


1 Answers

You don't need an applet, from a grails controller you may use any Java library. Use the Java printing services available to the runtime in javax.print. This is assuming that the printer is installed where the grails runtime is running.

like image 145
Cesar Avatar answered Sep 20 '22 01:09

Cesar