How can I control the text size of a pos58 ticket thermal printer?
I know that ESC/POS commands are not used.
ASCII: ESC! N
Decimal: 27 33 N
Hexadecimal: 1B 21 N
In C #, do I use the decimal notation (char) (27) + (char) (33) + (char) (n) to multiply the text and print it?
Mainly to enlarge text printing. N does not know how much to get? Is it 48?
For example, how can I print the "China" string by doubling it?
____________________________________________________
After several attempts, I finally understood it.
Use a character to send a command:
Send = "" + (char) (27) + (char) (64) + (char) (27) + (char) (33) + (char) (48 );
For (INT I = 0; I <send. length; I ++)
{
Buf [I] = (byte) Send [I];
}
FS. Write (BUF, 0, Buf. Length );
Explanation: (char) (27) + (char) (64) is to initialize the printer, (char) (27) + (char) (33) + (char) (48); is to set the print character format command, the last 48 can be 0, 16, 32, 48
Then print the output directly:
Printlpt. printdata ("China ");
If you have any questions of the same kind, please kindly advise!
**************************************** **************************************** *****
Correction: in fact, you can write control command characters and output characters together. No matter what method is used, if there are multiple data recordsProgramIt will not be successful. this is the result of my research over the past day and night. On the Internet, I can also find the program used by the ESC/POS printing command. People write it together, but there is no example of controlling the character size. I cleverly changed it into a function, and it took a whole day and night to find a detour. but it is also worth knowing how to use the ESC/POS command.