How to print in a table structure when receiving ESC / POS

I am trying to print a receipt using Android and a Bluetooth printer. I managed to print the text in normal mode and using the ESC / POS command for some texts. However, I cannot figure out how to print a table structure like:

enter image description here

I tried using the return channel, but the printer does not seem to support it (I tried several commands, but did not work). Currently, the only way I can think of is to calculate the length of each number and add the space between them to look like a table. Is there a way to do this using the ESC / POS command?

+4
source share

Source: https://habr.com/ru/post/1657024/


All Articles