Sending ESC/P escape codes to peripheral devices when the escape string contains Chr(0)
Posted: Mon Jul 15, 2024 12:36 pm
As PureBasic uses this as a string terminator, have any other developers found a good way to send a string in which it is embedded, to one of these devices? I know I can poke the 0 into a string location and somehow send the data, but how have others done this?
Printers such as in point-of-sale often require this and we can't always work through a driver. For instance, two of the below in our legacy system require Chr(0).
Printers such as in point-of-sale often require this and we can't always work through a driver. For instance, two of the below in our legacy system require Chr(0).
Code: Select all
03: Draft Mode : ESC "x" 0
04: NLQ Mode : ESC "x" 1
05: 10 CPI : 18 ESC "P" 0
06: 12 CPI : 18 ESC "M" 1
07: 15 CPI : 18 ESC "g"
08: Condensed Mode : 15
09: Expanded Mode : 14