Brother TD-4100N User Manual

©Copyright 2010 BROT
HER INDUSTRIES, LTD.
Version 1.20
Model Name Specifications
Study: TD-4000/4100N
<Written By> Brother Industries, Ltd.
1
Machine Model: TD-4000/TD-4100N
IMPORTANT - PLEASE READ CAREFULLY
This documentation (“Documentation”) gives you information that will assist you in controlling
your Machine Model.
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 Machine 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 redistribution 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 Machine 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, 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.
2
[Contents]
Control Code List ................................................................................................................7
Print area...........................................................................................................................10
Characters ......................................................................................................................... 12
Print position.....................................................................................................................15
Line feed amount...............................................................................................................17
Document creation flow ....................................................................................................18
Control command details ..................................................................................................20
.......................................................................20 Character/style selection commands
ESC R Select international character set ..........................................................20
ESC q Select character style ..............................................................................21
ESC k Select font ................................................................................................22
ESC t Select character code table ......................................................................22
...........................................................................................23 Text printing commands
ESC 4 Apply italic style......................................................................................23
ESC 5 Cancel italic style ....................................................................................23
ESC E Apply bold style.......................................................................................24
ESC F Cancel bold style .....................................................................................24
ESC G Apply double-strike printing ..................................................................25
ESC H Cancel double-strike printing ................................................................25
ESC P Specify pica pitch.....................................................................................26
ESC M Specify elite pitch ...................................................................................27
ESC g Specify micron pitch ................................................................................28
ESC p Specify proportional characters ..............................................................29
ESC W Specify double width characters............................................................ 30
SO Specify auto-cancelling enlarged characters................................................31
ESC SO Specify auto-cancelling enlarged characters .......................................31
SI Specify reduced characters ............................................................................32
ESC SI Specify reduced characters.................................................................... 32
DC2 Cancel reduced characters .........................................................................32
DC 4 Cancel auto-cancelling double-width characters......................................33
ESC – Applies/cancels underlining ....................................................................34
ESC ! Global formatting .....................................................................................36
ESC SP Specify character spacing .....................................................................37
ESC X Specify character size..............................................................................38
3
................................................................................................39 Line feed commands
ESC 0 Specify line feed of 1/8 inch..................................................................... 39
ESC 2 Specify line feed of 1/6 inch..................................................................... 39
ESC 3 Specify minimum line feed......................................................................39
ESC A Specify line feed of n/60 inch................................................................... 40
..............................................................41 Horizontal direction movement commands
ESC l Specify left margin ...................................................................................41
ESC Q Specify right margin...............................................................................44
CR Carriage return............................................................................................. 46
ESC D Specify horizontal tab position............................................................... 47
HT Apply horizontal tab.....................................................................................48
ESC $ Specify absolute horizontal position .......................................................49
ESC \ Specify relative horizontal position ........................................................49
ESC a Specify alignment ....................................................................................50
.................................................................................51 Vertical movement commands
LF Line feed ........................................................................................................ 51
FF Page feed........................................................................................................ 51
ESC J Forward paper feed .................................................................................52
ESC B Specify vertical tab position ...................................................................53
VT Apply vertical tab..........................................................................................54
ESC (V Specify absolute vertical position.......................................................... 55
ESC (v Specify relative vertical position............................................................56
......................................................................................................57 Paper formatting
ESC (c Specify page format ................................................................................57
ESC (C Specify page length................................................................................ 58
........................................................................................59 Printer control commands
ESC @ Initialize .................................................................................................. 59
................................................................................................60 Graphics commands
ESC * Select bit image........................................................................................60
ESC K 8-dot standard-density bit image ...........................................................65
ESC L 8-dot double-density bit image................................................................67
ESC Y 8-dot double-speed double-density bit image.........................................68
ESC Z 8-dot quadruple-density bit image.......................................................... 68
...............................................................................................69 Advanced commands
ESC i B Bar code................................................................................................. 69
ESC i Q 2D Bar code QR codes........................................................................... 73
ESC i P QR code version setting ........................................................................76
4
ESC i V 2D bar code PDF417 .............................................................................77
ESC i D 2D bar code DataMatrix control...........................................................80
ESC i M 2D bar code MaxiCode control............................................................. 83
ESC i F Print downloaded data..........................................................................85
ESC i a Switch command mode.......................................................................... 89
ESC i S Request printer status .......................................................................... 90
ESC i L Select landscape orientation.................................................................92
ESC i C Specify cutting.......................................................................................93
ESC iXQ2 Select default character style ...........................................................94
ESC iXQ1 Retrieve default character style ....................................................... 95
ESC iXk2 Select default font..............................................................................96
ESC iXk1 Retrieve default font..........................................................................97
ESC iXX2 Specify default character size ........................................................... 98
ESC iXX1 Retrieve default character size .........................................................99
ESC iX32 Specify default line feed................................................................... 100
ESC iX31 Retrieve default line feed.................................................................101
ESC iXA2 Select default alignment .................................................................102
ESC iXA1 Retrieve default alignment .............................................................103
ESC iX(2 Specify default page length ..............................................................104
ESC iX(1 Retrieve default page length ............................................................ 105
ESC iXL2 Select default landscape orientation...............................................106
ESC iXL1 Retrieve default landscape orientation...........................................107
ESC iXj2 Select default international
ESC iXj1 Retrieve default international character set ................................... 109
ESC iXm2 Select default character code table ................................................110
ESC iXm1 Retrieve default character code table ............................................ 111
..................................................................................................... 112 Character codes
Standard character code table Eastern European character code table (W Western European character code table (W
International character set............................................................................... 115
character set .......................................108
for ESC/P codes............................................... 112
indows-1250) ............................... 113
indows 1252) ............................... 114
5
Introduction
This material provides the necessary information for directly controlling TD-4000/4100N.
This information is provided assuming that the user has full understanding of the operating
system being used and basic mastery of RS-232C, USB or Ethernet 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
TD-4000/4100N, 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.
These ESC/P
commands have been adapted specifically for this company.
6

Control Code List

Character/style selection
ESC R 1B 52 Select international character set ESC q 1B 71 Select character style ESC k 1B 6B Select font ESC t 1B 74 Select character code table
Text printing
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 ESC P 1B 50 Specify pica pitch (10 cpi) ESC M 1B 4D Specify elite pitch (12 cpi) ESC g 1B 67 Specify micron pitch ESC p 1B 70 Specify proportional characters ESC W 1B 57 Specify double-width characters SO 0E Specify auto-cancelling enlarged characters ESC SO 1B 0E Specify auto-cancelling enlarged characters SI 0F Specify reduced characters ESC SI 1B 0F Specify reduced characters DC2 12 Cancel reduced characters DC4 14 Cancel auto-cancelling double-width characters ESC - 1B 2D Apply/cancel underlining ESC ! 1B 21 Global formatting ESC SP 1B 20 Specify character spacing ESC X 1B 58 Specify character size
Line feeds
ESC 0 1B 30 Specify line feed of 1/8 inch ESC 2 1B 32 Specify line feed of 1/6 inch ESC 3 1B 33 Specify minimum line feed. ESC A 1B 41 Specify line feed of n/60 inch
7
Horizont
ESC l 1B 6C Specify left margin. ESC Q 1B 51 Specify right margin. CR 0D Carriage return ESC D 1B 44 Specify horizontal tab position HT 09 Apply horizontal tab ESC $ 1B 24 Specify absolute horizontal position ESC \ 1B 5C Specify relative horizontal position ESC a 1B 61 Specify alignment
Vertical movement
LF 0A Line feed FF 0C Page feed ESC J 1B 4A Forward paper feed ESC B 1B 42 Specify vertical tab position VT 0B Apply vertical tab ESC ( V 1B 28 56 Specify absolute vertical position. ESC ( v 1B 28 76 Specify relative vertical position.
al direction movement
Paper formatting
ESC ( c 1B 28 63 Specify page format. ESC ( C 1B 28 43 Specify page length
Printer control
ESC @ 1B 40 Defaults
Graphic commands
ESC * 1B 2A Select a bit image. ESC K 1B 4B 8-dot single-density bit image ESC L 1B 4C 8-dot double-density bit image ESC Y 1B 59 8-dot double-speed double-density bit image ESC Z 1B 5A 8-dot quadruple-density bit image
8
Advanced co
ESC i B 1B 69 42 Bar code ESC i Q 1B 69 51 2D bar code QR codes ESC i P 1B 69 50 QR code version setting ESC i V 1B 69 56 2D bar codes PDF417 ESC i D 1B 69 44 2D bar code data matrix ESC i M 1B 69 4D 2D bar code MaxiCode ESC i F 1B 69 46 Print downloaded data ESC i a 1B 69 61 Switch command mode ESC i S 1B 69 53 Request printer status ESC i L 1B 69 4C Select landscape orientation ESC i C 1B 69 43 Specify cutting
Advanced static commands
ESC iXQ2 1B 69 58 51 32 Select default character style ESC iXQ1 1B 69 58 51 31 Retrieve default character style ESC iXk2 1B 69 58 6B 32 Select default font ESC iXk1 1B 69 58 6B 31 Retrieve default font ESC iXX2 1B 69 58 58 32 Specify default character size ESC iXX1 1B 69 58 58 31 Retrieve default character size ESC iX32 1B 69 58 33 32 Specify default line feed ESC iX31 1B 69 58 33 31 Retrieve default line feed ESC iXA2 1B 69 58 41 32 Select default alignment ESC iXA1 1B 69 58 41 31 Retrieve default alignment ESC iX(2 1B 69 58 28 32 Specify default page length ESC iX(1 1B 69 58 28 31 Retrieve default page length ESC iXL2 1B 69 58 4C 32 Select default landscape orientation ESC iXL1 1B 69 58 4C 31 Retrieve default landscape orientation ESC iXj2 1B 69 58 6A 32 Select default international character set ESC iXj1 1B 69 58 6A 31 Retrieve default international character set ESC iXm2 1B 69 58 6D 32 Select default character code table ESC iXm1 1B 69 58 6D 31 Retrieve default character code table
mmands
9

Print area

The printing media are die-cut labels and continuous length label.
The area that can physically be printed on depends on the size and type of the print media.
<<Die-cut>>
Left margin
Right margin
Top margin
Unprintable area
nted area
Unpri
Print area
Bottom margin
Top margin position (TOF position)
Unprintable area
10
Below are th
p
g
e print areas for each media
Print area
1
Label width
7
Height of
rintable ran
e
○5Left margin
1
RD 51mm×26mm
2
RD 76mm×26mm
3
RD 102mm×50mm
4
RD 102mm×152mm
5
RD 102mm
The maximum length of continuous length label is 1 meter.
2
Label length
3
Top margin
○9Label spacing
Thermal head
No.1296
Printable range
4
Bottom margin
○8Length of printable range
Media ID.
01A6 50.8mm 25.6mm 1.5mm 3mm 47.8mm 19.6mm 3.0mm 677 ~ 1240
01A5 76.2mm 25.6mm 1.5mm 3mm 73.2mm 19.6mm 3.0mm 377 ~ 1240
01A3 101.6mm 49.9mm 1.5mm 3mm 98.6mm 43.9mm 3.0mm 77 ~ 1240
01A4 101.6mm 152.4mm 1.5mm 3mm 98.6mm 146.4mm 6.3mm 77 ~ 1240
019F 101.6mm - 1.5mm 3mm 98.6mm - - 77 ~ 1240
○1 ○2 ○3○4 ○5○
6
Right margin
6
○7 ○8 ○9
No.001
Drive head No..
11

Characters

This system uses single-byte character codes and is installed with five bit-map fonts
(Brougham, Letter Gothic bold, Brussels, Helsinki, and San Diego), and 3 out-line fonts
(Letter Gothic, Brussels and Helsinki).
Fixed pitch or proportional pitch (PS pitch) can be specified for any of the fonts.
However, there are fonts that are better with a fixed pitch and fonts that are better with a
proportional pitch (PS pitch).
Fixed pitch fonts are: Brougham, Letter Gothic and Letter Gothic Bold.
Proportional pitch fonts are: Brussels, Helsinki, and San Diego.
Each bit-map font has three sizes: 24 dots, 32 dots, and 48 dots.
Each out-line font has 22 sizes: 33 dots-400 dots.
12
Character sizes
Each font is available in full size, reduced size (half width), double width, double height and
half width, double height, and quadruple size.
Full size
Half wid
th
Double width
Double height and half width
Double height
Quadruple size
The actual
character size is slightly smaller than the nominal size (the parameter value
received with the size command). (This varies depending on the font.)
Nominal (dots)
Height (dots) Width (dots)
24 32 48
21 28 44
11 16 26
The above example is for Brougham (full size, no character styles applied)
The line-drawing characters (┘└ ┤─ ┐┌ , etc.) and shaded characters have the
Brougham font applied regardless of the specified font and pitch setting (proportional or
fixed).
13
Pitch
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.
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.
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.
Fixed spacing
Variable spacing
Variable spacing
Fixed spacing
Fixed spacing
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.
14
Variable spacing
Fixed spacing

Print position

A
p
A
The print position is the standard position for printing characters, bitmaps, and bar codes.
There is a horizontal print position and vertical print position, which are the reference points
for vertical position movement and horizontal position movement.
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.
Print position
All
characters on a single line are printed at baseline positions that are the same for each
character.
When characters of different heights are mixed together, they are aligned with the baseline
of the tallest character on the line.
Underlin
A
es are drawn 4 dots below the baseline position.
Baseline position
Print
osition
A
Baseline position
15
Bitmap
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.
Same line
Characters and images are considered to be on the same line, even if tabs are inserted.
Horizont
s, bar codes, downloaded images
al 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.
16

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 set with ESC 0, ESC 2, ESC A, and ESC 3.
Within the same 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 on that line becomes the line height.
If there is underlining, 4 dots are added to the line height.
If the line height is greater than the set line feed amount, the line height is used as the
actual line feed amount.
In this way, even if the set for line feed amount is small, the upper and lower lines will not
overlap.
Line feed amount
17

Document creation flow

Below is an explanation of the flow for creating documents.
A Switch command mode (ESC i a) Initialize (ESC @)
B Format Settings
1. Select landscape orientation (ESC i L)
2. Specify page length (ESC ( C)
3. Specify print area
Specify page format (ESC ( c)
Left/right margins (ESC I, ESC Q)
4. Specify line feed amount (ESC 0, ESC 2, ESC 3, ESC A)
5. Specify tab positions
Specify horizontal tab position (ESC D)
Specify vertical tab position (ESC B)
C Print Operations
1. Specify print position
Specify vertical position (ESC ( v, ESC ( V, VT, ESC J)
Specify horizontal position (ESC $, ESC \, HT, ESC a)
2. Transfer print data (one line)
Transfer necessary text operation codes (see D), bit images, bar codes, and
3. End of line, feed paper (CR, LF)
4. Repeat 1–3 above.
5. End of page, specify cutting (ESC i C), feed page (FF)
6. Repeat 1–6 above.
7. End of document
ddd
downloaded data (see E).
18
D Text operations
1. Specify character set
Select font (ESC k)
Select character code (ESC t)
Select international character set (ESC R)
Specify character size (ESC X)
Character spacing (ESC P, ESC M, ESC g, ESC SP)
2. Character style (ESC 4, ESC 5, ESC E, ESC F, ESC G,
3. Character code
Repeat 1–3 above as necessary.
ESC H, ESC W, SO, ESC SO, SI, ESC SI
DC2, DC4, ESC -, ESC !)
E Bit image (ESC *, ESC K, ESC L, ESC Y, ESC Z)
Bar code (ESC i B)
2D bar code (ESC i Q, ESC i V, ESC i D, ESC i M)
Downloaded data (ESC i F)
Downloaded image data must first be downloaded and saved on the main
unit.
19

Control command details

Character/style selection commands

ESC R Select international character set

[ASCII] ESC R n
[Decimal] 27 82 n
[Hexadecimal] 1B 52 n [Parameters] 0 ≤ n ≤ 13,64
[Description]
Selects the international character set and changes 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
n=5: Sweden
n=6: Italy
n=7: Spain
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
The following 12 codes are changed.
23h,24h,40h,5Bh,5Ch,5Dh,
5Eh, 60h, 7Bh, 7Ch, 7Dh, 7Eh
The default setting is n = 0 (U.S.A.)
[Example]
Code
5Ch ESC R 08h 5Ch FF
Print result
\ ¥
20

ESC q Select character style

[ASCII] ESC q n
[Decimal] 27 113 n
[Hexadecimal] 1B 71 n [Parameters] 0 ≤ n ≤ 3
[Description]
Selects the character style.
n=0: Cancel (normal characters)
n=1: Outline
n=2: Shadow
n=3: Shadow and outline
[Example]
Code
ABC ESC q 02h ABC ESC q 00h ABC FF
Print result
ABC
ABC
A
C
B
21

ESC k Select font

[ASCII] ESC k n
[Decimal] 27 107 n
[Hexadecimal] 1B 6B n [Parameters] 0 ≤ n ≤ 4, 9 ≤ n ≤ 11
[Description]
Selects the font.
<Bit-map fonts>
n=0 ···Brougham (fixed pitch)
n=1 ···Letter Gothic bold (fixed pitch)
n=2 ···Brussels (proportional pitch)
n=3 ···Helsinki (proportional pitch)
n=4 ···San Diego (proportional pitch)
<Out-line fonts>
n=9 ···Letter Gothic(fixed pitch)
n=10 ···Brussels(proportional pitch)
n=11 ··· Helsinki(proportional pitch)
The default value is n=0 Brougham (fixed pitch).
In case font is changed from bit-map fonts to out-line fonts, character size is changed to
default setting(42dots).
In case font is changed from out-line fonts to bit-map fonts, character size is changed to
default setting(32dots).

ESC t Select character code table

[ASCII] ESC t n
[Decimal] 27 116 n
[Hexadecimal] 1B 74 n
[Parameters] n=0,1,2
[Description]
From the three built-in character code tables, selects the character code table used.
n=0: Standard character code table
n=1: Eastern European character code table
n=2: Western European character code table
n=3: (Spare)
The default setting is n = 0.
22

Text printing commands

ESC 4 Apply italic style

[ASCII] ESC 4
[Decimal] 27 52
[Hexadecimal] 1B 34
[Parameters] None
[Description]
Applies italic character style.
This command is valid anywhere in a text line.

ESC 5 Cancel italic style

[ASCII] ESC 5
[Decimal] 27 53
[Hexadecimal] 1B 35
[Parameter] None
[Description]
Cancels italic character style.
This command is valid anywhere in a text line.
[Example]
Code
ABC ESC 4 DEF ESC 5 GHI FF
Print result
ABCDEFGHI
23

ESC E Apply bold style

[ASCII] ESC E
[Decimal] 27 69
[Hexadecimal] 1B 45
[Parameters] None
[Description]
Prints subsequent print data bold.
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.
[Example]
Code
ABC ESC E DEF ESC F GHI FF
Print result
ABCDEFGHI
24

ESC G Apply double-strike printing

[ASCII] ESC G
[Decimal] 27 71
[Hexadecimal] 1B 47
[Parameters] None
[Description]
Prints subsequent print data bold.
This command is valid anywhere in a text line.

ESC H Cancel double-strike printing

[ASCII] ESC H
[Decimal] 27 72
[Hexadecimal] 1B 48
[Parameters] None
[Description]
Cancels bold style.
This command is valid anywhere in a text line.
[Example]
Code
ABC ESC G DEF ESC H GHI FF
Print result
ABCDEFGHI
25

ESC P Specify pica pitch

[ASCII] ESC P
[Decimal] 27 80
[Hexadecimal] 1B 50
[Parameters] None
[Description]
Prints subsequent data with 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 set to 30 minus the
character width.
If the character width exceeds 30 dots, the character spacing is set to the character
width. (The space 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 cut in half (15 dots).
When the character spacing is changed with ESC SP, the setting is updated.
This command is invalid when proportional pitch is selected.
In out-line fonts, the space between character is 0 dot.
Setting (dots)
Width (dots)
Brougham Letter Gothic bold Brussels Helsinki San Diego
Full width Double width Half width
24 32 48 24 32 48 24 32 48
11 16 26 22 32 52 6 8 13
10 14 22 20 28 44 5 7 11
25 35 56 50 70 112 13 18 28
21 28 44 42 56 88 11 14 22
24 35 57 48 70 114 12 18 29
The above table refers to characters with a fixed pitch. (Applying styles may
increase the size.)
[Example] For a 24-dot font at full width
Full width Double width
24 dots
48 dots
6 dots
26
12 dots

ESC M Specify elite pitch

[ASCII] ESC M
[Decimal] 27 77
[Hexadecimal] 1B 4D
[Parameters] None
[Description]
Prints subsequent data with elite pitch (12 characters/inch).
Character width is 25 dots (=300 dots/12 characters).
If the character width is 25 dots or less, the character spacing is set to 25 minus the
character width.
If the character width exceeds 25 dots, character spacing is set to character width.
(Character spacing is 0 dot.)
In this case, the pitch does not exactly equal the pica pitch.
With double-width characters, the character spacing is doubled (50 dots).
With half-width characters, the character spacing is reduced to 13 dots.
When the character spacing is changed with ESC SP, the setting is updated.
This command is invalid when proportional pitch is selected.
In out-line fonts, the space between character is 0 dot.
[Example] For a 24-dot font at full width
Full width Double width
24 dots
A B
48 dots
A B
1 dots
2 dots
27

ESC g Specify micron pitch

[ASCII] ESC g
[Decimal] 27 103
[Hexadecimal] 1B 67
[Parameters] None
[Description]
Prints subsequent data with micron pitch (15 characters/inch).
Character spacing is 20 dots (=300dots/15 characters).
If the character width is 20 dots or less, character spacing is set to 20 minus the
character width.
If the character width exceeds 20 dots, character spacing is set to character width. (The
character spacing 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 reduced to 10 dots.
When the character spacing is changed with ESC SP, the setting is updated.
This command is invalid when proportional pitch is selected.
In out-line fonts, the space between character is 0 dot.
[Example] For an 11-dot font at full width
Full width Double width
11 dots
A B
22 dots
A B
9 dots
18 dots
28

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”)
[Description]
Specifies proportional characters.
n=1 or 49(“1”) applies proportional characters.
n=0 or 48(“0”) cancels proportional characters.
When proportional characters are specified, the character spacing set with ESC SP is
retained as is.
29

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 code is not cancelled with the DC4 or FS
DC4 code or line feed.
Canceling double width characters mode will also cancel half width mode.
[Example]
Code
ABC ESC W 1 ABC ESC W 0 ABC FF
Print result
ABC
ABC
ABC
30
Loading...
+ 85 hidden pages