This document lists the HP LaserJet PCL
printer commands for basic page formatting and font selection. If you need further
information about PCL commands, HP-GL/2, macros, or PJL commands, please use the Technical
Reference Manual set , part number 5021-0330. Order the manual set from HP's Support
Materials Organization at 1-(800)-227-8164.

A Few Notes about Using These Commands

* Paper Source and Page Size commands
may not work on all printers. Check your user's manual for supported paper tray and paper
size options.

* The commands are listed in
hierarchical order and give the decimal and hexadecimal equivalents.

* Values in the parentheses
"(x)" identify the lower case of the termination character that is used for
combining commands.

* Ec represents the escape character
for your software. In DOS Edit, Ec is represented by holding down the

- Ctrl key and pressing the letter P.
Release both keys and press the Esc key.

* # and #...# are variables that you
will replace with the numbers needed for your document.

Example

To set the number of copies to 14,
Ec&l#X, replace the # or #...# with:

ASCII

14

Decimal

049 052

Hexadecimal

31 34

Use the following table to help you
translate into decimal or hexadecimal:

ASCII value

Hex

Dec

Description

0

30

48

Zero

1

31

49

One

2

32

50

Two

3

33

51

Three

4

34

52

Four

5

35

53

Five

6

36

54

Six

7

37

55

Seven

8

38

56

Eight

9

39

57

Nine

.

2E

46

Period
(point)

Job Control Commands

Function

Parameter

Command

Decimal Value

Hexadecimal
Value

Reset

Reset

EcE

027 069

1B 45

Number of
Copies

# of Copies
(1-99)

Ec&l#X
(x)

027 038 108
#...# 088 (120)

1B 26 6C #. #
58 (78)

Unit of
Measure

# = Number of
units per inch

Ec&u#D
(d)

027 038 117
#...# 068 (100)

1B 26 75
#...# 44 (64)

Function

Parameter

Command

Decimal Value

Hexadecimal Value

Simplex/Duplex Operation (Only
Applicable to Duplex Capable Printers)

Simplex Print

Simplex

Ec&l0S
(s)

027 038 108
048 083 (115)

1B 26 6C 30
53 (73)

Duplex Print

Long-Edge
Binding

Ec&l1S
(s)

027 038 108
049 083 (115)

1B 26 6C 31
53 (73)

Short-Edge
Binding

Ec&l2S
(s)

027 038 108
050 083 (115)

1B 26 6C 32
53 (73)

Long-Edge
(left) Offset Registration

# of
Decipoints (1/720")

Ec&l#U
(u)

027 038 108
#...# 085 (117)

1B 26 6C
#...# 55 (75)

Short-Edge
(Top) Offset Registration

# of
Decipoints (1/720")

Ec&l#Z
(z)

027 038 108
#...# 090 (122)

1B 26 6C
#...# 5A (7A)

Page Side
Selection

Next Side

Ec&a0G
(g)

027 038 097
048 071 (103)

1B 26 61 30
47 (67)

Front Side

Ec&a1G
(g)

027 038 097
049 071 (103)

1B 26 61 31
47 (67)

Back Side

Ec&a2G
(g)

027 038 097
050 071 (103)

1B 26 61 32
47 (67)

Page Control Commands

Function

Parameter

Command

Decimal Value

Hexadecimal
Value

Paper Destination

Auto Select

Ec&l0G

027 038 108
048 103 (71)

1B 26 6C 30
67 (47)

Top Output
Bin

Ec&l1G

027 038 108
049 103 (71)

1B 26 6C 31
67 (47)

Left Output
Bin

Ec&l2G

027 038 108
050 103 (71)

1B 26 6C 32
67 (47)

Optional Multi-Bin Mail Box (HP
LaserJet 5SI, 5Simx, 5Sinx)

Left Bin Face
Up

Ec&l3G

027 038 108
051 072 (104)

1B 26 6C 33
67 (48)

Bin 1 Face
Down

Ec&l4G

027 038 108
052 103 (104)

1B 26 6C 34
67 (48)

Bin 2 Face
Down

Ec&l5G

027 038 108
053 103 (104)

1B 26 6C 35
67 (48)

Bin 3 Face
Down

Ec&l6G

027 038 108
054 103 (104)

1B 26 6C 36
67 (48)

Bin 4 Face
Down

Ec&l7G

027 038 108
055 103 (104)

1B 26 6C 37
67 (48)

Bin 5 Face
Down

Ec&l8G

027 038 108
056 103 (104)

1B 26 6C 38
67 (48)

Bin 6 Face
Down

Ec&l9G

027 038 108
057 103 (104)

1B 26 6C 39
67 (48)

Bin 7 Face
Down

Ec&l10G

027 038 108
049 048 103 (104)

1B 26 6C 31
31 67 (48)

Bin 8 Face
Down

Ec&l11G

027 038 108
049 049 103 (104)

1B 26 6C 31
32 67 (48)

Optional Mailbox with Stapler (HP
LaserJet 5Si Mopier)

Left Bin Face
Up

Ec&l2G

027 038 108
050 103 (104)

1B 26 6C 32
67 (48)

Bin 1 Face
Down

Ec&l3G

027 038 108
051 103 (104)

1B 26 6C 33
67 (48)

Bin 2 Face
Down

Ec&l4G

027 038 108
052 103 (104)

1B 26 6C 34
67 (48)

Bin 3 Face
Down

Ec&l5G

027 038 108
053 103 (104)

1B 26 6C 35
67 (48)

Bin 4 Face
Down

Ec&l6G

027 038 108
054 103 (104)

1B 26 6C 36
67 (48)

Bin 5 Face
Down

Ec&l7G

027 038 108
055 103 (104)

1B 26 6C 37
67 (48)

Stapler Bin
(Printer is in Mailbox mode)

Ec&l9G

027 038 108
057 103 (104)

1B 26 6C 39
67 (48)

Stapler Bin
(Printer is in Stacker or Separator mode)

Ec&l5G

027 038 108
053 103 (104)

1B 26 6C 35
67 (48)

Paper Source, Length and Size

Paper Source

Eject Page

Ec&l0H
(h)

027 038 108
048 072 (104)

1B 26 6C 30
48 (68)

C

Paper
Cassette

Ec&l1H
(h)

027 038 108
049 072 (104)

1B 26 6C 31
48 (68)

Paper
Cassette / tray 2

Ec&l1H
(h)

027 038 108
049 072 (104)

1B 26 6C 31
48 (68)

Manual Feed
Paper

Ec&l2H
(h)

027 038 108
050 072 (104)

1B 26 6C 32
48 (68)

Manual Feed
Envelope

Ec&l3H
(h)

027 038 108
051 072 (104)

1B 26 6C 33
48 (68)

C

Tray 1

Ec&l8H
(h)

027 038 108
056 072 (104)

1B 26 6C 38
48 (68)

Optional 500
/ 2000 Sheet Lower Cassette

Ec&l5H
(h)

027 038 108
053 072 (104)

1B 26 6C 35
48 (68)

MP Tray /
Tray 3

Ec&l4H
(h)

027 038 108
052 072 (104)

1B 26 6C 34
48 (68)

Envelope
Feeder

Ec&l6H
(h)

027 038 108
054 072 (104)

1B 26 6C 36
48 (68)

Page Size

Executive

Ec&l1A
(a)

027 038 108
049 065 (097)

1B 26 6C 31
41 (61)

Letter

Ec&l2A
(a)

027 038 108
050 065 (097)

1B 26 6C 32
41 (61)

Legal

Ec&l3A
(a)

027 038 108
051 065 (097)

1B 26 6C 33
41 (61)

Tabloid (11 X
17)

Ec&l6A
(a)

027 038 108
054 065 (097)

1B 26 6C 36
41 (61)

A4

Ec&l26A
(a)

027 038 108
050 054 065 (097)

1B 26 6C 32
36 41 (61)

A3

Ec&l27A
(a)

027 038 108
050 055 065 (097)

1B 26 6C 32
37 41 (61)

A4

Ec&l26A
(a)

027 038 108
050 054 065 (097)

1B 26 6C 32
36 41 (61)

JIS B5

Ec&l45A
(a)

027 038 108
052 053 065 (097)

1B 26 6C 34
35 41 (61)

JIS B4

Ec&l46A
(a)

027 038 108
052 054 065 (097)

1B 26 6C 34
36 41 (61)

JPOST

Ec&l71A
(a)

027 038 108
055 049 065 (097)

1B 26 6C 37
31 41 (61)

JPOSTD

Ec&l72A
(a)

027 038 108
055 050 065 (097)

1B 26 6C 37
32 41 (61)

Monarch

Ec&l80A
(a)

027 038 108
056 048 065 (097)

1B 26 6C 38
30 41 (61)

COM 10

Ec&l81A
(a)

027 038 108
056 049 065 (097)

1B 26 6C 38
31 41 (61)

B5

Ec&l100A(a)

027 038 108
049 048 048 065 (097)

1B 26 6C 31
30 30 41 (61)

Custom/
Maximum

Ec&l101A(a)

027 038 108
049 048 049 065(097)

1B 26 6C 31
30 32 41 (61)

DL

Ec&l90A
(a)

027 038 108
057 048 065(097)

1B 26 6C 39
30 41 (61)

C5

Ec&l91A
(a)

027 038 108
057 049 065(097)

1B 26 6C 39
31 41 (61)

Page Length

# if Lines
(5-128)

Ec&l#P
(p)

027 038 108
#...# 080 (112)

1B 26 6C
#...# 50 (70)

Function

Parameter

Command

Decimal Value

Hexadecimal
Value

Orientation

Orientation

Portrait

Ec&l0O
(o)

027 038 108
048 079 (111)

1B 26 6C 30
4F (6F)

Landscape

Ec&l1O
(o)

027 038 108
049 079 (111)

1B 26 6C 31
4F (6F)

Reverse
Portrait

Ec&l2O
(o)

027 038 108
050 079 (111)

1B 26 6C 32
4F (6F)

Reverse
Landscape

Ec&l3O
(o)

027 038 108
051 079 (111)

1B 26 6C 33
4F (6F)

Print
Direction

# Degrees of
Rotation counter-
clockwise. (90 degree increments only)

Ec&a#P

027 038 097
#...# 080 (112)

1B 26 61
#...# 50 (70)

Margins and Text Length

Top Margin

# of Lines

Ec&l#E
(e)

027 038 108
#...# 069 (101)

1B 26 6C
#...# 45 (65)

Text Length

# of Lines

Ec&l#F
(f)

027 038 108
#...# 070 (102)

1B 26 6C
#...# 46 (66)

Left Margin

# of Columns

Ec&a#L
(l)

027 038 097
#...# 076 (108)

1B 26 61
#...# 4C (6C)

Right Margin

# of Columns

Ec&a#M
(m)

027 038 097
#...# 077 (109)

1B 26 61
#...# 4D (6D)

Clear
Horizontal Margins

Ec9

027 057

1B 39

Perforation Skip Mode

Perforation
Skip

Disable

EC&l0L
(l)

027 038 108
048 076 (108)

1B 26 6C 30
4C (6C)

Enable

EC&l1L
(l)

027 038 108
049 076 (108)

1B 26 6C 31
4C (6C)

Horizontal Column Spacing

Horizontal
Motion Index (HMI)

# of 1/120
inch Increments

Ec&k#H
(h)

027 038 107
#...# 072 (104)

1B 26 6B
#...# 48(68)

The
Horizontal Motion Index (HMI) command designates the distance between columns in 1/120
inch increments. When fixed pitch fonts are selected, all printable characters, including
the space and backspace characters, are affected by HMI. When proportional fonts are
selected, the HMI affects only the control code space character. The default HMI is equal
to the pitch value in the font header. The printer escape sequence that you send is as
follows:

Ec&k#H # is equal to a variable that is derived from the following formula:

Horizontal Printable Area/Desired characters per line
X 120 = #

NOTE: If you know the desired
pitch or number of characters per horizontal inch, use the following formula:

120/Desired characters per inch = #

Function

Parameter

Command

Decimal Value

Hexadecimal
Value

Vertical Line Spacing

Vertical
Motion Index (VMI)

# of 1/48
inch Increments

Ec&l#C
(c)

027 038 108
#...# 067 (99)

1B 26 6C
#...# 43 (63)

The Vertical
Motion Index (VMI) command designates the distance between rows in 1/48 inch increments
(the vertical distance the cursor will move for a line feed operation). This command
affects the line feed and half line feed spacing. The factory default VMI is eight, which
corresponds to six lines per inch. VMI can be selected from the printer control panel or
by sending a printer escape sequence: Ec&#C . # is equal to a variable that is derived
from the following formula:

Vertical Printable Area

_____________________ X 48 = #

Desired Lines Per Page

Note: Use either VMI (most precise method of line spacing) or Lines per inch as only the
last command will execute.