ESC/POS Command Specifications 2-2
2-3 Expanding Print Data to the Print Region
The following are performed when expanding print data to the print region.
(1) The print region is set by ESCW, ESCW sets the left side as the print region origin (X0, y0) at the point all
operations for previous printings and paper feeds are completed received by the printer. The square shape
formed by the two sides of the dx pitch in the X direction (horizontal direction) including the origin and the dy pitch
in the Y direction (vertical direction) from the origin (x0, y0) is the print region (When ESCW is not set, the initial
value is the print region).
(2) If the print region is set by ESCW and print direction is set by ESCT, the point A in the figure 2.3.1 is the initial
value and print data expands to the print region when the printer receives the print data. In the case of characters,
this starting point is the base line. Download bit images and bar codes are expanded for the top of the base line
using the lower left point of the image data as the base line (Fig. 2.3.2 Point B) However, the HRI characters that
come below the bar codes are printed below the base line. When trying to expand characters that are taller than
standard characters (double-tall characters) or download bit images, the portion that is beyond the height of
standard characters is not printed.
(3) If print data is outside of the print region (including the space right of the character) before receiving the
commands (LF, ESCJ, etc.) accompanying a line feed, a line feed is automatically performed in the print region
and the expanding position of the print data is moved one line and the next expansion position becomes the head
of the line. The line feed amount is the line feed amount set by ESC2 and ESC3.
(4) The initial value of the line feed amount when using basic calculated pitch correction of 180 DPI is 4.23 mm (1/6
inch). This is equivalent to 33 dots. Therefore, when using expanded characters that are beyond the double-tall
size in the vertical direction in the next line of print data, download bit images that are larger than two lines or bar
codes that are taller than characters, the line amount will be insufficient and the upper dots of the characters in the
next print data will overlap, so the amount of line feed must be increased. The line feed amount of the first line in
the example below must be more than 28 dots (Fig. 3.12.4).
<Ex.> When printing a download bit image for 6 bytes in the vertical direction:
(Vertical dot count (8 x 6) – Starting line feed amount (20)) x Basic calculated pitch conversion in the vertical direction
(360/180) = 56
Therefore, the line feed must be 56 pitches (28 dots) in excess.
ESCW, xL, xH, yL, yH, dxL, dxH, dyL, dyH
ESCTn
ESC354 ← Additional line feed amount
LF
GS/1
ESC2 ← Returns to a line feed amount of 4.23 mm (1/6 inch)
Note: The basic calculated pitch is 1/180 horizontally and 1/360 vertically with default, so a differences is
generated with the position specification according to the print direction. By setting the basic
calculated pitch in the vertical direction to 1/180 using a command (GSP), a difference will not be
generated by print direction.
STAR The page print region setting, print data expansion position, line feed, position movement amount in
the page mode are affected by the basic calculated pitch correction using the DIP switches.
For details, see the command details for GSP (basic calculated pitch specification) and ESCW (print
region setting command).