Layout Commands

This section describes all commands that affect the layout of text in terms of spacing and margins. These are advanced features that are not commonly by most users.


Right Side Character Spacing - $1B $20 rel

Sets the right-side character spacing to [n × (horizontal or vertical motion unit)].

Format:

Hex       $1B $20 n

ASCII     ESC SP n

Decimal   27  32 n

Notes:
  • Settings that exceed the printable area are ignored.
  • The maximum right side character spacing is 255/204 inches.
  • The horizontal (perpendicular to paper feed) motion unit is used.
  • The horizontal and vertical motion units are specified by Motion Units. Changing the horizontal or vertical motion unit does not affect the current right-side character spacing.
  • Right-Side character spacing is effective until it is changed, Initialize is executed, the printer is reset, or the power is turned off.
  • When underline mode is turned on, the right side character spacing is underlined.
  • In standard mode, right side character spacing has no effect when characters are rotated 90​°​ or 270​°.
Range:

0 n 255

Default:

0

Related:

Motion Units

Relative Print Position

Example:

None


Line Spacing - $1B $33 rel

Sets the line spacing to [n (vertical or horizontal motion unit)] in inches

Format:

Hex       $1B $33 n

ASCII     ESC 3 n

Decimal   27  51 n

Notes:
  • This command sets the line spacing in standard mode.
  • The vertical and horizontal motion units are specified by Motion Units.
  • Changing the vertical or horizontal motion units does not affect the current line spacing.
  • If the calculation results in a fraction, the decimal portion will be ignored.
  • The vertical motion unit is used.
  • Minimum line spacing = 0.00492 inches (0.125mm)
  • Maximum line spacing = 4 inches (101.6mm)
  • Line spacing is effective until it is changed by another command, Initialize is executed, the printer is reset, or the power is turned off.
Range:

0 n 255

Default:

34 (1/6"), n is base 10

Related:

Motion Units

Line Spacing

Select 1/6” Line Spacing

Select 1/8” Line Spacing

Example:

None


Select 1/6 Inch Line Spacing - $1B $32 rel

Sets the line spacing to 1/6 an inch

Format:

Hex       $1B $32

ASCII     ESC 2

Decimal   27  50

Notes:
  • This command sets the line spacing in standard mode.
  • Line spacing is effective until it is changed by another command, Initialize is executed, the printer is reset, or the power is turned off.
Range:

None

Default:

None

Related:
Example:None

Select 1/8 Inch Line Spacing - $1B $30 rel

Sets the line spacing to 1/8 an inch
Format:

Hex       $1B $30

ASCII     ESC 0

Decimal   27  48

Notes:
  • This command sets the line spacing in standard mode.
  • Line spacing is effective until it is changed by another command, Initialize is executed, the printer is reset, or the power is turned off.
Range:

None

Default:

None

Related:

1/6 inch spacing

Motion Units

Line Spacing

Example:

None


Select Justification - $1B $61 rel phx

Select justification mode

Format:

Hex       $1B $61 n

ASCII     ESC a   n

Decimal   27  97  n

Notes:
  • This command is enabled only when processed at the beginning of a line. (When the current line is empty)
  • This command applies the justification within the area set by Left Margin ​and Print Area Width
  • This command will justify all data in the printing area such as characters, graphics, bit images, barcode and space area set by Horizontal Tab, Absolute and Relative print positions.
  • Settings of this command are effective until ​the Initialize command is executed, the printer is reset, or the power is turned off.
  • When n=0 or 48, left justification is enabled
  • When n=1 or 49, center justification is enabled
  • When n=2 or 50, right justification is enabled
Range:

n=0,1,2,48,49,50

Default:

0

Related:

Left Margin

Print Area Width

Absolute Print Position

Relative Print Position

Horizontal Tab

Example:

justification

Left Margin - $1D $4C rel

Set left margin
Format:

Hex       $1D $4C nL nH

ASCII     GS  L   nL nH

Decimal   27  76  nL nH

Notes:
  • In standard mode, sets the left margin to [(nL + (nH × 256)) × (horizontal motion unit)] from the left edge of the printable area. Uses Two Byte Number Definitions.
  • This command is enabled only when processed at the beginning of a line. (When the current line is empty)
  • This command applies the justification within the area set by Left Margin ​and Print Area Width
  • This command will justify all data in the printing area such as characters, graphics, bit images, bar code and space area set by Horizontal Tab, Absolute and Relative print positions.
  • Settings of this command are effective until Initialize is executed, the printer is reset, or the power is turned off.

leftmargin

Range:

0 nL, nH 255, 0 (nL + (nH × 256))≤ 65535

Default:

nL = 0, nH =0

Related:

Motion Units

Print Area Width

Example:

None


Motion Units - $1D $50 rel

Set horizontal and vertical motion units
Format:

Hex       $1D $50 x   y

ASCII     GS  P   x   y

Decimal   29  80  x   y

Notes:
  • Sets the horizontal and vertical motion units to approximately 25.4/x mm {1/x”} and approximately 25.4/y mm {1/y”}, respectively.
  • When x = 0, the default value of the horizontal motion unit is used.
  • When y = 0, the default value of the vertical motion unit is used.
  • When x > 204, the default value of the horizontal motion unit is used.
  • When y > 204, the default value of the vertical motion unit is used.
  • The horizontal direction is perpendicular to the paper feed direction and the vertical direction is the paper feed direction.
  • The horizontal and vertical motion units indicate the minimum pitch used for calculating the values of related commands
  • In standard mode, the following commands use x or y.
  • If the result is a decimal number, the decimal is ignored.
  • This command does not affect the previously defined values for settings that use the horizontal or vertical motion units.
  • Settings of this command are effective until it is changed, Initialize is executed, the printer is reset, or the power is turned off.
Range:

0 x, y 204

Default:

x = 204, y = 204

Related:

Left Margin

Print Area Width

Example:

None