Parzibyte's blog

Free knowledge blog: linux, programming, open source, databases, android, frameworks, web and computing in general

Python Thermal Printing: A Comprehensive Guide for Printing on Thermal Printers

In this tutorial, we’ll explore how to effortlessly print receipts, invoices, and tickets on a thermal printer using Python. I’ll introduce you to a powerful plugin that I’ve developed, enabling seamless integration for Python-based applications.

With this plugin, you’ll gain the ability to effortlessly print tickets from Python, regardless of your preferred framework—whether it’s the terminal, Flask, Tkinter, Django, or any other Python-supported platform.

It provides extensive functionality, allowing you to print images, barcodes, text with accents, change fonts, rotate text, and much more, sending the ESC POS commands native to thermal printers.

Join me as we dive into the world of thermal printing using Python, empowering you to generate professional-quality prints effortlessly.

(more…)

Image printing on Thermal printer

When printing receipts on thermal printers (ESC POS) sometimes it is needed to print images of any type, for example, to print the customer’s logo and so on.

Image printing in thermal printer receipt

Image printing in thermal printer receipt

In this post I will show you how to print any kind of images: you will be able to print local images, base64 images and internet images.

Please note that we will print images on thermal printer by using JavaScript, but once you learn how to do it with JS you will be able to do it from another programming languages.

(more…)

Fix: Error en el servidor: sql: no rows in result set when using thermal printer plugin

In this post I will show you how to fix an error that appears in my thermal printer plugin that says: Error en el servidor: sql: no rows in result set.

This error says that there are no rows in the database, and you may be wondering what printing has to do with a database, so that is exactly what I will discuss in this post.

(more…)

Silent PDF Print with JavaScript and plugin

Today I am going to present you a plugin that I have just created. It is a plugin to print a PDF file silently, that is, without asking the user for confirmation.

This plugin exposes a REST API so that a PDF can be printed without confirmation using JavaScript. Just make an HTTP GET request to the plugin path sending the name of the PDF and the name of the printer.

The best thing about this is that you can use the virtual printers that Windows offers, in this way you can do your tests in an ecological way.

Throughout this post I will show you the documentation of the plugin and all the details of it, including how you can get it.

(more…)

How to print QR codes on Thermal printer

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.

(more…)

Print ticket in thermal printer directly from browser

In this post I will show you how to print a receipt in a thermal printer directly from web browser, without user interaction and confirm dialogs, by using a free plugin.

Thermal printer plugin - Receipt example

(more…)

A plugin for printing in thermal printers directly from browser

In this post I will introduce to you a plugin for printing tickets, receipts or invoices on a thermal printer using client-side JavaScript even if your web page or application is on a cloud server.

This plugin allows you to print directly from browsers, without dialogs and without browsers compatibility issues because you only have to send a HTTP request to print silently and in the background.

(more…)