To get started, check out my answer here. How do I print a receipt using a receipt printer from a web page (.aspx)?
You have the correct ESC / P code for receiving cash in accordance with: http://www.beaglehardware.com/howtoprogramcashdrawer.html
The issue is discussed here: https://code.google.com/p/jzebra/issues/detail?id=134
POS world says the kickout code is: 1B 70 00 40 F0, however the "00" won't work (it a limitation of the web browser)
Download jZebra - now it has turned into a qz-print library, put the jar file in the project directory, and the first method in this jzebra mail branch works for me:
<form id="form1" runat="server"> <div> <input type=button onClick="openCashDrawer()" value="Open Cash Drawer"> <applet name="jzebra" code="jzebra.PrintApplet.class" archive="./jar/jzebra.jar" width="100" height="100"> <param name="printer" value="zebra"> </applet> <script> function chr(i) { return String.fromCharCode(i); } function openCashDrawer() { document.jzebra.append(chr(27) + "\x70" + "\x30" + chr(25) + chr(25) + "\r"); document.jzebra.print(); } </script>
The base64 and appendFile methods discussed in this thread did not help me, but apparently appendFile(file with raw ESC/P Commands) and append64(base64) bypass the "Chr (0)" restriction.
source share