In a web application I want to print a receipt using a POS (Point of Sale) Printer. I want to do that with Javascript. Can anyone provide me an example for that?
Check whether paper is jammed. If it is jammed, remove it (Printing stops if the thermal head overheats and resumes automatically when it cools). For other cases, turn the printer off, and after 10 seconds, turn it back on.
Check for any frayed cables (of course, while unplugged). If you moved the printer, make sure you are using the same ethernet / USB port as before. Switch to a different ethernet / USB port and reconfigure driver for that new port if necessary.
I'm going out on a limb here , since your question was not very detailed, that a) your receipt printer is a thermal printer that needs raw data, b) that "from javascript" you are talking about printing from the web browser and c) that you do not have access to send raw data from browser
Here is a Java Applet that solves all that for you , if I'm correct about those assumptions then you need either Java, Flash, or Silverlight http://code.google.com/p/jzebra/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With