Print a ticket/receipt without browser dialog

Español | English |By Parzibyte
Finally a free plugin to send a ticket to thermal printer by using only JavaScript. Compatible with all modern browsers

How to use

  1. Set up your thermal printer; you can install it as a generic printer or with its drivers
  2. Print a test from the control panel, i.e. check if your printer is working
  3. Share your printer. Look at this post
  4. Download the free plugin (it's the exe file) and open it. It will be executed in the background (if you want to stop it use the Task Manager)
  5. Optionally: Now you can go to the examples
  6. In your project, include the Impresora.js script
  7. Now you have the Impresora class; you can create a new instance

Limitations

  • The plugin does not work in printers connected through the network, the plugin must be in the computer where the thermal printer is physically connected

API REST

The plugin starts a web server in the port 8000
Feel free to check the source code of Impresora.js and the examples to see how to use the class

GET /impresoras

Get available printers

GET /impresora

Get selected thermal printer. It returns a empty string if none.

POST /imprimir

Print a document in the default printer. You must send an array of objects (encoded as JSON) with "accion" and "datos" keys; again, check the source code for more info

PUT /impresora

Set a printer. You must send a string encoded with JSON with the printer name (you can get it from GET /impresoras). If the printer is a thermal printer and everything is fine, a receipt will be printed. If not, please check your settings.

FAQ

Some faqs and issues

Issue / question Explanation
Error en el servidor: sql: no rows in result set The printer has not been set, either because the action has not been performed or because there are no valid printers, remember that if you want to print ,first you must set the printer, and then try to print
I want to execute the plugin on the Windows Startup and hide the terminal In the 0.6 version i have removed the terminal, if you want to start it when the system starts, put it on the startup folder; more info here.
I want to print special chars like áéí or ñ The plugin is not able to do it yet
I want to remove the header and footer Get the premium version
Premium version cost 25 dollars.You get 3 domains to use the plugin, aditional domains are 2 dollars each
Payment method Paypal on https://paypal.me/LuisCabreraBenito
Do I get some technical support when I buy the plugin? No, you just get a licence to use the plugin. I can only provide you with the docs and examples. However you can hire me
Does it work on Linux and Mac? It surely should work, but I have not tested it yet.