lukevp / ESC-POS-.NET

Efficient, Easy to Use Thermal Printing & POS (Windows/Linux/OSX, WiFi/BT/USB/Ethernet)
MIT License
503 stars 166 forks source link

Find the number of characters in a string #210

Open Kamaew opened 1 year ago

Kamaew commented 1 year ago

Hello

Can anyone suggest how to find out the number of characters that fit in one line? For example, to make a separator line

------------------------

and she was always from edge to edge.

Many Thanks

igorocampos commented 1 year ago

That varies from printer to printer. I think I have a suggestion open here to implement this as a property in the class and you could inform the columns of your printer when creating a new instance of the class. That would allow having commands such as the one you just described, a full line print.

However, that information can't be obtained by this library, you are the one that needs to inform it.

Kamaew commented 1 year ago

That would be good