If you have followed my posts, you will know that a long time ago I developed a plugin and I have added new features, until today we print QR codes on a thermal printer.
Some time ago I showed you how to print a ticket /receipt directly from browser, today we will use it to print a QR code.
Print QR codes on a thermal printer
The process is simple. Download the plugin and run it, remember to give it permissions if required. It will be executed in the background.
Then install your printer and make sure it is shared.
Now open an HTML document, include the script and then in another script create a
Impresora object like this:
You can call the
qr method after or before anything, and align it like anything else.
Remember to put the name of your printer. When testing it in my case it is like this:
Try it yourself
If you want to generate and print QR codes by yourself without writing any line of code, navigate to this example.
You can see its code here.