Esc q specify right margin, Esc q, Specify right margin – Brother RJ-4040 User Manual
Page 48

ESC/P Command Reference
- 42 -
5. Control Command Details
ESC Q
Specify right margin
ASCII: ESC
Q
n
Decimal: 27
81
n
Hexadecimal: 1B
51
n
Parameters
1≤n≤255
Left margin 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 0≤(character width*n)≤x. Settings outside that range are ignored. However, x is a value dependent on the media. Left margin≤print area 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 is specified includes the settings for the character spacing, full-width character spacing or half-width character spacing. In addition, when a pitch of 10 cpi (=20 dots) or 12 cpi (=16 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=20 dots) greater than the left margin. (If the character width (when the command was specified)*n is less than the left margin+20 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 (=20 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.