How to print QR codes on Thermal printer

Imprimir códigos QR en impresora térmica

Summary: In this post I will show you how to print readable QR codes on a thermal printer (also called ticket printer, pos printer, etc.) using JavaScript and a plugin.

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:

Imprimir códigos QR en impresora térmica

Printing a QR code on a thermal printer

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.

Leave a Reply

Your email address will not be published. Required fields are marked *