ESC/ P Command Reference
Table Of Contents
- Chapter 1. General Information
- Chapter 2. Command information
- 2-1) Character/style selection commands
- 2-2) Text printing commands
- ESC 4 Apply italic style
- ESC 5 Cancel italic style
- ESC E Apply bold style
- ESC F Cancel bold style
- ESC G Specify double printing
- ESC H Cancel double printing
- ESC P Specify pica pitch
- ESC M Specify elite pitch
- ESC g Specify micron pitch
- ESC p Specify proportional characters
- ESC W Specify double-width characters
- SO Specify auto-cancelling enlarged characters
- ESC SO Specify auto-cancelling enlarged characters
- SI Specify half-width characters
- ESC SI Specify half-width characters
- DC2 Cancel half-width characters
- DC4 Cancel auto-cancelling double-width characters
- ESC - Apply/cancel underlining
- ESC ! Global formatting
- ESC SP Select character spacing for ANK characters
- ESC X Select alphanumeric/kana character size
- 2-3) Line feed amount commands
- 2-4) Horizontal movement commands
- 2-5) Vertical movement commands
- 2-6) Paper formatting
- 2-7) Printer control commands
- 2-8) Graphics commands
- 2-9) Advanced commands
- Chapter 3. Appendix
37
2-6) Paper formatting
ESC ( c Specify page format
[ASCII] ESC ( c nL nH tL tH bL bH
[Decimal] 27 40 99 nL nH tL tH bL bH
[Hexadecimal] 1B 28 63 nL nH tL tH bL bH
[Parameters] nL=4, nH=0
(tL+tH*256)<(bL+bH*256)
Top margin < Bottom margin
[Description]
・ Specifies settings for the top and bottom margins.
・ This printer is designed specifically for A7-size or A6-size paper. As for A7-size, the physical
printable area is 1,180 dots (height) * 816 dots (width) with the portrait orientation, or 816 dots
(height) * 1,180 dots (width) with the landscape orientation. As for A6-size, the physical
printable area is 1,660 dots (height) * 1,152 dots (width) with the portrait orientation, or 1,152
dots (height) * 1,660 dots (width) with the landscape orientation.
The top margin and bottom margin are specified in units of 1/300 inch (1 dot), based on the top edge of
the physical printable area.
(The left margin and right margin are based on the left side of the physical printable area.)
Top margin = tL + tH * 256
Bottom margin = bL + bH * 256
2-7) Printer control commands
ESC @ Initialize
[ASCII] ESC @
[Decimal] 27 64
[Hexadecimal] 1B 40
[Parameters] None
[Description]
・ Resets all commands to their default settings.
・ Clears the data from the print buffer.










