Set characters size with ESC/POS (Java)

12,850

Solution 1

TM-T70II has two types of Font, FontA(12x24) and FontB(9x17).
To change the font size, you can use the "ESC !" command

  • Font A: "ESC ! 0" (1Bh 21h 00h)
  • Font B: "ESC ! 1" (1Bh 21h 01h)

If it does not work you can send the "ESC @" first to clean the command buffer.

Solution 2

Try this out

normalSize = {0x1B, 0x21, 0x03}

bold = {0x1B, 0x21, 0x08}

boldMedium = {0x1B, 0x21, 0x20}

boldLarge = {0x1B, 0x21, 0x10}

Share:
12,850
drenda
Author by

drenda

Updated on July 18, 2022

Comments

  • drenda
    drenda almost 2 years

    I developed a small library in Java to send commands to a Epson TM-T70II printer with ESC/POS protocol. I'm able to print all what I need but I can't find a way to change the font size of the text to a smaller value than the default font size. Just to puntualize, "GS!" is not a ESC/POS useful command because it can only increase the font size, see here to more info.

    I was looking at "ESC&" but I'm not sure this can be useful to reduce the font size. Can you give me some suggestion and a small example of the command to use?