Do you mean a POS receipt printer? I checked the ESC commands. It seems there is no "center" sequence. So just check how many chars it prints in one row (e.g. 40) and calculate the "center" depending on the lenght of the line you need to print.
I am using a ZJ-5802LD ESC/POS printer and these codes work for me. As I only own one model, don't know if they are "ESC standard" or only for that model
B4X:
Dim ESC_JUSTIFY_LEFT As String = Chr(27)&"a"&Chr(0)
Dim ESC_JUSTIFY_CENTER As String = Chr(27)&"a"&Chr(1)
Dim ESC_JUSTIFY_RIGHT As String = Chr(27)&"a"&Chr(2)
Dim ESC_FORMAT_NORMAL As String = Chr(27)&"!"&Chr(0)
Dim ESC_FORMAT_DWIDTH As String = Chr(27)&"!"&Chr(0x28)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.