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.

Apoya al sitio

¿Mi artículo te ha resultado útil? haz una donación. También pudes suscribirte a mi boletín semanal en la parte de abajo

Suscribir por correo

Ingresa tu correo y recibirás mis últimas entradas sobre programación, open source, bases de datos y todo lo relacionado con informática

Relacionado:  Print receipt in thermal printer using JavaScript, CSS & HTML

Join 313 other subscribers


0 Comments

Leave a Reply

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

%d bloggers like this: