ESCPOS-ThermalPrinter-Android icon indicating copy to clipboard operation
ESCPOS-ThermalPrinter-Android copied to clipboard

Printing labels

Open antonis27 opened this issue 1 year ago • 3 comments

I would like to print labels to a thermal printer. If I know the height of each label, can I dynamically add empty lines to reach the label height? If so, do I need to get the current height of each label and compare it with the remaining space? Is it possible to get the current height ?

antonis27 avatar Dec 18 '23 10:12 antonis27

Someone already do that with this library, he used dot feed to align printing to the next sticker.

DantSu avatar Dec 18 '23 11:12 DantSu

I tried to use dotsFeedPaper, but when I set dotsFeedPaper to 255, the position on the next label changed and is not at the correct position. I also noticed in some posts that there might be an issue with the maxValue of dotsFeedPaper and that larger feed values don't work as expected.

antonis27 avatar Dec 19 '23 14:12 antonis27

Printing dots to determine is a long and unstable process since the distances between the labels ( pages) may not be divided perfectly into dots. On the other hand, some printers have pagemode and related commands (like GotoNextLabel()). Is there a way to initiate these modes using this library? I mean, can we send raw commands to the printer?

kelalaka153 avatar Jun 25 '24 19:06 kelalaka153