Each owner whose software title is mentioned in this document has a Software License Agreement specific to
its proprietary programs.
Any trade names and product names of companies appearing on Brother products, related documents and
any other materials are all trademarks or registered trademarks of those respective companies.
IMPORTANT - PLEASE READ CAREFULLY
Note
This documentation (“Documentation”) provides information that will assist you in controlling your Printer
QL-XXX (where “XXX” is the model name).
You may use the Documentation only if you first agree to the following conditions.
If you do not agree to the following conditions, you may not use the Documentation.
Condition of Use
You may use and reproduce the Documentation to the extent necessary for your own use of your Printer
Model (“Purpose”). Unless expressly permitted in the Documentation, you may not;
(i) copy or reproduce the Documentation for any purpose other than the Purpose,
(ii) modify, translate or adapt the Documentation, and/or redistribute it to any third party,
(iii) rent or lease the Documentation to any third party, or,
(iv) remove or alter any copyright notices or proprietary rights legends included within the Documentation.
No Warranty
a. Any updates, upgrades or alteration of the Documentation or Printer Model will be performed at the sole
discretion of Brother. Brother may not respond to any request or inquiry about the Documentation.
b. THIS DOCUMENTATION IS PROVIDED TO YOU "AS IS" WITHOUT WARRANTY OF ANY KIND,
WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY
OF FITNESS FOR A PARTICULAR PURPOSE. BROTHER DOES NOT REPRESENT OR WARRANT
THAT THIS DOCUMENTATION IS FREE FROM ERRORS OR DEFECTS.
c. IN NO EVENT SHALL BROTHER BE LIABLE FOR ANY DIRECT, INDIRECT, PUNITIVE, INCIDENTAL,
SPECIAL OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER, ARISING OUT OF
THE USE, INABILITY TO USE, OR THE RESULTS OF USE OF THE DOCUMENTATION OR ANY
SOFTWARE PROGRAM OR APPLICATION YOU DEVELOPED IN ACCORDANCE WITH THE
DOCUMENTATION.
ESC/P Command Reference
Contents
Introduction ··········································································································1
What is ESC/P? ····································································································2
1. Using ESC/P Commands·················································································3
2. Examples of Using ESC/P Commands ··························································5
Appendix A: Specifications············································································· 114
Appendix B: Character Code Tables······························································ 115
Character code tables................................................................................. 115
International character set table.................................................................. 116
Chinese character catalog (based on GB18030)........................................ 117
Appendix C: Introducing the Brother Developer Center······························ 149
- iii -
ESC/P Command Reference
Introduction
This material provides the necessary information for directly controlling QL-720NW.
This information is provided assuming that the user has full understanding of the operating system being used
and basic mastery of RS-232C or USB in a developer's environment.
We accept no responsibility for any problems caused by programs that you develop using the information
provided in this material, affecting software, data or hardware, including the QL-720NW, and any problems
resulting directly or indirectly from them. Use this material only if you accept these terms.
This material shall not be reproduced, in part or in full, without prior approval. In addition, this material shall
not be used as evidence in a lawsuit or dispute in a way that is unfavorable towards our company.
Read the model names that appear in the screens in this manual as the name of your printer.
These ESC/P commands have been adapted specifically for this company.
- 1 Introduction
ESC/P Command Reference
What is ESC/P?
ESC/P is one type of control codes used for printers. With the codes introduced in this document, various
labels can be created and printed. In this document, ESC/P codes are provided as both ASCII and binary
codes.
When sending codes to the printer, make sure that the binary codes are used, otherwise the printer cannot
parse the codes.
- 2 -
What is ESC/P?
1. Using ESC/P Commands
Below is a description of the flow for creating documents.
ESC/P Command Reference
Also refer to “2. Examples of Using ESC/P Commands
”.
(1) Start ESC/P
1. Switch the command mode.
2. Initialize
- Switch command mode (ESC i a)
- Initialize (ESC @)
(2) Format settings
1. Select the orientation. - Specify landscape orientation (ESC i L)
2. Specify the page size. - Specify page length (ESC ( C)
3. Specify print area. - Specify page format (ESC ( c)
- Specify left/right margins (ESC I, ESC Q)
4. Specify the line feed amount. - Specify line feed amount (ESC 0, ESC 2, ESC 3, ESC A)
1. Specify bit images. - (ESC *, ESC K, ESC L, ESC Y, ESC Z)
2. Specify barcodes. - (ESC i B)
3. Specify 2D barcodes. - (ESC i Q, ESC i V, ESC i D, ESC i M)
4. Print the downloaded data - (ESC i F)
Downloaded image data must first be downloaded and saved on
the printer.
- 4 -
1. Using ESC/P Commands
2. Examples of Using ESC/P Commands
This is the label that will be made.
ESC/P Command Reference
Step 1:
Landscape
4 inches
1 inch
Step 2:
Page length
Step 4:
Vertical position
0.5 inch
Step 3:
Horizontal position
Step 5:
Character size: 64 dots
In order to make this label, the following six steps are required after entering ESC/P mode.
Step 1: Select the landscape orientation.
Entered command
ESC i L 01h
n
- 5 -
2. Examples of Using ESC/P Commands
Step 2: Specify the page length.
4 inches=1200 dots
1200 dots–72 dots=1128 dots
Page length=mL+mH*256=1128
==
==
104
04h
68h
4
ESC/P Command Reference
4 inches
*The page length does not include the margins.
For the margins, subtract 6 mm (72 dots) from the page length.
Entered command
ESC ( C 02h 00h 68h 04h
nLnH mL
mH
Step 3: Specify the horizontal position.
0.5 inch=150 dots
Horizontal position=n1+n2*256=150
= =
150
96h
= =
0
00h
0.5 inch
Entered command
ESC $ 96h 00h
n1 n2
- 6 -
2. Examples of Using ESC/P Commands
Step 4: Specify the vertical position.
ESC/P Command Reference
1 inch
1 inch=300 dots
Vertical position=mL+mH*256+18 dots=300
==
26
1Ah
01h
==
1
Entered command
ESC ( V 02h 00h 1Ah 01h
nLnH mL mH
- 7 -
2. Examples of Using ESC/P Commands
Step 5: Specify the character size.
ESC/P Command Reference
Character size: 64 dots
Character size=nL+nH*256=64 dots
==
64
40h
00h
==
0
Entered command
ESC X 00h 40h 00h
m nL nH
- 8 -
2. Examples of Using ESC/P Commands
All commands together will make the example label shown below.
ESC/P Command Reference
ESC i a 00h
ESC @
ESC i L 01h
ESC ( C 02h 00h 68h 04h
Select ESC/P mode
Binary command: 1B 69 61 00
Initialize ESC/P mode
Binary command: 1B 40
5 steps explained above
ESC $ 96h 00h
ESC ( V 02h 00h 1Ah 01h
ESC X 00h 40h 00h
At your side
FF
However, these commands should be converted to binary data before sent to the printer, as shown below.
Here is the captured converted binary data.
Text to be print
Binary command: 41 74 20 79 6F 75
72 20 73 69 64 65
Print start command
Binary command: 0C
When the printer receives above binary commands, the label shown below is printed.
- 9 -
2. Examples of Using ESC/P Commands
ESC/P Command Reference
3. ESC/P Command Limitations
3.1 Print area
The printing media are die-cut labels and continuous length tape.
The area that can physically be printed on depends on the size and type of the print media.
Die-cut labels
Space left of
physically printable
area
Left margin
Right margin
Top margin
Unprintable area
Bottom margin
Space above
physically printable
area
Top margin position
(TOF position)
Physically printable
area
Unprintable area
- 10 -
3. ESC/P Command Limitations
The print area for each media is described below.
Print area
ESC/P Command Reference
(2) Label length
(1) Label width
printable area
(7) Height of
(3) Top margin
(9) Label
spacing
Thermal head
No.720
Printable area
(4) Bottom margin
(5) Left margin (6) Right margin (8) Length of printable area
No.001
The maximum length of continuous length label is 1 meter.
Head-
Standard Address 1 No 29mm 90.3mm1.5mm3mm 25.92mm 83.94mm 408 - 713
Sensor
No.
Applied
Forced
segmenting
(1) (2) (3) (4) (5) (6) (7) (8)
Drive
Head No.
Large Address 2 No 38mm 90.3mm1.5mm3mm 34.98mm 83.94mm 295 - 707
Small Address 3 No 62mm 28.93mm1.5mm3mm 58.95mm 22.95mm 012 - 707
Sipping 4 No 62mm 100.36mm1.5mm3mm 58.95mm 93.93mm 012 - 707
Multi purpose 5 No 17mm 54.32mm1.5mm3mm 13.98mm 47.94mm 555 - 719
*1 ANK(Alphabets and number) is available in the Chinese character mode but it is specified by different code
from ANK mode.
*2 GB18030 is available for the Chinese character mode.
3.2.1 Character sizes
ANK mode
Each font is available in full size, compressed size (half width), double width, double height and half width,
double height, and quadruple size.
Full size
Chinese character mode
Each font is available in full size, half width, double height, double width, double height and width,
superscript and subscript quarter square character. These sizes are able to be used together.moreover
verticall or horizontal writing can be chosen.
Double width
and half width
Double heightHalf widthDouble height
Double height
and width
If the half width and the quarter square character are used together, half width specification is ignored.
- 13 -
3. ESC/P Command Limitations
ESC/P Command Reference
Full size
A
Superscript
quarter square
quarter square
Example of a combination
1) When vertical writing
Full size
A
Subscript
Double width
Double width
Double heightHalf width
Double height
and width
Double heightHalf width
Double height
and width
A
A
Superscript
quarter square
Subscript
quarter square
2) When horizontal writing
Full size
A
A
Superscript
quarter square
Subscript
quarter square
Double width
and half width
Double width
and half width
Double heightHalf widthDouble height
Double height
and width
- 14 -
3. ESC/P Command Limitations
3.2.2 Character pitches
Pitch refers to the spacing between neighboring characters.
When characters are arranged with a fixed pitch, they will be evenly spaced.
If characters extend over several lines, they will align in straight rows.
ESC/P Command Reference
a
c
b
Fixed spacing
When characters are arranged with a proportional pitch, the spacing will vary depending on the character.
(For example, “W” is wide but “I” is narrow.)
As a result, the excess space between characters is eliminated and the text appears more compact.
W
Variable spacing
If a fixed pitch is applied to a font that is better with a proportional pitch, all characters are given the same
width as the widest character in the font.
W
I
C I
C
a
b
Fixed spacing
W
Variable spacing
I
W
c
C I
C
Variable spacing
W
Variable spacing
This makes it possible to evenly space the characters of a proportional-pitch font without having to change the
font.
If a proportional pitch is applied to a font that is better with a fixed pitch, all characters are given the same
width, appearing the same as with a fixed pitch.
C I
Fixed spacing
I
Fixed spacing
W
C
- 15 -
3. ESC/P Command Limitations
ESC/P Command Reference
A
A
A
A
A
A
A
3.3 Print position
The print position is the standard position for printing characters, bitmaps, and barcodes.
There is a horizontal print position and vertical print position, which are the reference points for vertical
position movement and horizontal position movement.
3.3.1 Characters
When horizontal writing
Characters are arranged with their top edges aligned with the print position.
The baseline of each character is the bottom edge of the character, regardless of size, font, etc.
All characters on a single line are printed with a baseline positions that is the same for each character.
If a single line consists of characters with different heights, the characters are aligned with the baseline of
the tallest character on the line.
Underlines are drawn 4 dots below the baseline position.
When vertical writing
Start position
A
A
Print position
Baseline position
Baseline position
When vertical writing, a center of a character is placed onto the middle of the height of a line.
When vertical writing, an underline starts from a print position and a character starts 4dots blow from the
underline.
Start position
A
- 16 -
Baseline position
3. ESC/P Command Limitations
ESC/P Command Reference
3.3.2 Bitmaps, barcodes and downloaded images
These types of image data are treated in the same way as characters and are printed with the bottom
edge of the image aligned with the baseline.
3.3.3 Same line
Characters and images are considered to be on the same line, even if they are separated by tabs.
Horizontal movement to the right between characters or images is regarded as being on the same line;
however, horizontal movement to the left is regarded as being on separate lines if wrapping occurs.
- 17 -
3. ESC/P Command Limitations
ESC/P Command Reference
3.4 Line feed amount
The amount of line feed is the amount of vertical movement from the print position of one line to the print
position of the next line.
HHHHHHHHHHHHH
HHHHHHHHHHHHH
HHHHHHHHHHHHH
The line feed amount is specified with ESC 0, ESC 2, ESC A, and ESC 3.
Within a single line of text, the tallest character is determined, and the baseline is moved so that the top
edge of that character is at the vertical print position.
The tallest character within a line becomes the line height.
Line feed amount
If characters are underlined, 4 dots are added to the line height.
The underline is placed underneath of the characters when horizontal writing and above of the characters
when vertical writing.
When underline for both horizontal and vertical characters are existing in the same line, 8 dots are added
for the heght of the line.
If the line height is greater than the specified line feed amount, the line height is used as the actual line
feed amount.
In this way, even if the specified line feed amount is small, the upper and lower lines will not overlap.
- 18 -
3. ESC/P Command Limitations
ESC/P Command Reference
4. Control Code List
Character/style selection commands (Refer to section 5.1 Character/style selection commands.)
ASCII Code Binary Code Description
ESC R 1B 52 Select international character set
ESC q 1B 71 Select character style
Text printing commands (Refer to section 5.2 Text printing commands
ASCII Code Binary Code Description
ESC 4 1B 34 Apply italic style
ESC 5 1B 35 Cancel italic style
ESC E 1B 45 Apply bold style
ESC F 1B 46 Cancel bold style
ESC G 1B 47 Apply double-strike printing
ESC H 1B 48 Cancel double-strike printing
ESC P 1B 50 Apply pica pitch (10 cpi)
ESC M 1B 4D Apply elite pitch (12 cpi)
ESC g 1B 67 Apply micron pitch
ESC p 1B 70 Specify proportional characters
ESC W 1B 57 Specify double-width characters
SO 0E Specify auto-canceling stretched characters
ESC SO 1B 0E Specify auto-canceling stretched characters
ASCII: ESC R n
Decimal: 27 82 n
Hexadecimal: 1B 52 n
Parameters
0≤n≤13, 64
ESC/P Command Reference
Description
Selects the character set, and switches some of the character codes in the code table according to the
value of n.
n=0: U.S.A.
n=1: France
n=2: Germany
n=3: U.K.
n=4: Denmark I
n=5: Sweden
n=6: Italy
n=7: Spain I
n=8: Japan
n=9: Norway
n=10: Denmark II
n=11: Spain II
n=12: Latin America
n=13: South Korea
n=64: Legal
Prints the subsequent text in italics.
Both ANK and Chinese characters are available.
Valid when horizontal writing.
This command is valid anywhere in a text line.
ESC 5 Cancel italic style
ASCII: ESC 5
Decimal: 27 53
Hexadecimal: 1B 35
Parameters
None
Description
Cancels the italic character style.
This command is valid anywhere in a text line.
Prints the subsequent text in bold.
Both ANK and Chinese characters are available.
This command is valid anywhere in a text line.
ESC F Cancel bold style
ASCII: ESC F
Decimal: 27 70
Hexadecimal: 1B 46
Parameters
None
Description
Cancels the bold style.
This command is valid anywhere in a text line.
Both ANK and Chinese characters are available.
Example
Code: ABC ESC E DEF ESC F GHI FF
Print result: ABCDEFGHI
- 26 -
5. Control Command Details
ESC G Apply double-strike printing
ASCII: ESC G
Decimal: 27 71
Hexadecimal: 1B 47
Parameters
None
ESC/P Command Reference
Description
Prints the subsequent text in bold.
This command is valid anywhere in a text line.
Both ANK and Chinese characters are available.
ESC H Cancel double-strike printing
ASCII: ESC H
Decimal: 27 72
Hexadecimal: 1B 48
Parameters
None
Description
Cancels the bold style.
This command is valid anywhere in a text line.
Both ANK and Chinese characters are available.
Example
Code: ABC ESC G DEF ESC H GHI FF
Print result: ABCDEFGHI
- 27 -
5. Control Command Details
ESC P Apply pica pitch (10 cpi)
ASCII: ESC P
Decimal: 27 80
Hexadecimal: 1B 50
Parameters
None
ESC/P Command Reference
Description
Prints the subsequent text (ANK character) with the pica pitch (10 characters/inch).
The character spacing is 30 dots (=300 dots/10 characters).
If the character width is 30 dots or less, the character spacing is specified as 30 minus the character width.
If the character width exceeds 30 dots, the character spacing is specified as the character width.
(The spacing between characters is 0 dot.)
In this case, the pitch does not exactly equal the pica pitch.
With double-width characters, the character spacing is doubled (60 dots).
With half-width characters, the character spacing is halved (15 dots).
When the character spacing is changed with ESC SP, the setting is updated.
This command is invalid when proportional pitch is selected.
Example
For a 24-dot font at full width:
Full width Double width
24 dots
48 dots
A
6 dots
B
- 28 -
A
12 dots
B
5. Control Command Details
ESC M Apply elite pitch (12 cpi)
ASCII: ESC M
Decimal: 27 77
Hexadecimal: 1B 4D
Parameters
None
ESC/P Command Reference
Description
Prints the subsequent text (ANK character) with the elite pitch (12 characters/inch).
The character spacing is 25 dots (=300 dots/12 characters).
If the character width is 25 dots or less, the character spacing is specified as 25 minus the character width.
If the character width exceeds 25 dots, the character spacing is specified as the character width.
(The spacing between characters is 0 dot.)
In this case, the pitch does not exactly equal the elite pitch.
With double-width characters, the character spacing is doubled (50 dots).
With half-width characters, the character spacing is halved (13 dots).
When the character spacing is changed with ESC SP, the setting is updated.
This command is invalid when proportional pitch is selected.
Example
For a 24-dot font at full width:
Full width Double width
24 dots
AB
48 dots
A
B
1 dot
2 dots
- 29 -
5. Control Command Details
ESC g Apply micron pitch
ASCII: ESC g
Decimal: 27 103
Hexadecimal: 1B 67
Parameters
None
ESC/P Command Reference
Description
Prints the subsequent text (ANK character) with the micron pitch (15 characters/inch).
The character spacing is 20 dots (=300 dots/15 characters).
If the character width is 20 dots or less, the character spacing is specified as 20 minus the character width.
If the character width exceeds 20 dots, the character spacing is specified as the character width.
(The spacing between characters is 0 dot.)
In this case, the pitch does not exactly equal the micron pitch.
With double-width characters, the character spacing is doubled (40 dots).
With half-width characters, the character spacing is halved (10 dots).
When the character spacing is changed with ESC SP, the setting is updated.
This command is invalid when proportional pitch is selected.
Example
For a 16-dot font at full width:
Full width
16dots
AB
Double width
32 dots
A
B
8 dots
4 dot
- 30 -
5. Control Command Details
ESC p Specify proportional characters
ASCII: ESC p n
Decimal: 27 112 n
Hexadecimal: 1B 70 n
Parameters
n=0, 1, 48 (“0”), 49 (“1”)
ESC/P Command Reference
Description
Specifies proportional characters.
n=1 or 49 (“1”): Specifies proportional characters.
n=0 or 48 (“0”): Cancels proportional characters.
If proportional characters are specified, the character spacing specified with ESC SP is maintained as is.
Valid only for the ANK characters in ANK mode.
ESC W Specify double-width characters
ASCII: ESC W n
Decimal: 27 87 n
Hexadecimal: 1B 57 n
Parameters
n=0, 1 or 48 (“0”), 49 (“1”)
Description
Specifies double-width characters.
n=1 or 49 (“1”): Specifies double-width characters.
n=0 or 48 (“0”): Cancels double-width characters.
Double-width characters specified with this command are not canceled with the DC4, FS DC4 code or a
line feed.
Canceling double width characters cancels both half width and quarter square character in Chinese
character mode and reducing character size in ANK mode.
Both ANK and Chinese characters are available.
Example
Code: ABC ESC W 1 ABC ESC W 0 ABC FF
Print result: ABC
ABC
ABC
- 31 -
5. Control Command Details
SO Specify auto-canceling stretched characters
ASCII: SO
Decimal: 14
Hexadecimal: 0E
Parameters
None
ESC/P Command Reference
Description
Prints the subsequent text at double width.
This command is canceled with DC4, LF, VT, FF, CR or an automatic line feed.
This command is canceled with ESC $, ESC \, ESC J, ESC ( V or ESC ( v.
This command can also be canceled with ESC W+0.
Both ANK and Chinese characters are available.
ESC SO Specify auto-canceling stretched characters
ASCII: ESC SO
Decimal: 27 14
Hexadecimal: 1B 0E
Parameters
None
Description
Same as SO
Example
Code: ABC ESC SO ABCDEFGHIJK…XYZ FF
Print result: ABC
XYZ
ABCDEFGHIJK…
(Automatic line feed)
- 32 -
5. Control Command Details
SI Specify compressed characters
ASCII: SI
Decimal: 15
Hexadecimal: 0F
Parameters
None
ESC/P Command Reference
Description
Prints the subsequent text at half width.
ESC SI Specify compressed characters
ASCII: ESC SI
Decimal: 27 15
Hexadecimal: 1B 0F
Parameters
None
Description
Same as SI
- 33 -
5. Control Command Details
DC2 Cancel compressed characters
ASCII: DC2
Decimal: 18
Hexadecimal: 12
Parameters
None
ESC/P Command Reference
Description
Cancels compressed characters specified with SI or ESC SI.
DC4 Cancel auto-canceling double-width characters
ASCII: DC4
Decimal: 20
Hexadecimal: 14
Parameters
None
Description
Cancels double-width characters specified with ESC SO or SO.
Does not cancel the ESC W command.
Both ANK and Chinese characters are available.
n=4 or 52 (“4”): Applies underlining with a width of 4 dots.
n=3 or 51 (“3”): Applies underlining with a width of 3 dots.
n=2 or 50 (“2”): Applies underlining with a width of 2 dots.
n=1 or 49 (“1”): Applies underlining with a width of 1 dot.
n=0 or 48 (“0”): Cancels underlining.
This command is valid anywhere in a text line.
The underlining specified with this command is a continuous line.
Spaces between characters and words are also underlined.
Areas with the “specify absolute horizontal position” (ESC $) and “specify relative horizontal position”
(ESC \) commands are not underlined.
Bit images and barcodes are not underlined either.
4/300 inch (4 dots) is added to the line feed amount for lines that include underlined characters.
The underline is positioned as follows:
Underline Underline Position
1 dot wide 2/300 inch (second dot) below the characters
2 dots wide Between 2/300 inch (second dot) and 3/300 inch (third dot) below the characters
3 dots wide Between 1/300 inch (first dot) and 3/300 inch (third dot) below the characters
4 dots wide Between 1/300 inch (first dot) and 4/300 inch (fourth dot) below the characters
ASCII: ESC ! n
Decimal: 27 33 n
Hexadecimal: 1B 21 n
Parameters
0≤n≤255
ESC/P Command Reference
Description
Specifies a combination of print modes.
Specifies modes depending on the bit value of n.
When the ESC ! code is used, a combination of multiple print modes can be specified at one time.
Bold, Double width and Italics specified with this command are also valid in Chinese character mode.
The priority order is from Bit 5 to Bit 2.
Bit 0 is available only if Bit 1 is 0.
Selected character styles are canceled, and the characters return to the normal style.
Canceling double width characters cancels both half width and quarter square character in Chinese
character mode and reducing character size in ANK mode.
ASCII: ESC SP n
Decimal: 27 32 n
Hexadecimal: 1B 20 n
Parameters
0≤n≤127
ESC/P Command Reference
Description
Specifies the character spacing.
n indicates the number of dots.
The default setting is 0 dot.
With double-width characters, the character spacing is doubled; with half-width characters, it is halved.
Valid in ANK mode.
- 37 -
5. Control Command Details
ESC X Specify character size
ASCII: ESC X m nL nH
Decimal: 27 88 m nL nH
Hexadecimal: 1B 58 m nL nH
Description
This command is used only to change the size.
ESC/P Command Reference
The character width cannot be specified.
The character size is specified as n=nL+nH*256 dots.
The width and the height are the same.
With bitmap fonts, only n=16, 24, 32, 48, 64, 96, 128, 144, 192, 240, 256, 288, 320, 336 and 384 are valid.
The commands for specifying stretched characters, compressed characters and the character spacing
(SO, ESC W, SI, ESC !, ESC SP) remain available.
Example
For “ABC” at a 24-dot size and “DEF” at a 48-dot size:
Code: ESC X 00h 18h 00h ABC
ESC X 00h 30h 00h DEF FF
Print result: ABCDEF
- 38 -
5. Control Command Details
5.3 Line feed commands
ESC 0 Specify line feed of 1/8 inch
ASCII: ESC 0
Decimal: 27 48
Hexadecimal: 1B 30
Parameters
None
ESC/P Command Reference
Description
Specifies a line feed of 1/8 inch (about 0.32 cm).
Specifies a line feed of 38/300 inch (=38 dots).
ESC 2 Specify line feed of 1/6 inch
ASCII: ESC 2
Decimal: 27 50
Hexadecimal: 1B 32
Parameters
None
Description
Specifies a line feed of 1/6 inch (about 0.42 cm).
Specifies a line feed of 50/300 inch (=50 dots).
- 39 -
5. Control Command Details
ESC 3 Specify minimum line feed
ASCII: ESC 3 n
Decimal: 27 51 n
Hexadecimal: 1B 33 n
Parameters
0≤n≤255
ESC/P Command Reference
Description
Specifies a line feed of n/300 inch per line.
The line feed is specified in 1-dot units.
ESC A Specify line feed of n/60 inch
ASCII: ESC A n
Decimal: 27 65 n
Hexadecimal: 1B 41 n
Parameters
0≤n≤255
Description
Specifies a line feed of n/60 inch.
The line feed is specified in 5-dot units.
- 40 -
5. Control Command Details
5.4 Horizontal movement commands
ESC l Specify left margin
ASCII: ESC l n
Decimal: 27 108 n
Hexadecimal: 1B 6C n
Parameters
0≤n≤255
0≤left margin<right margin
ESC/P Command Reference
Description
The left margin and the right margin use the left edge of the physically printable area as the reference.
The area between the left edge of the physically printable area and the specified number of columns is
specified as an unprinted area. The left margin position is the right edge of the specified column.
(Character width*n)
The setting is in the range 0≤ (character width*n) ≤x. Settings outside that range are ignored. However, x is
a value dependent on the media.
The area between the left edge (first column) to the nth column is specified as an unprinted area.
The position of the left margin is the character width (when this command was specified)*n from the left
edge.
The character width when the margin specified includes the settings for the space between characters,
setting for full size or half size characters. In addition, when a pitch of 10 cpi (=30 dots), 12 cpi (=25 dots)
or 15cpi (=20 dots), compressed characters or double-width characters are specified, that character
width is considered as the unit.
However, character styles that increase the character width are not applied.
Left edge Left margin positionRight margin position
Columns
1 2 3 4 5 6 7 8 9 1011121314 15 16
area
Print areaUnprinted
Left margin setting
Right margin setting
Printable area
Example: Left margin=Column 5; right margin=Column 14
Unprinted
area
- 41 -
5. Control Command Details
ESC/P Command Reference
The horizontal print position is moved to the left margin position.
If the left margin setting is not at the beginning of the line, the left margin is specified after a line feed.
The beginning of the line indicates the left margin position for left alignment; for right and center
alignment, it means that no image or character is entered on the line.
Even if the character width is changed after the left margin has bee specified, the left margin position does
not change.
A left margin setting that puts the left margin position to the right of the right margin position is ignored.
The left margin should be specified at least one column (10 cpi=30 dots) less than the right margin.
(If the character width (when the command was specified)*n is greater than the right margin-30 dots), the
setting is ignored.)
If the difference between the right margin position and the left margin position is less than one character,
that character is ignored.
When proportional pitch is specified with the ESC p command, a character width of 10 cpi (=30 dot) is
applied.
If the print media is continuous length tape, the printing orientation is landscape and the page length is not
specified, commands specifying the left margin are ignored.
If the minimum margin has been set to 3 mm and the printing orientation is landscape, the left margin
ASCII: ESC Q n
Decimal: 27 81 n
Hexadecimal: 1B 51 n
Parameters
1≤n≤255
Left margin<character width (when the command was specified)*n≤printable area
ESC/P Command Reference
Description
The left margin and the right margin use the left edge of the physically printable area as the reference.
The right margin position is the right edge of the specified column. (Character width*n)
The setting is in the range 1≤(character width*n)≤x. Settings outside that range are ignored. However, x is
a value dependent on the media.
Left margin≤print area<right margin
The position of the right margin is the character width (when the command was specified)*n from the left
edge.
The character width when the margin specified includes the settings for the space between characters,
setting for full size or half size characters. In addition, when a pitch of 10 cpi (=30 dots), 12 cpi (=25 dots)
or 15 cpi (=20 dots), compressed characters or double-width characters are specified, that character
width is considered as the unit.
However, character styles that increase the character width are not applied.
The horizontal print position is moved to the left margin position.
If the right margin setting is not at the beginning of the line, the right margin is specified after a line feed.
The beginning of the line indicates the left margin position for left alignment; for right and center
alignment, it means that no image or character is entered on the line.
Even if the character width is changed after the right margin has been specified, the right margin position
does not change.
A right margin setting that puts the right margin position to the left of the left margin position is ignored.
The right margin should be specified at least one column (10 cpi=30 dots) greater than the left margin.
(If the character width (when the command was specified)*n is less than the left margin+30 dots, the
setting is ignored.)
If the difference between the right margin position and the left margin position is less than one character,
that character is ignored.
When proportional pitch is specified with the ESC p command, a character width of 10 cpi (=30 dot) is
applied.
If the print media is continuous length tape, the printing orientation is landscape and the page length is not
specified, commands specifying the right margin are ignored.
If the minimum margin has been set to 3 mm and the printing orientation is landscape, the right margin
increases by 1 mm.
- 43 -
5. Control Command Details
CR Carriage return
ASCII: CR
Decimal: 13
Hexadecimal: 0D
Parameters
None
ESC/P Command Reference
Description
Ends input of a line, and waits for input of the next line.
The next print position becomes the beginning of the next line.
A line feed command immediately after the carriage return is ignored.
Both Auto-canceling double-width characters specified in ANK mode with SO or ESC SO and Chinese
Description
The horizontal tab position is the character width (when the command was specified)*n from the left
margin.
Enter n values in ascending order and end the settings with NUL.
If an n value is smaller than a previous one, tab setting is ended.
Even if the character width is changed after the horizontal tab positions have been specified, the horizontal
tab position settings do not change.
ESC D NUL cancels all horizontal tab positions.
If the left margin is moved, the horizontal tab positions are also moved by the same amount.
Up to 32 horizontal tab positions can be specified. However, horizontal tab positions beyond the right
margin are invalid and only become valid when a change in the right margin setting or left margin setting
moves the print area to include those tab positions.
The character width when the horizontal tabs are specified includes the settings for the space between
characters, setting for full size or half size characters. In addition, when a pitch of 10 cpi, 12 cpi or 15 cpi
compressed characters or double-width characters are specified, that character width is considered as
the unit.
When proportional pitch is specified with ESC p, horizontal tab positions are specified at 10 cpi.
When the printer is turned on, a horizontal tab position is specified every 8 columns at 10 cpi.
Even if the character width is changed before the horizontal tab positions has been specified, the
horizontal tab positions do not change.
Left edge Left margin position Right margin position
Column
1 2 3 4 5 6 7 8 9 101112131415 16
1 2 3 4 5 6 7 8 9
HT code
Unprinted area
Example:
After the left margin is specified as Column 3 and the right margin as Column 15,
horizontal tabs were specified at Column 5 and Column 10, and HT were performed.
Tab positionTab position
10
HT code
Printable area
11
12 13 14
Unprinted area
- 45 -
5. Control Command Details
HT Perform horizontal tab
ASCII: HT
Decimal: 9
Hexadecimal: 09
Parameters
None
ESC/P Command Reference
Description
Moves the horizontal print position to the nearest horizontal tab position to the right of the input position.
If there is no horizontal tab position to the right of the input position, or if the next horizontal tab position is
beyond the right margin, the HT command is ignored.
If underlining is specified, the space between the current position and the next horizontal tab position is not
underlined.
When the printer is turned on, a horizontal tab position is specified every 8 columns at 10 cpi.
Even if the character width is changed before the horizontal tab positions have been specified, the
horizontal tab positions do not change.
This command is available only with left alignment.
Example
To specify horizontal tabs at Column 4, Column 8, and Column 12, and perform horizontal tabs:
Code: ESC D 04h 08h 0Ch 00h
123456789012 CR A HT B HT C HT D FF
Print result: 123456789012
A B C D
Specifies the absolute print position (in dots) for the next data.
An absolute print position specifies the next print position as a number of dots from the left margin.
n1 and n2 indicate the number of dots from the left margin.
(Number of dots=n1+n2*256)
The dot spacing is calculated as 1/300 inch.
The maximum number of dots that can be specified with n1 and n2 depends on the media.
This command is available only with left alignment.
Specifies the horizontal print position (in dots) as a relative position from the current position.
A relative position specifies the next print position as a number of dots from the current position.
n1 and n2 indicate the number of dots from the current position. (Number of dots=n1+n2*256)
The dot spacing is calculated as 1/300 inch.
Left margin position≤horizontal position after moving<right margin position
Horizontal position after moving=n1+n2*256
The specified value for moving to the left is expressed as a two's complement. It is determined by the
following equation.
n1+n2*256=65536-distance actually moved
This command is available only with left alignment.
- 47 -
5. Control Command Details
ESC a Specify alignment
ASCII: ESC a n
Decimal: 27 97 n
Hexadecimal: 1B 61 n
Parameters
0≤n≤3 or “0”≤n≤“3”
ESC/P Command Reference
Description
Prints the subsequent text with the alignment described below, according to the value of n.
n=0 or 48 (“0”): Applies left alignment.
n=1 or 49 (“1”): Applies center alignment.
n=2 or 50 (“2”): Applies right alignment.
n=3 or 51 (“3”): Applies nothing.
The default setting is n=0.
Data is aligned between the left and right margins by entering a CR, LF, and FF code or by buffer printing.
If the alignment setting is not at the beginning of the line, the alignment is specified after a line feed.
The beginning of the line indicates the left margin position for left alignment;
for right and center alignment, it means that no image or character is entered on the line.
HT, ESC \ and ESC $ are ignored when n=1 or n=2.
If the print media is continuous length tape, the printing orientation is landscape and the page length is not
specified, commands specifying alignment are ignored.
- 48 -
5. Control Command Details
5.5 Vertical movement commands
LF Line feed
ASCII: LF
Decimal: 10
Hexadecimal: 0A
Parameters
None
ESC/P Command Reference
Description
Feeds the paper by the amount specified by a line feed command (ESC 0, ESC 2, ESC 3, ESC A).
The print position becomes the beginning of the next line.
The default value is a line feed of 48 dots.
A carriage return immediately after a line feed is ignored.
Both Auto-canceling double-width characters specified in ANK mode with SO or ESC SO and Chinese
character mode with FS SO are canceled.
Same process as CR
FF Page feed
ASCII: FF
Decimal: 12
Hexadecimal: 0C
Parameters
None
Description
Starts the printing.
The previously entered data string of characters and commands is cleared after being printed.
Both Auto-canceling double-width characters specified in ANK mode with SO or ESC SO and Chinese
character mode with FS SO are canceled.
- 49 -
5. Control Command Details
ESC J Forward paper feed
ASCII: ESC J n
Decimal: 27 74 n
Hexadecimal: 1B 4A n
Parameters
0≤n≤255
ESC/P Command Reference
Description
Ends input for the current line and moves the vertical print position forward by n/300 inch (=1 dot).
If the bottom margin setting is exceeded, printing starts.
With left alignment, the print position for the next line becomes the end position of the current line.
(The horizontal position does not move to the left margin.)
With right alignment and center alignment, the horizontal position moves to the beginning of the line.
Both Auto-canceling double-width characters specified in ANK mode with SO or ESC SO and Chinese
character mode with FS SO are canceled.
Abcdefg
ABC
SDFASG
Abcdefg
ABC
SDFASG
Abcdefg
ABC
SDFASG
Left alignment
Center alignment
Right alignment
Example: Performing a forward paper feed after the second line
Description
The vertical tab position is the line feed amount (when this command was specified)*n from the top
margin.
Enter n values in ascending order and end the settings with NUL.
If an n value is smaller than a previous one, tab setting is ended.
Up to 16 vertical tabs can be specified.
ESC B NUL cancels all vertical tab positions.
Use VT to move to the vertical tab position.
When changing vertical tab positions, specify all positions again.
If the top margin is moved, the vertical tab positions are also moved by the same amount.
Even if the line feed amount is changed after the vertical tab positions have been specified, the vertical tab
position settings do not change.
Performing a VT when no vertical tabs have been specified is equal to performing a CR.
- 51 -
5. Control Command Details
A
A
A
VT Perform vertical tab
ASCII: VT
Decimal: 11
Hexadecimal: 0B
Parameters
None
ESC/P Command Reference
Description
Moves the print position to the nearest vertical tab position down from the input position.
The next horizontal print position becomes the beginning of the line.
If the next vertical tab position extends beyond the bottom margin, characters are placed at TOF position
fo the next page.
1
BCD
EfghijkL
Line feed
amount
2
3
VT code
4
5
6
Tab position
7
8
bcdefg
VT code
9
10
11
Tab position
12
13
BCDEFG
VT code
14
15
Tab position
16
aiueo
17
18
Example: Vertical tabs are specified at Lines 6, 11, and 15, and
data is entered while VT are performed.
When all vertical tab positions have been canceled by an initialization or with ESC B NUL, performing VT
is equal to performing CR.
Both Auto-canceling double-width characters specified in ANK mode with SO or ESC SO and Chinese
character mode with FS SO are canceled.
- 52 -
5. Control Command Details
ESC (V Specify absolute vertical position
ASCII: ESC ( V nL nH mL mH
Decimal: 27 40 86 nL nH mL mH
Hexadecimal: 1B 28 56 nL nH mL mH
Parameters
nL=2
nH=0
0≤mL≤255
0≤mH≤127
ESC/P Command Reference
Description
Specifies the vertical print position as an absolute position from the top margin position.
Vertical position=mL+mH*256+top margin
The absolute vertical position is measured from the top margin position when this command was specified.
If a position extending beyond the bottom margin is specified, printing starts.
There is no restriction on the amount of movement back (upward) from the current position.
With left alignment, the print position for the next line becomes the end position of the current line.
(The horizontal position does not move to the left margin.)
With right alignment and center alignment, the horizontal position moves to the beginning of the line.
Both Auto-canceling double-width characters specified in ANK mode with SO or ESC SO and Chinese
character mode with FS SO are canceled.
- 53 -
5. Control Command Details
ESC (v Specify relative vertical position
ASCII: ESC ( v nL nH mL mH
Decimal: 27 40 118 nL nH mL mH
Hexadecimal: 1B 28 76 nL nH mL mH
Parameters
nL=2
nH=0
0≤mL≤255
0≤mH≤127
-16384≤(mL+mH*256)≤16383
ESC/P Command Reference
Description
Specifies the vertical print position* as a relative position from the current position.
Vertical position after movement=mL+mH*256+current position
When moving upwards, the specified value is expressed as a two's complement.
It is determined by the following equation.
mL+mH*256=65536–distance actually moved
Settings moving the print position above the top margin are ignored.
If a position extending beyond the bottom margin is specified, printing starts.
With left alignment, the print position for the next line becomes the end position of the current line.
(The horizontal position does not move to the left margin.)
With right alignment and center alignment, the horizontal position moves to the beginning of the line.
Both Auto-canceling double-width characters specified in ANK mode with SO or ESC SO and Chinese
character mode with FS SO are canceled.
* Print position : The print position is the standard position for printing characters, bitmaps, and barcodes.
Abcdefg
ABC
Abcdefg
ABC
Abcdefg
ABC
SDFASG
SDFASG
Left alignment Center alignment
Example:
Moving to a vertical position specified after the second line
nL=4, nH=0
(tL+tH*256)<(BL+BH*256)
Top margin<bottom margin
ESC/P Command Reference
Description
Specifies settings for the top and bottom margins.
The physically printable area depends on the media.
The top margin and the bottom margin are specified in units of 1/300 inch (=1 dot) using the top edge of
the physically printable area as the reference.
(The left margin and the right margin use the left edge of the physically printable area as the reference.)
Top margin=tL+tH*256
Bottom margin= BL+BH*256
The top margin position is the TOF in the vertical direction.
All previously entered text is cleared.
The character baseline for the first line of text is 24/300 inch (=24 dots) below the top margin.
When this command is used previously specified top and bottom margins are canceled.
A standard unit is not used.
If the print media is continuous length tape, the printing orientation is landscape and the page length is not
specified, commands specifying the page format are ignored.
If the minimum margin has been set to 3 mm and the printing orientation is landscape, both the top and
bottom margins increase by 1 mm.
- 55 -
5. Control Command Details
ESC (C Specify page length
ASCII: ESC ( C nL nH mL mH
Decimal: 27 40 67 nL nH mL mH
Hexadecimal: 1B 28 43 nL nH mL mH
Parameters
nL=2, nH=0
0<(mL+mH*256)<12000
ESC/P Command Reference
Description
Specifies the page length.
The unit is 1/300 inch (=1 dot).
Page length=mL+mH*256
The current paper position is the TOF.
The top and bottom margins are canceled with ESC ( c.
All previously entered text is cleared.
A standard unit is not used.
This command is available only with continuous length tape.
ASCII: ESC U n
Decimal: 27 85 n
Hexadecimal: 1B 55 n
Parameters
2≤n≤3 or “2”≤n≤“3”
ESC/P Command Reference
Description
Specifies the minimum margin amount.
n=2 or 50 (“2”): Specifies a minimum margin of 2 mm.
n=3 or 51 (“3”): Specifies a minimum margin of 3 mm.
Using this command clears all text.
- 57 -
5. Control Command Details
5.7 Printer control commands
ESC @ Initialize
ASCII: ESC @
Decimal: 27 64
Hexadecimal: 1B 40
Parameters
None
ESC/P Command Reference
Description
Returns all commands to their default settings. (See below.)
Item Default
Input buffer Saved
Text buffer Cleared
Print buffer Cleared
Top margin 0 dot
Bottom margin Depends on media
Left margin 0 dot
Right margin Depends on media
Line feed amount 48 dots*
Horizontal tab positions
Horizontal tab every 8 characters (based on a
character width of 10 cpi)*
Vertical tab positions None
Size of ANK characters 32 dots
Space between ANK characters 0 dot
Size of Chinese characters 32 dots
Left margin for full size characters 0 dot
Right margin for full size characters 0 dot
Left margin for half size characters 0 dot
Right margin for half size characters 0 dot
Proportional pitch Canceled*
International character set USA*
Style of ANK characters Canceled
Compressed Canceled
ANK mode/Chinese character mode ANK mode
Vertical writing/Horizontal writing Horizontal writing
Full size/Half size/quarter square characters Full size
Adjustment for half size space Canceled
Styale of Chinese characters Canceled
Horizontal print position Left margin position
Vertical print position Top margin position (TOF position)
Landscape setting Canceled*
Page length setting Canceled*
Cut setting Auto cut (manufacturer’s default)
Minimum margin amount 3 mm*
* May differ depending on the user settings.
- 58 -
5. Control Command Details
5.8 Graphics commands
ESC * Select bit image
ASCII: ESC * m n1 n2 Data
Decimal: 27 42 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
0≤n1≤255, 0≤n2≤11
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
ESC/P Command Reference
Description
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
0 60 dpi 60 dpi6/300 inch 6/300 inch
1 120 dpi 60 dpi3/300 inch 6/300 inch
2 120 dpi 60 dpi3/300 inch 6/300 inch
3 240 dpi 60 dpi2/300 inch 6/300 inch
4 80 dpi 60 dpi4/300 inch 6/300 inch
6 90 dpi 60 dpi4/300 inch 6/300 inch
32 60 dpi 180 dpi6/300 inch 2/300 inch
33 120 dpi 180 dpi3/300 inch 2/300 inch
38 90 dpi 180 dpi4/300 inch 2/300 inch
Horizontal Dot
Resolution
Vertical Dot
Resolution
39 180 dpi 180 dpi2/300 inch 2/300 inch
40 300 dpi 180 dpi1/300 inch 2/300 inch
71 180 dpi 360 dpi2/300 inch 1/300 inch
72 360 dpi 360 dpi1/300 inch 1/300 inch
73 360 dpi 360 dpi1/300 inch 1/300 inch
Horizontally neighboring dots are not omitted.
Limitations:
A maximum of 63 can be used with this command.
- 59 -
5. Control Command Details
y
y
y
y
y
y
When m=0, 1, 2, 3, 4, 6
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
ESC/P Command Reference
B7 B6B5B4B3B2B1B0
Relationship between the image data and the dots
First, the data is lined up in one row as follows:
MSB
1b
te
1b
te
LSB
1b
1b
te
te
…
n1+n2*256 bytes
1b
te
1b
te
One dot of the image data is enlarged as follows, according to the value of m.
m=0 m =1 m =2 m =3 m =4 m =6
As a result, the image is sized depending on the value of m, as follows:
ASCII: ESC K n1 n2 Data
Decimal: 27 75 n1 n2 Data
Hexadecimal: 1B 4B n1 n2 Data
Parameters
0≤n1≤255, 0≤n2≤3
The data contains n1+n2*256 bytes of image data.
ESC/P Command Reference
Description
Specifies that an 8-dot single-density bit image is printed with the number of dot positions indicated by n1 and
n2.
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
B7 B6B5B4B3B2B1B0
Relationship between the image data and the dots
First, the data is lined up in one row as follows:
MSB
1byte
1byte
1byte
1byte
1byte
1byte
…
LSB
n1+n2*256 bytes
One dot of image data is enlarged to 6 dots vertically by 6 dots horizontally.
As a result, the image is 48 dots vertically by (n1+n2*256)*6 dots horizontally.
- 65 -
5. Control Command Details
ESC L 8-dot double-density bit image
ASCII: ESC L n1 n2 Data
Decimal: 27 76 n1 n2 Data
Hexadecimal: 1B 4C n1 n2 Data
Parameters
0≤n1≤255, 0≤n2≤3
The data contains n1+n2*256 bytes of image data.
ESC/P Command Reference
Description
Specifies that an 8-dot double-density bit image is printed with the number of dot positions indicated by n1
and n2.
n1 and n2 are specified in the same way as with ESC K.
First, the data is lined up in one row as follows:
MSB
1byte
1byte
1byte
1byte
1byte
1byte
…
LSB
n1+n2*256 bytes
One dot of image data is enlarged to 6 dots vertically by 3 dots horizontally.
As a result, the image is 48 dots vertically by (n1+n2 *256)*3 dots horizontally.
- 66 -
5. Control Command Details
ESC Y 8-dot double-speed double-density bit image
ASCII: ESC Y n1 n2 Data
Decimal: 27 89 n1 n2 Data
Hexadecimal: 1B 59 n1 n2 Data
Parameters
0≤n1≤255, 0≤n2≤3
The data contains n1+n2*256 bytes of image data.
ESC/P Command Reference
Description
Same as for an 8-dot double-density bit image. Horizontally neighboring dots are not omitted.
ESC Z 8-dot quadruple-density bit image
ASCII: ESC Z n1 n2 Data
Decimal: 27 90 n1 n2 Data
Hexadecimal: 1B 5A n1 n2 Data
Parameters
0≤n1≤255, 0≤n2≤7
The data contains n1+n2*256 bytes of image data.
Description
Specifies that an 8-dot quadruple-density bit image is printed with the number of dot positions indicated by n1
and n2.
n1 and n2 are specified in the same way as with ESC K.
Horizontally neighboring dots are not omitted.
First, the data is lined up in one row as follows:
MSB
LSB
1byte
1byte
1byte
1byte
n1+n2*256 bytes
…
1byte
1byte
One dot of image data is enlarged to 6 dots vertically by 2 dots horizontally.
As a result, the image is 48 dots vertically by (n1+n2*256)*2 dots horizontally.
- 67 -
5. Control Command Details
5.9 Chinese character commands
FS & Specify Chinese character mode
ASCII: FS &
Decimal: 28 38
Hexadecimal: 1C 26
Parameters
None
ESC/P Command Reference
Description
Specifies the Chinese character mode.
Chinese characters are expressed in 2 or 4 bytes. Enter from upper byte to lower byte sequentially.
Chinese character code is based on GB18030-2000.
FS . Cancel Chinese character mode
ASCII: FS .
Decimal: 28 46
Hexadecimal: 1C 2E
Parameters
None
Description
Cancel Chinese character mode.
- 68 -
5. Control Command Details
FS J Specify vertical writing
ASCII: FS J
Decimal: 28 74
Hexadecimal: 1C 4A
Parameters
None
ESC/P Command Reference
Description
All the Chinese characters written after this command are written in vertical writing.
FS K Specify horizontal writing
ASCII: FS K
Decimal: 28 75
Hexadecimal: 1C 4B
Parameters
None
Description
All the Chinese characters written after this commnad are written in horizontal writing.
Default setting is horizontal writing.
- 69 -
5. Control Command Details
FS S Specify size of space for full size characters
Specify size of space for both left and right of full size characters.
Space size for left is specified by "n1" and right is specified by "n2"in dot for each characters.
1dot = 1/300 inch
The default space size for both left and right are 0.
When it comes to double size characters, the size of space also becomes double.
FS T Specify size of space for half size characters
Specify size of space for both left and right of half size characters.
Space size for left is specified by "n1" and right is specified by "n2"in dot for each characters.
1dot = 1/300 inch
The default space size for both left and right are 0.
Size set with this command is applied only for horizontal writing. When it comes to vertical writing, size set
for full size characters is applied.
- 70 -
5. Control Command Details
FS U Space adjustment between half size characters
ASCII: FS U
Decimal: 28 85
Hexadecimal: 1C 55
Parameters
None
ESC/P Command Reference
Description
Add 1dot as adjustment to the right side of space for each half size characters.
1dot = 1/300 inch
Adjustment of size of space between half size characters is canceled by default setting.
FS V Cancel space adjustment between half size characters
ASCII: FS V
Decimal: 28 86
Hexadecimal: 1C 56
Parameters
None
Description
Cancel an adjustment of size of space between half size characters.
This command is valid in default setting.
- 71 -
5. Control Command Details
FS W Select double height and width characters
ASCII: FS W n
Decimal: 28 87 n
Hexadecimal: 1C 57 n
Parameters
n=0, 1 or 48 (“0”), 49 (“1”)
ESC/P Command Reference
Description
Specify/Cancel double height and width characters.
n=1 or 49 (“1”): Specify double height and width characters.
n=0 or 48 (“0”): Cancel double height and width characters.
This command is valid for all the Chinese characters.
Double height and width character has double size of height and double seize of width compared to full
size character.
Feed length is 24/300 inch longert than that of using full size characters.
When canceling double height and width characters, specification for both quarter square characters and
half size characters are aleso canceled.
- 72 -
5. Control Command Details
FS Y Specify Chinese character size
ASCII: FS Y mL mH nL nH pL pH
Decimal: 28 89 mL mH nL nH pL pH
Hexadecimal: 1C 59 mL mH nL nH pL pH
Parameters
Character width: The value of mL and mH is irrelevant.
<Bitmap fonts>
Valid only with:
Character size(vertical):
Character size(horizontal): The value of pL and pH is irrelevant.
The height and width are in the ratio of 1:1. A character size is specified by its height.
This command is used only to change the Chinese character size.
The character size of Chinese character is specified as n=nL+nH*256 dots.
The width and the height are the same.
With bitmap fonts, only n=16, 24, 32, 48, 64, 96, 128, 144, 192, 240, 256, 288, 320, 336 and 384 are valid.
The commands for specifing double width caracters, double height and width characters,half size
characters, quarter square characters, space size of full size characters, space size of half size
characters (SO、ESC W、ESC !、FS !、FS W、FS SI、FS r、FS S、FS T、FS U) remain available.
- 73 -
5. Control Command Details
FS r Specify quarter square characters
ASCII: FS r n
Decimal: 28 86 n
Hexadecimal: 1C 56 n
Parameters
n=0, 1 or 48 (“0”), 49 (“1”)
ESC/P Command Reference
Description
Specify quarter square characters.
All the characters in the Chinese character code matrix are printed as a quarter square character.
"n" specifies the position of a quarter square character.
n=1 or 49 (“1”): Place a superscript.
n=0 or 48 (“0”): Place a subscript.
This command is canceled by either FS S or FS DC2 command.
Space between quarter square characters is same as the one between half size characters.
FT T, FS U or FS V are the command to adjust a size of space for quarter square characters.
- 74 -
5. Control Command Details
FS - Apply Chinese character underlining
ASCII: FS - n
Decimal: 28 45 n
Hexadecimal: 1C 2D n
n=4 or 52 (“4”): Applies underlining with a width of 4 dots.
n=3 or 51 (“3”): Applies underlining with a width of 3 dots.
n=2 or 50 (“2”): Applies underlining with a width of 2 dots.
n=1 or 49 (“1”): Applies underlining with a width of 1 dot.
n=0 or 48 (“0”): Cancels underlining.
This command is valid anywhere in a text line.
The underlining specified by this code is a continuous line.
Spaces between characters and words are also underlined.
Areas with the “specify absolute horizontal position” (ESC $) and “specify relative horizontal position”
(ESC \) commands are not Chinese character underlined.
Bit images and barcodes are not underlined either.
4/300 inch (4 dots) is added to the line feed amount for lines that include underlined characters.
The underline is positioned as follows:
Underline Underline Position
1 dot wide
When horizontal writing: 2/300 inch (second dot) below the characters
When vertical writing: 2/300 inch (second dot) above the characters
2 dots wide
3 dots wide
4 dots wide
When horizontal writing: 2/300 inch (second dot) below the characters Between
2/300 inch (second dot) and 3/300 inch (third dot) below the characters
When vertical writing: 2/300 inch (second dot) above the characters Between
2/300 inch (second dot) and 3/300 inch (third dot) above the characters
When horizontal writing: Between 1/300 inch (first dot) and 3/300 inch (third
dot) below the characters
When vertical writing: Between 1/300 inch (first dot) and 3/300 inch (third dot)
above the characters
When horizontal writing: Between 1/300 inch (first dot) and 4/300 inch (fourth
dot) below the characters
When vertical writing: Between 1/300 inch (first dot) and 4/300 inch (fourth dot)
above the characters
- 75 -
5. Control Command Details
FS ! Global Formatting for Chinese character
ASCII: FS ! n
Decimal: 28 33 n
Hexadecimal: 1C 21 n
Parameters
0≤n≤255
ESC/P Command Reference
Description
Specify Global Format for Chinese character.
Bit 7 6 5 4 3 2 1 0
Subscript
1 Underline Italics
0 Cancel Cancel
quarter
square
Superscript
quarter
square
Quarter
square
Cancel Cancel Cancel Cancel
Double
height
Double width Half width
Vertical
writing
Horizontal
writing
Bit 1 is ignored when both bit 4 and bit 1 are 1.
Bit 6 is ignored when both bit 0 and bit 6 are 1.
Character data is handled sequentially from selecting character(including superscript and subscript),
vertical or horizonatl writing to magnification.
The bit priority is below.
Bit 4 > Bit 3 > Bit1
Bit 4 > Bit 2 > Bit 1
When Bit2 and Bit 3 become 1, the character becomes double height and width same as specifing with FS
W command.
Bit 5 is available only when bit 4 is 1.
FS SI Specify half-width characters
ASCII: FS SI
Decimal: 28 15
Hexadecimal: 1C 0F
Parameters
None
Description
All the Chinese characters written after this command are printed as half size.
Full size characters are printed as half size.
- 76 -
5. Control Command Details
FS DC2 Cancel half-width characters
ASCII: FS DC2
Decimal: 28 18
Hexadecimal: 1C 12
Parameters
None
ESC/P Command Reference
Description
Cancel half size specification by FS SI.
Quarter square character specification by FS r is also canceled with this command.
FS SO Specify auto-canceling double-width character
ASCII: FS SO
Decimal: 28 14
Hexadecimal: 1C 0E
Parameters
None
Description
All the characters written after this command are printed as double size characters. A double size
character is as twice wider as a full size character.
Available for both ANK and Chinese characters.
Canceled by ESC $ or ESC \.
FS DC4 Cancel auto-canceling double-width character
ASCII: FS DC4
Decimal: 28 20
Hexadecimal: 1C 14
Parameters
None
Description
Cancel double character specified ESC SO, SO, FE SO command.
Available for both ANK and Chinese characters.
- 77 -
5. Control Command Details
5.10 Advanced commands
ESC i B Barcode
ASCII: ESC i [Parameters] B or b [Barcode data] Backslash
Decimal: 27 105 [Parameters] 66 or 98 [Barcode data] 92
Hexadecimal: 1B 69 [Parameters] 42 or 62 [Barcode data] 5C
Format: ESC i [Parameters] B or b [Barcode data] [Backslash]
(1) (2) (3) (4)
This must be an even value where 2≤no. of horizontal characters≤20.
characters for RSS
Expanded Stacked)
z
(ratio between thick and
thin bars)
f
(equalize bar lengths)
z0: (3:1)
z1: (2.5:1)
z2: (2:1)
f0: OFF
f1: ON
(A barcode with a large number of stacked rows may be considered out of specifications and
unreadable by the reader.)
- 79 -
5. Control Command Details
ESC/P Command Reference
Note
* For parameter numerals 0–9, both 00h–09h and 30h–39h are recognized.
* For parameter hexadecimals a–f, both 0ah–0fh and 61h–66h are recognized.
* The parameter types a, b, c, d, e and f are recognized even when uppercase.
* The parameter “parentheses deletion” is available only when GS1-128 (UCC/EAN-128) is selected.
* The parameter “ratio between thick and thin bars” is available only when t0, t1 or t9 is selected.
* The parameter “equalize bar lengths” is available only when t5 or t6 is selected.
* If any other type is selected, these parameters are ignored.
* When there is no type command or an invalid type command has been specified, CODE39 is
specified.
* The number of characters that can be entered for each barcode type is as follows:
t0: 1–50 characters (“*” is not included)
t1: 1–64 characters
t5: 7 characters (for EAN-8)
12 characters (for EAN-13)
11 characters (for UPC-A)
t6: 6 characters
t9: 3–64 characters (Must begin and end with A, B, C, or D.)
Lowercase letters “a”, “b”, “c” or “d” can be entered at the beginning or end, but the text that
will be printed are the uppercase letters “A”, “B”, “C” or “D”.
ta: 1–64 characters
tb: 1–64 characters
tc: 3–15 characters (begins with “01”) (except with RSS Expanded)
1–64 numbers or 1–40 letters*
1
ISO646 characters can be printed.
*
(numbers, letters, spaces, !, ”, %, &, ’, (, ), *, +, ,, -, ., /, :, ;, <, =, >, ? and _)
td: 1–64 characters (The full set of ASCII characters can be used.)
te: 5 characters, 9 characters, 11 characters
tf: 2 characters, 5 characters
(2) B or b: Beginning of barcode data
(3) [Barcode data]: Barcode data
? (Generate check digit):
Generates a check digit when “?” is in the barcode data.
1
(for RSS Expanded)
The position of “?” is irrelevant as long as it is within the barcode data.
With POSTNET, CODE93, UPC/EAN EXTENSION, CODE128 and GS1-128(UCC/EAN-128), no
check digit is generated.
If “?” is inserted, it is treated as barcode data.
With only UPC/EAN EXTENSION, the data is printed above the barcode.
Specifies a barcode image.
Any data extending beyond the right margin is ignored.
Since the check digit is generated automatically from the barcode data, the check digit is not sent as
barcode data. Since the length of the barcode data is also checked, the data would not be correctly
recognized if the check digit data was present.
With CODE39, ITF (I-2/5), CODABAR, CODE128, GS1-128 (UCC/EAN-128) or RSS Expanded, the buffer
length for the barcode image is about 22 cm. A barcode longer than 22 cm will not be printed.
The characters that can be printed with CODE128 and GS1-128 (UCC/EAN-128) are the 128 ASCII
characters and the special codes FNC1, FNC2, FNC3 and FNC4.
Codes assigned to the special codes:
FNC1: 86h, FNC2: 81h, FNC3: 80h, FNC4: 84h
The control codes and special codes appear as spaces when characters are printed below CODE128 and
GS1-128 (UCC/EAN-128) barcodes.
The control codes appear as spaces when characters are printed below CODE93 barcodes.
Special code FNC1 can also be printed with RSS Expanded.
This special code also appears as a space when characters are printed below the barcode.
Code assigned to the special code:
FNC1: 86h
The width can be set to extra extra small only with CODE128 and EAN128.
Characters are not printed below the barcode when the width is set to extra extra small.
Example
For barcode type CODE39, with no characters printed below the barcode, a size of large (width) × 480 dots
(height) and a ratio between thick and thin bars of 3:1, the command will be as shown below.
ESC i t0 r0 he0h 01h w3 z0 B 123456789 \
- 81 -
5. Control Command Details
ESC/P Command Reference
ESC i Q 2D barcode (QR Code)
ASCII: ESC i Q or q Data
Decimal: 27 105 81 or 113 Data
Hexadecimal: 1B 69 51 or 71 Data
Format: ESC i Q or q [Parameters] [Barcode data] \\\
(1) (2) (3)
Parameters
(1) [Parameters]
Unlike with 1D barcodes, all parameters must be specified in order, starting from the top.
If a value other than those listed is entered for a parameter, that parameter is specified with its default
value.
High-reliability level: Q 25%
Ultra-high-reliability level: H 30% (*2)
Auto input (default value)
Manual input
Selects whether numbers, English alphanumeric
characters, Chinese characters or binary characters are
entered.
- 82 -
5. Control Command Details
(*1) With Micro QR, the Structured Append setting is invalid, and the default setting is used.
(*2) With Micro QR, error correction level 4 is invalid, and the default setting is used.
What is the QR Code Structured Append setting?
QR Codes have Structured Append settings.
A long character string can be partitioned into 2 to 16 partitions and printed.
With ESC/P commands, it is necessary to enter only the number of partitions.
For example, if the print data is partitioned into 3 partitions, the barcode data is as follows:
ESC i Q or q [1st parameter] [1st set of barcode data] \\\
ESC i Q or q [2nd parameter] [2nd set of barcode data] \\\
ESC i Q or q [3rd parameter] [3rd set of barcode data] \\\
Refer to the following for specifying settings for 3 through 6 in [Parameters].
ESC/P Command Reference
3. Structured append
setting:
This determines whether or not the barcode data is partitioned. If the data is
not partitioned, enter 0.
When not partitioning, the values of 4 (code number), 5 (number of
partitions), and 6 (parity data) are ignored; therefore, enter 0 as a dummy
value for these parameters.
4. Code number: This indicates which number the ESC/P command for that QR Code is.
For example, if it is for the second of four partitions, this is 2; for the fourth
this is 4.
5. Number of partitions: This is the number of partitions.
6. Parity data: This is the value (in bytes) of exclusively OR’ing all the print data (print data
before partition). Entering the same value as for the partitioned QR Code
ESC/P command indicates that these codes are linked.
What is exclusive OR’ing in bytes?
The data is exclusively OR’ed (XOR’ed) in bytes and in order.
For example, putting a character string into hexadecimal gives 31h, 32h, 33h, 34h.
Character OR’ed (XOR’ed) in bytes Results
XOR of 31h and 32h 0011 0001 ^= 0011 0010 0000 0011 (03h)
XOR of 03h and 33h 0000 0011 ^= 0011 0011 0011 0000 (30h)
XOR of 30h and 34h 0011 0000 ^= 0011 0100
Note
If this parity value is incorrect, the correct QR Code is not generated.
- 83 -
0000 0100 (04h)
Therefore, the parity is 04h.
5. Control Command Details
ESC/P Command Reference
Summary
Printing the character string “123456789” with a cell size of 4 dots, Model 2, standard error correction level,
and automatic data input.
(The parity for the character string “123456789” is 31h.)
(2) [Barcode data]: Barcode data
When manual input is selected in 8 (data input method), the barcode data must be preceded with one of
the following single-byte alphanumeric characters.
Barcode
Type
Preceded
Character
Example
Number input N or n ESC i Q [other parameters] 01h N123456789 \\\
Alphanumeric
character input
Chinese character
input
A or a ESC i Q [other parameters] 01h A012345678aBcDe \\\
K or k
ESC i Q [other parameters] 01h K Chinese character input
\\\
ESC i Q [other parameters] 01h B0005#### \\\
Binary character
input
B or b+4-digit
number
With the “4-digit number”, specify the number of binary
characters to actually be entered. For example, if 12 binary
characters are to be entered, specify:
B 0012 (30h, 30h, 31h, 32h)
The number of barcode data characters that can be entered depends on the model type and the input
method.
Model 1 707 English alphanumeric characters, 1167 numbers, 486 binary bytes, 299
Chinese characters
Model 2 4296 English alphanumeric characters, 7089 numbers, 2953 binary bytes, 1817
Chinese characters
Micro QR 21 English alphanumeric characters, 35 numbers, 15 binary bytes, 9 Chinese
characters
Note
The numbers listed above are for an error correction level at a high-density level (L 7%).
If the standard level or higher is set, the number of characters that can be entered may decrease. In
addition, even if the characters are entered with the high-density level (L) specified, the number of
characters that can be entered may decrease due to compression.
- 84 -
5. Control Command Details
(3) \\\: End of barcode
There must be three backslashes to end 2D barcode.
ESC/P Command Reference
Example
Refer to the section “Summary
”.
ESC i P Specify QR Code version
ASCII: ESC i P n
Decimal: 27 105 80 n
Hexadecimal: 1B 69 50 n
Parameters
0≤n≤40
Description
The barcode size can be fixed.
The default value is 0.
The available versions differ depending on the symbol type used.
If a setting other than those listed is specified, the setting returns to its default.
The following settings are available for each symbol type.
Model1 (0–14), Model2 (0–40), MicroQR (0–4)
- 85 -
5. Control Command Details
ESC/P Command Reference
ESC i V 2D barcode (PDF417)
ASCII: ESC i V or v Data
Decimal: 27 105 86 or 118 Data
Hexadecimal: 1B 69 56 or 76 Data
Format: ESC i V or v [Parameters] [Barcode data] \\\
(1) (2) (3)
Parameters
(1) [Parameters]
Unlike with 1D barcodes, all parameters must be specified in order, starting from the top.
If a value other than those listed is entered for a parameter, that parameter is specified with its default
value.
Prints 4 dots per cell side.
Prints 5 dots per cell side.
Prints 6 dots per cell side.
Prints 8 dots per cell side.
Prints 10 dots per cell side.
Standard (default value)
Truncate
MicroPDF417 standard
MicroPDF417 Code128 emulation
Auto input (default value)
Binary input
Level input setting (default value)
Percentage input setting
capacity-type
5. Error correction capacity-value
- Level input [2-byte decimal] 0–8 Specifies the level.
(The default value is 0.)
- Percentage
input
[2-byte decimal] 0–400 Specifies the percentage.
(The default value is 10.)
6. Symbol size
(X direction)
7. Symbol size
(Y direction)
[1-byte decimal] 0
[1-byte decimal] 1–30
*0 and 1–4 with MicroPDF417
[1-byte decimal] 0
[1-byte decimal] 3–90
*0 and 4–44 with MicroPDF417
Auto setting (default value)
Manual settings
Auto setting (default value)
Manual settings
- 86 -
5. Control Command Details
ESC/P Command Reference
8. Aspect
value
[2-byte decimal] 1–1000 Specifies the aspect value.
Actually, this is 0.01–10.0, but since the decimal
point cannot be entered, a value multiplied by 100 is
entered.
The default value is 50. (The actual value is 0.5.)
Note
* If a setting for the symbol size (X direction) or symbol size (Y direction) has been specified
manually, the aspect value setting is ignored.
* If a setting for the symbol size (X direction) or the symbol size (Y direction) has been entered
manually, the bar code may not be printed or an unreadable bar code may be printed.
* If both a large cell size and a high level error correction capacity have been specified, printing
may not be possible due to a full print buffer.
[With symbol type MicroPDF417]
* Since the error correction capacity is automatically determined from the symbol size (X direction)
setting, the settings for “error correction capacity and type” and “error correction capacity-value” are
ignored.
* The aspect value setting is ignored.
* The following table shows the values available for the symbol size (Y direction) according to the
symbol size (X direction) setting. If an invalid setting is specified for the symbol size (Y direction), the
default setting is specified.
Symbol Size
(X Direction)
Symbol Size
(Y Direction)
Auto Auto
1 Auto 11 1417202428
2 Auto 8 11 1417202326
3 Auto 6 8 101215202632 38 44
4 Auto 4 6 8 1012152026 32 3844
(2) Barcode data
The numbers of barcode data characters that can be entered are as follows.
1850 alphanumeric characters, 2710 numbers, 1108 binary bytes
Chinese characters are babel to be used but handled as binary. 1 Chinese character is handled as 2
Bytes data.
Note
The numbers listed above are for an error correction level at the lowest level. If the standard level
or higher is set, the number of characters that can be entered may decrease. In addition, even if
the characters are entered with the lowest level specified, the number of characters that can be
entered may decrease due to compression.
- 87 -
5. Control Command Details
ESC/P Command Reference
[With symbol type MicroPDF417]
Maximum of 250 alphanumeric characters, maximum of 366 numbers, maximum of 150 bytes of binary
data
However, the following table shows the maximum amount of information allowed according to the
settings for symbol size (X direction) and symbol size (Y direction).
There must be three backslashes to end 2D barcodes.
- 88 -
5. Control Command Details
ESC/P Command Reference
ESC i D 2D barcode (DataMatrix)
ASCII: ESC i D or d data
Decimal: 27 105 68 or 100 data
Hexadecimal: 1B 69 44 or 64 data
Format: ESC i D or d [Parameters] [Barcode data] \\\
(1) (2) (3)
Parameters
(1) [Parameters]
Unlike with 1D barcodes, all parameters must be specified in order, starting from the top.
If a value other than those listed is entered for a parameter, that parameter is specified with its default
value.
Vertical no. of cells: 104 cells
Vertical no. of cells: 120 cells
Vertical no. of cells: 132 cells
Vertical no. of cells: 144 cells
[ECC200 rectangular]
Vertical no. of cells: AUTO (default value)
Vertical no. of cells: 8 cells
Vertical no. of cells: 12 cells
Vertical no. of cells: 16 cells
[ECC200 square]
Horizontal no. of cells: Same value as vertical size (x)
[ECC200 rectangular]
(1) When the vertical size is AUTO
Horizontal no. of cells: AUTO (default value)
(2) When the vertical size is 8 cells
Horizontal no. of cells: 18 cells
Horizontal no. of cells: 32 cells
(3) When the vertical size is 12 cells
Horizontal no. of cells: 26 cells
Horizontal no. of cells: 36 cells
[1-byte decimal] 36
[1-byte decimal] 48
(4) When the vertical size is 16 cells
Horizontal no. of cells: 36 cells
Horizontal no. of cells: 48 cells
5. Reserved [1-byte decimal]×5 0 5 bytes of dummy data (0) is sent.
Note
* If the vertical size is specified as a value other than those listed for ECC200 square, the AUTO
setting is selected. If the horizontal size is specified as a value different from the vertical size, the
setting is changed to the same value as the horizontal size.
* If the vertical or horizontal size for ECC200 rectangular is specified as a value other than those
listed, the AUTO setting is selected.
(2) [Barcode data]: Barcode data
The maximum number of barcode data characters that can be entered is listed below.
2335 alphanumeric characters, 3116 numbers, 1556 bytes of binary data
Note
The numbers of characters that can be entered (as listed above) are for the maximum vertical ×
horizontal cell settings (144 cells × 144 cells). The number of characters that can be entered may
decrease, depending on the specified settings.
- 90 -
5. Control Command Details
(3) \\\: End of barcode
There must be three backslashes to end 2D barcodes.
ESC/P Command Reference
Example
For data “12345” with symbol type ECC square at 40 × 40 with a 3-dot cell size, the command will be as
shown below.
ESC i D 03h 00h 28h(40d) 28h 00h 00h 00h 00h 00h “12345” \\\
- 91 -
5. Control Command Details
ESC/P Command Reference
ESC i M 2D barcode (MaxiCode)
ASCII: ESC i M or m data
Decimal: 27 105 77 or 109 data
Hexadecimal: 1B 69 4D or 6D data
Format: ESC i M or m [Parameters] \ [Barcode data] \\\
(1) (2) (3) (4)
Parameters
(1) [Parameters]
If a value other than those listed is entered for a parameter, that parameter is specified with its default
value.
The number of barcode data characters that can be entered is listed below.
Maximum Amount of Information Allowed
Symbol Type
Alphanumeric Characters Numbers
Standard 93 138
Full EEC 77 113
Structured carrier message 84 126
Note
The numbers of characters that can be entered (as listed above) are for when using only the
common character set (code set A in the MaxiCode specifications). The number of characters that
can be entered may decrease, depending on the characters that are used.
- 92 -
5. Control Command Details
ESC/P Command Reference
When the symbol type is the structured carrier message, the service class, country code and postal
code can be specified separately from the normal data. Specify each value, separated by a backslash
and comma (\,), immediately before the normal data.
When “\,” is not used three times, the data is written as shown in the following example.
<data1>\,<data2>\,<normal_barcode_data>
Service class=default value
Country code
Postal code
If a value other than those listed is entered for a parameter, that parameter is specified with its default
value.
Postal code 9 or less numbers, or
6 or less alphanumeric characters
Ignored when not structured carrier message.
Default value: 000000000
Country code 3 or less numbers Ignored when not structured carrier message.
Default value: 000
Service class 3 or less numbers Ignored when not structured carrier message.
Default value: 000
Note
If the postal code is specified as alphanumeric characters, characters other than those listed
below are invalid.
A to Z “ # $ % & ‘ ( ) * + , - . / 0 to 9 :
However, lowercase letters (a to z) are converted to the valid uppercase letters (A to Z).
(4) \\\: End of barcode
There must be three backslashes to end 2D barcodes.
- 93 -
5. Control Command Details
ESC i F Print downloaded data
ASCII: ESC i F P n
Decimal: 27 105 70 80 n
Hexadecimal: 1B 69 46 50 n
Parameters
n: file header index
0≤n≤98
ESC/P Command Reference
Description
Expands downloaded data in the print buffer as image data.
Expands downloaded image data from the print position.
If there is no image data, this command is ignored.
Must be
downloaded
beforehand
This printer PC
Abcdefg
Image file
(.bmp)
ABCDEFG
HIJK
Example: Combination of text and downloaded image
- 94 -
5. Control Command Details
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.