Print a ticket/receipt without browser dialog
Español | English |By ParzibyteHow to use
- Set up your thermal printer; you can install it as a generic printer or with its drivers
- Print a test from the control panel, i.e. check if your printer is working
- Share your printer. Look at this post
- 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)
- Optionally: Now you can go to the examples
- In your project, include the Impresora.js script
- 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
Examples
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. |