i’m about to start writing the POS application in Vaadin(switch from Windows/.NET/C# on demand,and replacing old app in around 300+ locations) but the issue that bugs me is: is there a way to print to POS printer from client? I see there is PrintService addon for Vaadin,but i think it is not applicable for this kind of printing.
So, Is there a way to do it?
Has anyone even tried something similar?
For a small stores with only one PC(point of sale) i’ve been thinking on combination with JavaPOS,but it would be silly to use that approach in stores with multiple PC-s and setting the Tomcat on every PC,or is it?
basically the same rules apply to Vaadin applications in terms of printing as apply to any webbased applications. You can either generate a PDF and print that (using e.g. iText) or just print a webpage. The challenge there usually is that you don’t want to show the default “print settings” window before your user prints but just print it on demand through javascript. This can be done in at least Firefox, where you can disable the print-window (more instructions here: http://fiddyp.co.uk/bypass-disable-print-dialog-box-in-firefox-with-javascript-print/) but I don’t have experience from other browsers.
This javascript to print can then be called from the javascript-api in Vaadin (I guess, haven’t tried) or as your own client-side widget…
Hope this gets you started and hope I understood your question correctly
thank you for you reply.
Unfortunately, the option to print from javascript/PDF is not a solution to my problem as there are things that I can’t do through it, like cutting paper on the end of receipt, sending the instruction to the printer to open the drawer,print barcodes etc…
the only problem is that I need to learn how to combine Vaadin and Java applet,(can it event be done?!?) since I’m new to the world of JavaScript/Java/Vaadin.
It now up to me to warm up the chair and do some research.