How can I use the ESC/POS command to control the size of printed text for the pos58 ticket thermal printer?

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.