YesNoJust BrowsingFeedback
Hewlett-Packard
WW
Search cposupport or Search All HP
Support Guide
Customer Care HOME

This Support Site

HP LaserJet Printers - PCL (Printer Command Language)

Introduction

      This document will help you understand Printer Command Language (PCL), its history and architecture, and the printer commands.

What is PCL (Printer Command Language)?

      History and architecture

        HP created Printer Command Language (PCL) to provide an efficient way to control printer features across a number of different printing devices. PCL was originally devised for HP's dot-matrix and inkjet printers. The first printer in HP's LaserJet series, the "HP LaserJet" (introduced in 1984), released with the PCL 3 Language.

        PCL commands are compact escape sequence codes that are embedded in the print job before being sent to the printer. HP PCL formatters and fonts are designed to quickly translate application output into high-quality, device-specific, raster print images.

        The PCL printer language is common to all HP Printers. This helps to minimize printer support problems and protect HP printer investment in applications and printer driver software.

        The PCL printer language is successful because the following points remain consistent across all levels:

        1. All HP LaserJet printers implement PCL printer language features consistently.

        2. HP printers implement the PCL feature in very cost-effective formatters.

        3. HP printers have the ability to ignore most unsupported commands.

        There are five major levels of PCL. The creation of these levels was driven by the combination of printer technology developments, changing user needs and application software improvements. The first versions of PCL (PCL 1 and 2) were used in HP impact and inkjet printers in the early 1980s. The five phases of the PCL printer language are:

        PCL 1

        Supported by all HP LaserJet Printers.

        Provided very basic printing and spacing functionality (text printing only) PCL 1 is the base set of functions provided for simple, single-user workstation output. Introduced in the early 1980's.

        PCL 2

        Supported by all HP LaserJet Printers.

        Provided Electronic Data Processing/Transaction functionality. Functions were added for general purpose, multi-user system printing (text printing only). Introduced in the early 1980's.

        PCL 3

        Released with the following printers: HP LaserJet, HP LaserJet Plus.

        Provided the commands and features required for simple high quality word processing and data printing. Allowed for the use of a limited number of bitmapped fonts and graphics. PCL 3 was widely imitated by other printer manufacturers and was referred to by these companies as "LaserJet Plus Emulation". Introduced in 1984.

        PCL 4

        Released with the following printers: HP LaserJet Series II, HP LaserJet IID, HP LaserJet IIP, HP LaserJet IIP Plus.

        Provided new page printing capabilities. Supported macros, larger bitmapped fonts and graphics. Introduced in 1985.

        PCL 5

        Released with the following printers: HP LaserJet III, HP LaserJet IIID, HP LaserJet IIIP, HP LaserJet IIISI.

        Provided ultimate office publishing functionality. New publishing capabilities included font scaling, outline fonts and HP-GL/2 (vector) graphics. PCL 5 was designed for more complex desktop publishing, graphic design, and presentation applications. Introduced in 1990 with the HP LaserJet III.

        PCL 5E (Enhanced)

        Released with the following printers: HP LaserJet 4, HP LaserJet 4M, HP LaserJet 4L, HP LaserJet 4ML, HP LaserJet 4P, HP LaserJet 4MP, HP LaserJet 4Plus, HP LaserJet 4Mplus, HP LaserJet 5P, HP LaserJet 5MP, HP LaserJet 5L, HP LaserJet 5L-FS, HP LaserJet 5Lxtra, HP LaserJet 6L, HP LaserJet 6LXI, HP LaserJet 6LSE, HP LaserJet 6P, HP LaserJet 6MP, HP LaserJet 6PXI, HP LaserJet 6PSE.

        Provided bidirectional communication between the printer and the PC. Features a wider selection of fonts for use primarily with Microsoft (R) Windows applications.

        PCL 5C (Color)

        Released with the following LaserJet printers: HP Color LaserJet, HP Color LaserJet 5, HP Color LaserJet 5M.

        Provided the commands needed to support color printing.

        Each new version of the language includes commands not found in older versions as well as the older PCL commands. As a result, printers with more recent versions of PCL are backwards-compatible with software that supports older versions of the language.

        PCL 6

        Released with the following LaserJet printers: HP LaserJet 4000 and HP LaserJet 2100.

        Features new modular architecture that can be easily modified for future HP printers; faster return to application; faster printing of complex graphics; more efficient data streams for reduced network traffic; better WYSIWYG printing; improved print quality; truer document fidelity; and complete backward compatibility.

NOTE: PCL6 is very much different than PCL5 and previous PCL versions. One significant difference is that you cannot use PCL6 to send commands to the printer in the same way as PCL5. (Click here or click here to obtain more information on PCL6 and how it differs from previous PCL versions.)

      Printer commands

        PCL printer commands provide access to printer features. There are four general types of HP printer language commands:

        1. Control codes

        2. PCL commands

        3. HP-GL/2 commands

        4. PJL commands

        Control codes

        A control code is a character that initiates a printer function, for example: Carriage Return (CR), Line Feed (LF), Form Feed (FF), etc.

        PCL commands

        PCL commands provide access to the printer's PCL control structure. The PCL structure controls all of the printer's features except those used for vector graphics, which are controlled by the HP-GL/2 commands.

NOTE: PCL commands (other than single-character control codes) are also referred to as "escape sequences." The terms are used interchangeably.

        Once a PCL command sets a feature of the printer, that feature remains set until that PCL command is repeated with a new value, or the printer is reset to default. The example below shows a PCL command for the legal paper size.

        Example:

        ECEandl3A

        HP-GL-2 Commands

        HP-GL/2 (vector graphic) commands are two letter codes designed to remind you of the function of the command (such as IN for initialize). After the two-letter mnemonic, there may be one or more parameters which identify details of how to process the command. The example below would appear at the beginning of a sequence of HP-GL/2 commands and gives instructions to initialize HP-GL/2 and select pen number 1.

        Example:

        IN;

        SP1;

        PJL commands

        Printer job language (PJL) commands provide job level control, unlike PCL and HP-GL/2 (which control the placement of dots on the printed page). One of the main features PJL offers is the ability to switch printer languages (personalities) between jobs. Applications supporting PJL can print one job using PCL and then print the next job using PostScript (R) (or another printer language)--without any operator intervention. PJL can also command two-way communications with the printer. PJL can request information from the printer such as printer model, configuration, printer status, and job status. PJL also can be used to change the printer's control panel settings (change default settings without using the control panel) and modify the message displayed on the control panel. PJL was primarily designed for use by application developers and technical support personnel. The example below shows the command to change printer density to 5.

        Example:

        EC%-12345X@PJL DEFAULT DENSITY=5

NOTE: For more information, refer to the HP PCL5 Technical Reference Bundle.

PostScript (R) is a trademark of Adobe
Systems Incorporated.

Microsoft (R) is a U.S. registered trademark of
Microsoft Corp.

Windows (R) and MS Windows (R) are U. S.
registered trademarks of Microsoft Corp.

Copyright Hewlett-Packard Co. 1998
This information is subject to change without notice and
is provided "as is" with no warranty.
Hewlett-Packard shall not be liable for any direct,
indirect, special, incidental or consequential damages
in connection with the use of this material.

 



HP Bottom Banner
Terms of UsePrivacy Statement