A printer command escape sequence always begins with the escape character (ESC).
The escape sequence is a command that tells the printer to perform a certain function.
It consists of an ESC code (27 decimal or 1B hexadecimal) followed by one or more
printable characters (48 through 126 decimal, 30 through 7E hexadecimal).
Most escape sequence printer commands consist of the ESC code followed by a
character (within the range of 33 through 47 decimal, 21 through 2F hexadecimal), a
group character (within the range of 96 through 126 decimal, 60 through 7E
hexadecimal), a value field, and a terminating character.
The value field specifies a number whose interpretation depends on the command. A
value field is indicated by [#] in the escape sequences. In general, numbers can start
with a plus (+) or minus (-) sign indicating a positive or negative value.
The + or - sign is followed by one or more ASCII numerals followed by a decimal point
(ASCII period) and more numerals. The sign and decimal point can be omitted if not
needed.
Value fields without a sign are treated as positive numbers. Value fields without decimal
points are treated as integers. If an integer value is required, fractions are truncated.
Spaces within the value field are ignored.
The terminating characters indicate that the escape sequence command is complete.
The emulation uses characters within the range of 64 through 94 decimal (40 through
5E hexadecimal) as terminators. When escape sequences are combined, group
characters are used instead of terminating characters.
Some escape sequences must be followed by binary data. Usually the number of bytes
of binary data is specified within the command.
Escape Sequences Syntax
The escape sequence syntax includes the lower case letters “l” and “o” that are easily
confused with the numbers one (1) and zero (0). For clarity, the lower case “l” is
italicized ( l ) in the escape sequence descriptions and listings.
If escape sequence does not work correctly, make sure that you did not use a “0" (zero)
or “1" (one) where a letter “o” or “l” is needed.
Note that the spaces shown in the escape sequences should not be included when a
command is sent to the printer. The brackets ([ and ]) used to show value fields or data
are also not part of the escape sequences.
When you see [#] in an escape code sequence, you must supply a parameter value.
Replace the [#] with a decimal or hexadecimal value. When using a quoted string in
BASIC, replace the [#] with an ASCII decimal value or character. In both cases, do not
include the brackets.
ESC % -12345X Universal exit/start of PJL.
ESC E Reset printer to user defaults. All temporary fonts and macros are deleted. Any
remaining data is printed using the user default values.
ESC & l [#]X Select [#] of copies (1 to 32,767).
ESC & l [#]U Set left (long edge) offset registration in decipoints (1/720") to adjust the
logical page position on the width of the physical page. Both positive and
negative values are accepted.
ESC & l [#] Z Set top (short edge) offset registration in decipoints (1/720") to adjust the
logical page position on the length of the page. Both positive and negative
values are accepted.
ESC & l [#] S Select simplex or duplex printing mode.
# Printing Mode
0 Simplex.
1 Duplex, Long-Edge Binding.
2 Duplex, Short-Edge Binding.
ESC & a [#] G Select page side [#] for printing. If duplex printing is not supported, a page eject is performed.
# Page Side
0 Next side is selected.
1 Front side is selected.
2 Back side is selected.
ESC | x [#] J This command can modify several different job control settings.
PCL image offset*
Page mode jog*
Input tray selection mode*
Output tray mask
* These settings are persistent, meaning they stay in effect after a power cycle. To change all of these settings back to Standard, execute a "Restore to Factory Defaults" via the OCP or Web. To change a specific setting back to Standard, reenter the command with the Standard value field.
# |
PCL Image Offset |
0 |
Standard (default).
|
1 |
MicroPress.
|
Use with early versions of MicroPress systems only.
|
# |
Page Mode Jog |
20 |
Standard (default).
|
21 |
Enable page mode jog.
|
When Page Mode Jog is enabled, Job Offset (Jog) enabled, multiple copies selected, and collation is disabled, a jog operation occurs between the printing of pages. For example, if a job prints 10 pages (simplex), 3 copies, with collation off and Page Mode Jog disabled, the output is offset at the end of the job. That is, if two such jobs are printed, the second job is offset from the first. If Page Mode Jog is enabled for this same job, sheet 11 is offset from sheet 10, sheet 21 is offset from sheet 20, and the first sheet of the next job is offset from sheet 30 (the last sheet of this job).
# |
Input Tray Selection Mode |
|
100 |
Standard (default). |
Setting the tray selection mode with a 10X code makes the mode persistent. The selected mode will be active immediately and it will be reestablished whenever PJL environment values are set to their default values. This happens when: - PJL mode is entered with a Universal Exit Language (UEL) command. - a PJL End of Job (EOJ) command is processed. - a PJL initialize command is processed. - the printer is reset to the Factory default from the OCP or SNMP
. |
101 |
Option 1. |
|
102 |
Option 2. |
|
103 |
Option 3. |
|
104 |
Option 4. |
|
105 |
Option 5. |
|
106 |
Custom Mapping 6 |
|
107 |
Custom Mapping 7 |
|
200 |
Standard (default). |
Setting the tray selection mode with a 20X code makes the selected mode active immediately, but it is not persistent. The tray selection mode will revert to the last persistent selection whenever PJL environment values are set to their default values. See the comments above.
|
201 |
Option 1 |
|
202 |
Option 2 |
|
203 |
Option 3 |
|
204 |
Option 4 |
|
205 |
Option 5 |
|
206 |
Custom Mapping 6 |
|
207 |
Custom Mapping 7 |
|
NOTE: Refer to "Paper Source" on page 2-12 for input tray option definitions.
|
# |
Output Tray Mask |
15 |
Disable auto cascading for Stacker 5
|
16 |
Disable auto cascading for Stacker 6
|
17 |
Disable auto cascading for Stacker 7
|
18 |
Disable auto cascading for Stacker 8
|
25 |
Enable auto cascading for Stacker 5 (default)
|
26 |
Enable auto cascading for Stacker 6 (default)
|
27 |
Enable auto cascading for Stacker 7 (default)
|
28 |
Enable auto cascading for Stacker 8 (default)
|
Refer to "Output Bin" on page 2-10 for output tray selections. These settings stay in effect until they are changed or the printer is reset.
|
Paper Size
ESC & l [#] A
Set physical page size to [#]. A tray with the selected paper size must be installed and selected as a paper source.
# |
Paper Size |
1 |
Executive (7.25’’ x 10.5’’)
|
2 |
Letter (8.5" x 11")
|
3 |
Legal (8.5" x 14")
|
6 |
Ledger (11" x 17")
|
7 |
Statement (8.5" x 5.5")
|
26 |
A4 (297mm x 210mm)
|
27 |
A3 (297mm x 420mm)
|
40 |
Folio (216mm x 330mm)
|
45 |
JIS B5 (182mm x 257mm)
|
46 |
JIS B4 (257mm x 364mm)
|
101 |
Universal or Custom. Media size must be set to Custom and physical media dimensions must be entered through the operator control panel or SNMP.
|
102 |
Letter SEF (8.5" x 11")
|
115 |
A5 SEF (149mm x 210mm)
|
126 |
A4 SEF (210mm x 297mm)
|
202 |
LetterTab Stock (9" x 11")
|
226 |
A4 Tab Stock (297mm x 225mm)
|
2006
|
SuperB (12" x 18")
|
Page Length
ESC & l [#] P
Set logical page length to [#] lines. This is an alternate, but not recommended, method for selecting a page length. The page length selected is the smallest logical page length that is greater than the specified number of lines multiplied by the current VMI.
Orientation
ESC & l [#] O
Select print orientation (#).
# |
Print Orientation |
0 |
Portrait.
|
1 |
Landscape.
|
2 |
Reverse portrait.
|
3 |
Reverse landscape.
|
ESC & a [#] P
Select print direction [#]. Rotate the logical page coordinates counterclockwise in 90 degree increments from the current logical page orientation.
# |
Rotation |
0 |
Do not rotate.
|
90 |
Rotate 90 degrees.
|
180 |
Rotate 180 degrees.
|
270 |
Rotate 270 degrees.
|
See the attached PDF for more information.
Source: Ricoh
0 Comments