Sitemap

Member-only story

How to thermal print wihtout ESC POS

4 min readAug 28, 2023

--

Often, to use a thermal printer it is necessary to use the ESC POS commands, but this is not always possible.

In one of the programs I created, I found myself having to print labels using a small thermal printer that would have been supplied with the operator station.

This printer (by HPRT) had its own driver which, once installed, allowed it to be used as a normal printer. So initially I proceeded to print the labels in bitmap format. Needless to say, the result was bad, but good enough for the barcodes to be read without problems.

With the main development done, it’s time to fix those little residual defects… including the print quality of the labels.

After a quick Google search here’s the solution: send the print information as raw, rather than as a bitmap. Sending the raw information shouldn’t have been too complex: the printer had a well done datasheet with all the ESC POS commands clearly shown.

What was the problem then? In order to communicate with the printer I should have used a COM port, pity that the printer was on the USB001 port. The standard solution would have been to re-install the drivers and configure a virtual COM port, pointing to USB001.

Now consider that I was developing a bespoke program for a small company in my city. Therefore a single program to be installed on different computers, possibly autonomously by clicking on a simple installer.

--

--

Timothy Franceschi
Timothy Franceschi

Written by Timothy Franceschi

🚀 Transforming ideas into elegant code. Freelance developer 🌐 Crafting websites, apps, and more. Let's make technology dance!

No responses yet