ESC/ P Command Reference
Table Of Contents
- ESC/P Command Reference
- IMPORTANT - PLEASE READ CAREFULLY
- Contents
- Introduction
- What is ESC/P?
- 1. Using ESC/P Commands
- 2. Examples of Using ESC/P Commands
- 3. ESC/P Command Limitations
- 4. Control Code List
- 5. Control Command Details
- 5.1 Character/style selection commands
- 5.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 Apply double-strike printing
- ESC H Cancel double-strike printing
- ESC P Apply pica pitch (10 cpi)
- ESC M Apply elite pitch (12 cpi)
- ESC g Apply micron pitch (15 cpi)
- ESC p Specify proportional characters
- ESC W Specify double-width characters
- SO Specify auto-canceling stretched characters
- ESC SO Specify auto-canceling stretched characters
- SI Specify compressed characters
- ESC SI Specify compressed characters
- DC2 Cancel compressed characters
- DC4 Cancel auto-canceling double-width characters
- ESC – Apply/cancel underlining
- ESC ! Global formatting
- ESC SP Specify character spacing
- ESC X Specify character size
- 5.3 Line feed commands
- 5.4 Horizontal movement commands
- 5.5 Vertical movement commands
- 5.6 Paper formatting commands
- 5.7 Printer control commands
- 5.8 Graphics commands
- 5.9 Advanced commands
- ESC i B Barcode
- ESC i Q 2D barcode (QR Code)
- ESC i P QR Code version
- ESC i V 2D barcode (PDF417)
- ESC i D 2D barcode (DataMatrix)
- ESC i M 2D barcode (MaxiCode)
- ESC i J 2D barcode (Aztec)
- ESC i G Specify font
- ESC i F P Print downloaded data
- ESC i a Switch command mode
- ESC i S Status information request
- ESC i L Specify landscape orientation
- ESC i C Specify cutting
- ESC i H Specify recovery setting
- 5.10 Advanced static commands
- ESC iXQ2 Select default character style
- ESC iXQ1 Retrieve default character style
- ESC iXk2 Select default font
- ESC iXk1 Retrieve default font
- ESC iXX2 Specify default character size
- ESC iXX1 Retrieve default character size
- ESC iX32 Specify default line feed
- ESC iX31 Retrieve default line feed
- ESC iXA2 Select default alignment
- ESC iXA1 Retrieve default alignment
- ESC iX(2 Specify default page length
- ESC iX(1 Retrieve default page length
- ESC iXL2 Select default landscape orientation
- ESC iXL1 Retrieve default landscape orientation
- ESC iXj2 Select default international character set
- ESC iXj1 Retrieve default international character set
- ESC iXm2 Select default character code set
- ESC iXm1 Retrieve default character code set
- ESC iXd2 Specify recovery setting
- ESC iXd1 Retrieve recovery setting
- ESC iXv2 (0Ch) Specify recovery count
- ESC iXv1 (0Ch) Retrieve recovery count
- ESC iXE2 Specify barcode margin setting
- ESC iXE1 Retrieve barcode margin setting
- ESC iX_2 (00h) Specify line print setting
- ESC iX_1 (00h) Retrieve line print setting
- ESC iX_2 (01h) Specify line print timeout setting
- ESC iX_1 (01h) Retrieve line print timeout setting
- ESC i DC1 SQ(01h) Specify self-printing QR code content
- ESC i DC1 SQ(00h) Retrieve self-printing QR code content
- ESC i DC1 SR(01h) Select setting change lock
- ESC i DC1 SR(00h) Retrieve setting change lock
- Appendix A: Supported Printers
- Appendix B: Specifications
- Appendix C: Character Code Tables
- Appendix D: Introducing the Brother Developer Center
- brother US ENG
ESC/P Command Reference
- 65 -
5. Control Command Details
ESC * Select bit image <for 300dpi printers>
ASCII: ESC * m n1 n2 Data
Hexadecimal: 1B 2A m n1 n2 Data
Parameters
m=0, 1, 2, 3, 4, 6, 32, 33, 38, 39, 40, 71, 72, 73
The image data is as follows:
- n1+n2*256 bytes when m=0, 1, 2, 3, 4, 6
- (n1+n2*256)*3 bytes when m=32, 33, 38, 39, 40
- (n1+n2*256)*6 bytes when m=71, 72, 73
Description
Refer to “ESC * Select bit image <for 203dpi printers>” for 203dpi printers.
Selects and outputs a bit image according to the value of m.
n1 and n2 indicate the number of dot positions.
n1:
The remainder from dividing the number of dot positions by 256
n2:
The quotient from dividing the number of dot positions by 256
m
Horizontal Dot
Density
Vertical Dot
Density
Horizontal Dot
Resolution
Vertical Dot
Resolution
0
60 dpi
60 dpi
6/300 inch
6/300 inch
1
120 dpi
60 dpi
3/300 inch
6/300 inch
2
120 dpi
60 dpi
3/300 inch
6/300 inch
3
240 dpi
60 dpi
2/300 inch
6/300 inch
4
80 dpi
60 dpi
4/300 inch
6/300 inch
6
90 dpi
60 dpi
4/300 inch
6/300 inch
32
60 dpi
180 dpi
6/300 inch
2/300 inch
33
120 dpi
180 dpi
3/300 inch
2/300 inch
38
90 dpi
180 dpi
4/300 inch
2/300 inch
39
180 dpi
180 dpi
2/300 inch
2/300 inch
40
300 dpi
180 dpi
1/300 inch
2/300 inch
71
180 dpi
360 dpi
2/300 inch
1/300 inch
72
360 dpi
360 dpi
1/300 inch
1/300 inch
73
360 dpi
360 dpi
1/300 inch
1/300 inch
Horizontally neighboring dots are not omitted.
Limitations:
A maximum of 63 can be used with this command.
The total size of the image data contained in one page must be 207,360 bytes or less.