Print | Rate this content

HP LaserJet Series Printers - Common PJL Commands for Front Panel Settings and Default Page Formatting

ISSUE: What are the common formatting PJL commands for use with HP LaserJet series printers?
SOLUTION: PJL commands are commonly used to change default menu settings for the HP LaserJet 4 and newer series printers. The command used is the default command, which permanently changes the default menu setting. For the common PJL commands, please see the Details section.

DETAILS: The common PJL commands are found in the following sections.

The following are PJL commands commonly used to change default menu settings for the HP LaserJet 4 and later series printers. The command used is the default command, which permanently changes the default menu setting.

NOTE: Not all commands are supported on all HP LaserJet series printers, and some commands are Read Only. For a complete listing of PJL commands, see the Printer Job Language Reference Manual , which is part of the Technical Reference Manual bundle.
NOTE: HP LaserJet 4L, 5L, 6L, and 1100 series printers will be reset to factory defaults if they are manually reset or unplugged.

To change default settings for the current job only, replace Default with the Set command.

To enter the escape sequence (Ec), press CTRL , then P . No character will appear on the screen at this point. Let up on both keys and press ESC . A Left Arrow will be displayed on the screen.

Number of copies

Ec%-12345X@PJL DEFAULT COPIES=1 (1 to 999)Ec%-12345X

Line termination

The following command permanently changes the default menu for line termination.

Ec%-12345X@PJL DEFAULT LPARM : PCL LINETERMINATION = 2

Ec%-12345X

0: CR+CR, LF=LF, FF=FF (factory default)

1: CR replaced by CR-LF, LF=LF, FF=FF

2: CR=CR, LF replaced by CR-LF, FF replaced by CR-FF

3: CR replaced by CR-LF, LF replaced by CR-LF, FF replaced by CR-FF

CR = Carriage Return, LF = Line Feed, FF = Form Feed

Manual feed

Ec%-12345X@PJL DEFAULT MANUALFEED=ON (or OFF)

Ec%-12345X

Paper size

The following command permanently changes the default menu setting of the HP LaserJet 4, 5, and 6 series printers to legal-sized paper.

Ec%-12345X@PJL DEFAULT PAPER=LEGAL

Ec%-12345X

NOTE: Variables for paper size are Letter, Legal, Executive, Ledger, Com10, B4, B5, Custom, JISB4, JISB5, JPost, JPostD, A3, A4, C5, DL, and Monarch.

Not all paper sizes work on all printers. Check the User's Guide for supported paper sizes.

Orientation

The following command permanently changes the default menu setting of the HP LaserJet 4, 5, and 6 series printers to Landscape orientation.

Ec%-12345X@PJL DEFAULT ORIENTATION=LANDSCAPE

Ec%-12345X

Formlines

The following command permanently changes the front menu panel of the HP LaserJet 4, 5, and 6 series printers to 66 lines-per-page.

Ec%-12345X@PJL DEFAULT FORMLINES=66

Ec%-12345X

NOTE: Variables are from 5 lines to 128 lines.

Symbol set

The following command permanently changes the default menu setting of the HP LaserJet 4, 5, and 6 series printers to the PC-8 symbol set.

Ec%-12345X@PJL DEFAULT LPARM : PCL SYMSET=PC8

Ec%-12345X

Font number

The following command permanently changes the default menu setting of the HP LaserJet 4, 5, and 6 series printers to font number 2.

Ec%-12345X@PJL DEFAULT LPARM : PCL FONTNUMBER=2

Ec%-12345X

Pitch size

The following command permanently changes the default menu of the HP LaserJet 4, 5, and 6 series printers to a pitch size of 16.67.

Ec%-12345X@PJL DEFAULT LPARM : PCL PITCH=16.67

Ec%-12345X

NOTE: Variables for pitch size are from .44 to 99.99.
NOTE: 16.67 is also known as condensed or compressed print.

Point size

The following command permanently changes the default menu of the HP LaserJet 4, 5, and 6 series printers to point size 20.

Ec%-12345X@PJL DEFAULT LPARM : PCL PTSIZE=20

Ec%-12345X

NOTE: Variables for point size are from 4 to 999.75.

Dark courier

Ec%-12345X@PJL DEFAULT COURIER=DARK

Ec%-12345X

NOTE: This command is not supported on the HP LaserJet 4L, 5L, and 6L series printers.

EconoMode

Ec%-12345X@PJL DEFAULT ECONOMODE=ON (or OFF)

Ec%-12345X

NOTE: The HP LaserJet 2100 series printer will not support EconoMode while set at 1200 dpi.

Autocont

Ec%-12345X@PJL DEFAULT AUTOCONT=ON (or OFF)

Ec%-12345X

Density

This is Read Only on the HP LaserJet 4 and 4M series printers.

Ec%-12345X@PJL DEFAULT DENSITY=1 (1, 2, 3, 4 or 5)

Ec%-12345X

NOTE: This is not supported on HP LaserJet 4Si and 4Si MX series printers.

Resolution

Ec%-12345X@PJL DEFAULT RESOLUTION=300 (300, 600 or 1200 - depending on the printer)

Ec%-12345X

NOTE: This code function is not supported on HP LaserJet 4L and 4ML series printers.
NOTE: The HP LaserJet 2100, 4000, 5000, and 4050 series printers support 1200 dpi. The HP LaserJet 8000 and 8100 series printers support HP FastRes 1200.

Resolution enhancement

Ec%-12345X@PJL DEFAULT RET=OFF (OFF, LIGHT, MEDIUM OR DARK)

Ec%-12345X

NOTE: On the HP LaserJet 4Si and 4Si MX series printers, the variables are ON or OFF only.

Job offset (HP LaserJet 4Si and 4Si MX series printers)

Ec%-12345X @PJL DEFAULT JOBOFFSET=ON (or OFF)

Ec%-12345X

Outbin (HP LaserJet 4Si and 4Si MX series printers)

Ec%-12345X@PJL DEFAULT OUTBIN=UPPER (or LOWER)

Ec%-12345X

Duplex (HP LaserJet 4 Plus, 4M Plus, 4Si, 4Si MX, 5Si, and 5Si MX series printers)

Ec%-12345X@PJL DEFAULT DUPLEX=ON (or OFF)

Ec%-12345X

Duplex binding (HP LaserJet 4 Plus, 4M Plus, 4Si, 4Si MX, 5Si, and 5Si MX series printers

Ec%-12345X@PJL DEFAULT BINDING=LONGEDGE (or SHORTEDGE)

Ec%-12345X

Ready message display

Ec%-12345X@PJL RDYMSG DISPLAY="MESSAGE"

Ec%-12345X

NOTE: This is not supported on HP LaserJet 4 and 4ML series printers.

Reset

Use the following command at the end of PJL jobs that use the PJL SET command to set the printer back to its default state:

Ec%-12345X@PJL INITIALIZE

Ec%-12345X

NOTE: Use Initialize, not Reset, on the HP LaserJet 4, 4 Plus, 5L, 5P, and 5MP series printers.

Additional commands for the HP LaserJet 5P and 6P series printers

MP tray as a cassette or first tray

This command sets the configuration of Tray 1 (MP Tray) as either a first tray or a cassette tray. The command is as follows:

Ec%-12345X@PJL DEFAULT MPTRAY=FIRST (or CASSETTE)

Ec%-12345X

NOTE: The default value is FIRST.

Printer name definition

This command changes the printer name to any name, up to 32 characters. The command is as follows:

Ec%-12345X@PJL DEFAULT PRINTERNAME=XXXXXXX

Ec%-12345X

Type the desired printer name for the XXXXXXX values.

NOTE: This change will be reflected in all places that the printer name appears.

Printing self-test pages

This PJL command instructs the printer to print any of the six self-test pages or the continuous self-test. The command is as follows:

Ec%-12345X@PJL SET TESTPAGE=SELFTEST (or other variable)

Ec%-12345X

An alternate command for printing test pages includes using ASCII HEX variables. The command is as follows:

Ec%-12345X@PJL @PJL DMCMD ASCIIHEX = "04000401010502040103"
Ec%-12345X

Substitute the variable for the particular test desired:

Description
Variable
ASCIIHEX Variable
PCL Self-Test
SELFTEST
"04000401010502040103"
PCL Typeface list
PCLTYPELIST
N/A
Continuous Self-Test
CONTSELFTEST
N/A
PCL Demo Page
PCLDEMOPAGE
N/A
postscript Configuration Page
PSCONFIGPAGE
N/A
postscript Typeface List
PSTYPEFACELIST
N/A
postscript Demo Page
PSDEMOPAGE
N/A
Printer Event Log
EVENTLOG
"04000401010502040107"
Directory Listing
N/A
"04000401010502040108"
Menu Map
N/A
"04000401010502040109"
Usage Page
N/A
"04000401010502040164"
Supplies Page
N/A
"04000401010502040165"
Auto Cleaning Page
N/A
"040004010105020401FC"
Cleaning Page
N/A
"0440004010105020401FD"
Paper Path Test
N/A
"040004010105020401FE"
Registration Page
N/A
"040004010105020401FF"
PCL Font List
N/A
"040004010105020402015E"
PS Font List
N/A
"04000401010502040201C2"
NOTE: PCLTYPELIST is not supported with the HP LaserJet 6L series printers.
NOTE: Not all ASCIIHEX commands will work in all HP LaserJet printers.

The ASCIIHEX commands cannot be combined in one print job. The following example would cause the printer to freeze or hang:

Ec%-12345X@PJL @PJL DMCMD ASCIIHEX = "04000401010502040103"
@PJL DMCMD ASCIIHEX = "04000401010502040107"
Ec%-12345X

Memory booster technology

This command sets the Memory Booster Technology to On, Off, or Auto. The command is as follows:

Ec%-12345X@PJL DEFAULT PS:MBT=ON (On, OFF, or AUTO)

Ec%-12345X

Provide feedback

Please rate the information on this page to help us improve our content. Thank you!