The following information is provided as is, and the authors take no responsibility for the correctness.

PCL - HP Page Description Language

Serbo-Croatian translation of this page can be found here: PCL - HP jezik za opis strana


HP created PCL to provide an efficient way to control printer features across many different printing devices. PCL was originally devised, in the early 1980s, for HP's dot matrix and Inkjet printers. The first printer in HP's LaserJet series, the HP LaserJet was released in 1984 with the PCL 3 Language. The current version is PCL XL.

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.

PCL is the most widely spread printer language in the laser printer market today. Most laser printer manufacturers use an implementation of PCL PCL 5e or PCL XL for their printers.

Versions

PCL versions differ in functionality (e.g. font type support: bitmap fonts, scalable fonts (Intellifonts, TrueType fonts), raster graphic compression methods, HP-GL/2 graphic support).

PCL 1

around 1980 - Print and Space functionality is the base set of functions provided for simple, convenient, single-user workstation output. ggg

PCL 2

around 1980 - EDP (Electronic Data Processing)/Transaction functionality is a superset of PCL 1. Functions were added for general purpose, multi-user system printing.

PCL 3

1984 - Office Word Processing functionality is a superset of PCL 2. Functions were added for high-quality, office document production. It allowed for the use of a limited number of bitmapped fonts and graphics, and supported HP-GL. PCL 3 was widely imitated by other printer manufacturers and was referred to by these companies as “LaserJet Plus Emulation.”
(Printers: HP DeskJet family, HP LaserJet series printer, HP LaserJet Plus series printer)

PCL3+

Used by DeskJet and DesignJet family of printers.

PCL3c

Used by DeskJet and DesignJet family of printers.

PCL3e

Used by DeskJet and DesignJet family of printers. Now used in PhotoSmart also.

PCL3GUI

Used by DeskJet and DesignJet family of printers. Uses RTL

PCLSLEEK

Used by DeskJet and DesignJet family of printers. Uses RTL

PCL 4

1985 - Page formatting functionality is a superset of PCL 3. Supported macros, larger bitmapped fonts and graphics.
(Printers: HP LaserJet II, HP LaserJet IIP (PCL 4.5))

PCL 5

1990 - Office Publishing functionality is a superset of PCL 4. New publishing capabilities include font scaling and HP-GL/2 (vector) graphics.
(Printers: HP LaserJet III)

PCL 5e

1994 - This is a major revision, which includes new features like Adaptive Compression System, 2byte character encoding, support for vector fonts and bi-directional configuration commands. Includes Logical OPerations (corresponds to GDI ROPs) to improve Windows support before clipping paths.
(Printers: HP LaserJet 4)

PCL 5j

New features like 2-byte character support for Japanese resident scalable fonts, vertical writing, Japanese paper sizes and typeface strings.
(Printers: HP LaserJet 4PJ)

PCL 5c

1995 - Color support and Logical OPerations was added to PCL5. PCL5c predates PCL5e. Some models also support clipping paths.
(Printers: HP Color LaserJet, HP PaintJet 300 XL (first printer with PCL5c), HP DeskJet 1200C/1600C (these model numbers have been re-used and the newer models are not PCL 5c)

If PCL 5c predates 5e, what are the correct years then?Christoph Lindemann 2006/07/26 16:54
Also if both 5c and 5e introduce Logical OPerations, are they different? or does 5e just implement the same ops as 5c?Christoph Lindemann 2006/07/26 16:56

PCL 5ce

Supports Agfa Microtype scalable typefaces.
(Printers: HP 2500c Pro Printer)

PCL 6 / XL

1996 - PCL 6 or PCL XL is a new format introduced in 1995, which is not compatible with any previous versions of PCL.
(Printers: HP LaserJet 5, 5M and 5N)
For more information see PCL XL.

Users having data corruption on poor quality cable with PCL6 should consider PCL5 (much reliable). Either buy a more efficient XOR shorter cable.


You confuse with PCL6 (base) and PCL XL:

  1. PCL6 (base) is a superset of PCL5e and compatible with PCL5 printers.
  2. PCL XL (aka “PCL6 enhanced”) is a superset of PCL6 and is designed too offer near PostScript quality. Because of too much quality improvements, it is not compatible with PCL5 printers.

Interresting. Could you please provide some documentation about the differences? All documentation I have seen about PCL 6/XL was describing the new PCL XL, and in the first draft specs of PCL XL, it was called PCL 6 (As far as I know). But if you could provide some tech specs for PCL 6 (base) that would be fantastic, as I have only across docs up til PCL 5c. — Christoph Lindemann 2009/07/02 20:24


Reference

The latest technical reference manuals can be ordered (HP Part-Number #5961-0546) or downloaded from Hewlett-Packard.

Official HP PCL SDK Download Site Public Kits and Information Download
HP PCL 5 Technical Reference pcl5_technical_reference.pdf
HP PCL 5c Technical Reference pcl5_color_technical_reference.pdf
HP PCL 5 Comparison Guide pcl5_comparison_guide.pdf
HP PCL 5 Comparison Guide Addendum pcl5_comparison_guide_addendum.pdf
HP PCL 5 Quick Reference pcl5_quick_reference.pdf
HP PCL 5c Programming Quick Reference pcl5_color_programming_quick_reference.pdf
PCL-UTF-8: HP-UX 11i v3 International Printing Features http://docs.hp.com/en/5991-7956/5991-7956.pdf
Brother HL-Series Technical Reference hl-series_techreference_revc_oct1994.pdf
-
PCL5e printer symbol sets (Cyr.Tech.) Symbol tables.pdf
Support for PCL5e/PCL5c macros in a
multi-user environment (Cyr.Tech.)
Support of PCL5e Macros.pdf

Notes

  • Despite all the descriptions not allowing it, there are “groupless” parametrized commands. EC(8U for example has a command of the parameterized type, the ”(” which is immediatly followed by the value and parameter. It is not valid PCL but you would be hard pressed to select the correct font without it. Setting the group to asc(127) seems to be the most logical way to handle this when parsing PCL commands.
  • Not all binary transfer escape sequences are defined by the “w” parameter character or “W” terminating character. However, this is the preferred parameter for standardization. The following are some sequences that do not end with a “w” or “W”; these commands should be parsed and any binary data discarded if the device does not support the command.
    • EC&p#X - Transparent Data: Transparent print data
    • EC*b#V - Raster Data: Raster graphics transfer by plane
  • The following Esc?W commands should not be interpreted as binary data commands:
    • EC&k#W - Device Specific Control
    • EC(W - Select Primary Font Character Set
    • EC)W - Select Secondary Font Character Set
    • EC&dW - Underline
  • LaserJets do not currently support the lowercase “w” as indicating that binary data follows and will continue parsing the binary data, looking for value field or terminating character.
  • The Perf Skip Disable command EC&l0L does not prevent a page eject when data is printed off the bottom of the page, it only delays it from the point where the lower non-printable margin begins to the actual end of the physical page.
  • LaserJets prior to LJ4, DeskJets below DJ1200C, PaintJet XL300, and the Color LaserJet do not support HP-GL/2 commands or picture frame directives within macros. (All LaserJets support some form of HP-GL) EDIT: The PCL5 Comparison Guide, Edition 2, 6/2003 states the Color LJ supports HP-GL/2. Can anyone prove or disprove this? TC Holmes 12:34 AM PT 2009-12-31
  • When a macro ID is specified for which no macro has been defined, the macro invocation, macro deletion, and “make macro permanent or temporary” commands are ignored.
  • A macro enabled for auto macro overlay is executed on each page, until the macro is disabled, deleted, a reset occurs, the page length is changed, the page size is changed or the page orientation is changed.

Undocumented PCL Commands

Command Syntax Version
Media Type EC&l#M
Negativ Motion EC&a#N
Text Parsing Method EC&t#P
Seed Row Source EC*b#S DeskJet 600
Set Black Optimization EC*b#B PCLSLEEK
Transfer Raster Data (Plane) EC*b#V[data]
Transfer Raster Data (Row/Block) EC*b#W[data]
Raster graphics depletion EC*o#D
# = 1..5
1 = None
2 = 25%
5 = 50%
PCLSLEEK
Print Quality EC*o#M
# = -1..1
-1 = EconoFast
0 = Normal
1 = Presentation
DeskJet 600
Mechanical Print Quality EC*o#Q
Driver Configuration EC*o#W[data] PCLSLEEK
User Defined Logical Page EC&a#W[LogicalPageFormat] HP D640 High-volume Printer
Self Test ECz
Test Pages EC|p#T
# = Testpage flags
bit 0 = Menus
bit 1 = Fontlist
bit 2 = Storage

Set Black Optimization

Specifies whether black optimization should be performed. Only supported by some inkjet devices. (PCLSLEEK)

<ESC>*b#B 

# = 1..2
1 = Enable
2 = Disable

When black is constructed by setting all the bits in the CMY color planes, the resulting color may have a non-black hue. This command can enable black optimization, to make black (composed of color inks) appear more black.

User Defined Logical Page

This command allows you to define the logical page. Not supported by most printers

<ESC>&a#W[LogicalPageFormat] 

Where # is the number of bytes of binary data following the terminator.

The default value for # is = NA.

The range for # is = 4,10.

The binary data describes the logical page format as shown below:

Byte 15 (MSB) 8 7 0 (LSB) Byte
0 Left Offset 1
2 Top Offset 3
4 Orientation Reserved (0) 5
6 Width 7
8 Height 9
  • Left Offset
    Specifies (in integer decipoints) the location of the left edge of the logical page with respect to the left side of the physical page in the selected viewing orientation. The range of values is -32767 to 32767.
  • Top Offset
    Specifies (in integer decipoints) the location of the top edge of the logical page with respect to the top edge of the physical page in the selected viewing orientation. The range of values is -32767 to 32767.
  • Orientation
    This is the viewing orientation of the logical page with respect to the physical page. Values may be 0 (portrait), 1(landscape), 2 (reverse portrait), or 3 (reverse landscape). All other values reset the logical page definition leaving the logical page as it was previously defined. Reserved Byte A byte which must be present in the data streamand must be equal to zero.
  • Width
    Logical page width is defined in decipoints. A zero width causes the logical page definition to be ignored. The logical page may be larger than the physical page. The range of values is 1 to 65535.
  • Height
    Logical page height is defined in decipoints. A zero height causes the logical page definition to be ignored. The logical page may be larger than the physical page. The range of values is 1 to 65535.

Either 4 or 10 bytes of binary data defining values in the specified range must be downloaded with this command. If more than 10 bytes are received, the excess number is disregarded. If the number of bytes received is less than 10 and greater than 4, the left and top offsets are changed and the remaining bytes are ignored.

Upon receipt of a valid, 4-byte command, the current logical page definition is updated with the new left and top offsets. The margins, print direction, and current active position (CAP) are retained relative to the new position of the logical page. (The only change to the current logical page is that now it is offset relative to the physical page.)

Upon receipt of a valid command with 10 or more bytes of binary data, the current logical page definition is discarded and the new definition is installed. The following actions take place with a new definition:

  • The macro overlay is disabled.
  • Any current raster graphics are closed.
  • The primary and secondary fonts are set for the selected orientation.
  • Print direction is set to zero and the orientation is set appropriately.
  • HMI, VMI, margins, and text length are set to their PCL defaults.
  • CAP is moved to (0,0).
  • CAP becomes floating.

The reference point used for tiling defaults to the upper-left corner of the current logical page. The tiles are printed based on the viewing orientation selected.

  • The picture frame is defaulted to the logical page bounds and the anchor point is set to the upper left corner of the logical page.
  • Any extra bytes specified with the command are disregarded.
  • The positions stored in the CAP stack are not changed with an orientation change. Therefore, the positions are relative to the top left corner of the current orientation.
  • The new logical page definition remains in effect until another logical page is defined, or the logical page is defaulted by receipt of a reset, an orientation change, a page length, or a paper size command. The current logical page definition (PCL default or user defined) is part of the user and overlay environments. A graphic mark will appear on the page if and only if it falls within the printable area and the logical page boundaries. For HP-GL/2 mode, graphics must also be within the defined picture frame and user defined window.

RTL - Raster Transfer Language

HP RTL is Hewlett-Packard’s Raster Transfer Language. It is a language that is understood by various plotters and printers, and is used to produce plotted or printed output from those devices. HP RTL is similar to Hewlett-Packard’s PCL printer language; many of its commands are the same as those of PCL, though some are different, and you should be aware of these differences if you are already familiar with PCL.

The following RTL commands are different from PCL.

Configure Raster Data

The Configure Raster Data command configures the device to receive raster data.

EC*g#W[data]
# = Bytes in the immediatly following format block.

The data format can have one of the following characteristics:

  • Direct mode. When you send data in Direct Mode, the data is printed without being retained inside the printer. This has as the advantage that the processing time is reduced to a minimum, but with the drawback that you will not be able to replot the job.
  • Four or more color pens: KCMY, KCMYcm or KCMYOG.
  • Different definitions for each pen.
  • Data organised in pixel- or plane-major order
  • Each pen is identified as a ‘channel’ of the active color space: K, C, M, Y, O, G, and so on.


Byte Length Description
0 1 Format
1 1 Number of Pens
2 1 Pens Major Specification
3 1 Reserved = 0
4 2 Horizontal Resolution for Pen 1
6 2 Vertical Resolution for Pen 1
8 2 Number of Intensity Levels for Pen 1 if Contone.
2: Halftone (1bit)
4: 2bit print modes
10 1 Planes Major Specification for Pen 1
11 1 Channel ID for Pen 1
8(n-1)+4 2 Horizontal Resolution for Pen n
8(n-1)+6 2 Vertical Resolution for Pen n
8(n-1)+8 2 Number of Intensity Levels for Pen n
8(n-1)+10 1 Planes Major Specification for Pen n
8(n-1)+11 1 Channel ID for Pen n

Byte 0: Format Number

  • 2: Unknown
  • 7: “Complex Direct Organisation—Major-Specification Channel-ID”.

Byte 1: Number of Pens

Value = 1..255
Specifies the number of expected pens. The Product Comparison Guide indicates the number of pens supported by each printer.

Byte 2: Pens Major Specification

Specifies how the data of the different pens is organised.

  • Value = 0: Pixel Major: All the bits for all the pens of a pixel are together, followed by the bits for the next pixel of the row and so on. In total there is a single plane per row.
  • Value = 1: Plane Major: The data for each pen bits are placed in different structures; there should be as many of these structures as pens. These structures, in turn, can also be organised in pixel- or plane-major, which is indicated in the appropriate fields for each pen. There can be pens with different major specifications.

Byte 3: Reserved

Value = 0

Bytes 4-5, 12-13, …: Horizontal Resolution

Value = 1 through 65535
Specifies the horizontal resolution of each pen, in pixels per inch of the source raster.

Bytes 6-7, 14-15, …: Vertical Resolution

Value = 1 through 65535
Specifies the vertical resolution of each pen, in pixels per inch of the source raster.

Bytes 8-9, 16-17, …: Number of Intensity Levels

Value = 2 through 65535
Specifies the number of intensity or grayscale levels for each pen for contone data. A level of 2 allows only two intensities expressed by 1 bit, since a pixel is either on or off. A level of 4 allows four intensities expressed by 2 bits, and so on. A level of 256 allows this number of intensities expressed by 8 bits, and is usually interpreted as contone data. Note that the number of levels could be 187, for instance, which would mean 8 bits to represent values between 0 and 187.
With halftone data, the number of intensity levels is not important, as the order in which the dots are fired by the pen for a certain pixel is not relevant. For this reason, this field is actually 2number of bits per pen for this particular pen, when dealing with halftoned data.
The lowest intensity is zero; the highest intensity is Number of Levels -1. The number of bits per pixel expected for each pen in each row is

ceiling(log2(number of levels))

where the ceiling function gives the next higher integer, for non-integer values. [So, ceiling(3.1) is 4.]

For example, three levels require two bits. The lowest order plane is transmitted first and the highest order plane last for a given pen of a row.

Byte 10, 18, …: Planes Major Specification

Specifies how the data of the pen is organised.

  • Value = 0: Pixel Major: All the bits of a pixel pen are together, followed by the bits of the next pixel pen of the row and so on. In total there are as many planes as pens per row.
  • Value = 1: Plane Major: There is one plane for each bit of the pixel pen. In total, in a row there are as many planes as bits per pixel.

When the Pens Major Specification (byte 2) is Pixel Major, the Planes Major Specification should be also Pixel Major; in this case the field is ignored.

Byte 11, 19, …: Channel ID

ID Channel
0 K (black)
1 C (cyan)
2 M (magenta)
3 Y (yellow)
4 R (red)
5 G (green)
6 B (blue)
7 W (white)
10 O (orange)
51 k (grey)
52 c (light cyan)
53 m (light magenta)

Specifies the channel a pen is intended for, that is, the pen ink color (as K,C,M,Y) or the channel of a previously defined color space. The order of the pen channel IDs in the command determines the order in which the data planes must be sent.

Rules

The use of the Configure Raster Data command is subjected to the following rules:

  • The ECE, Reset command overrides the Configure Raster Data configuration and enables any locked-out command.
  • The raster mode used by the printer is determined by the last valid EC*v#W[data], Configure Image Data command, Configure Raster Data command or EC*r#U, Simple Color command (with a parameter of -4) when the first raster row (or object for Configure Image Data) is processed.
  • The EC&a#N, Negative Motion command specifying no negative motion must be sent in the file with the Configure Raster Data or Simple Color command in order to activate this mode.
  • If the printer is already in this mode (by means of a Configure Raster Data or Simple Color command), any further Configure Raster Data or Simple Color commands are ignored.
  • The raster resolution is determined by the last valid Configure Raster Data command before entering this mode, that is, before the first raster row is sent.
  • This mode locks out the following commands and features until the receipt of a ESCE, Reset command:
    • EC*r#U, Simple Color
    • EC*t#R, Set Graphics Resolution
    • EC*v#W[data], Configure Image Data
    • Configure Raster Data itself
    • EC*v#N, Source Transparency Mode
    • Some cases of raster scaling mode (depending on the format configuration: halftone formats lock it, but contone formats allow it)
    • Inked Area feature
    • IW, Input Window—only the hard-clip limiting takes place
    • Current Active Position movements.
  • As a result of the last two items, this mode allows for a real full page raster description, and it requires the generation of all data in the page in the right order and format. If the data is generated for a bigger page than the one already loaded, hard-clip limiting takes place.
    Once in this mode, any HP-GL/2 command that implies the creation or maintenance of a display list is ignored.
  • Also, once an object or raster is sent to the device and a display list has been created, the Simple Color command with a parameter of -4 and the Configure Raster Data command are ignored. If an unsupported Configure Raster data command is sent to a printer, the job is cancelled.
  • The horizontal resolution defined in the Configure Raster Data command determines the horizontal pixel size for the EC*r#S, Source Raster Width, to which all the planes of all the rows for all pens are zero-filled or clipped.
    Similarly, the vertical resolution determines the vertical pixel size for EC*r#T, Source Raster Height, which defines the vertical height of the raster area.
  • Missing data is zero-filled if an EC*b#Y, Y Offset command is received after only part of the data defining the strip is sent.
  • The EC*b#V[data], Transfer Raster Data by Plane and EC*b#W[data], Transfer Raster Data by Row/Block commands download raster data, and the EC*b#M, Compression Method command defines the compression rules.

Raster Line Path

EC*b#L

Transfer Raster Data by Plane

EC*b#V[data]

HP-GL/2 - Hewlett-Packard Graphics Language

HP-GL/2 is the standardized version of the Hewlett-Packard Graphics Language. It is designed to provide a set of consistent functions across a wide range of peripheral devices, both plotters and printers. It's aim is therefore to reduce programming effort and the future compatibility of your programs, while allowing great flexibility in creating images.

HP-GL/2 is a super-set of HP-GL, with 4 exceptions: XT and YT (x tick and y tick), RP (Replot), and PG (Page Advance/Eject) are no longer supported andmust be sent as some method of PCL mode, and share the color pallet. As a result, HP-GL/2 is strictly a subset of PCL5.

Tools

    • SPLOT - The HP-GL/2, HP-GL, HP-RTL & DXY-GL plotter simulator.
    • WEBPlotter - - The HP-GL/2 PlugIn or ActiveX Control.
  • PageTech specializes in HP PCL transformation, Intellifont & TrueType typeface conversion utilities and developer libraries.
    • PCLReader a freeware tool for developers of HP PCL3GUI/4/5/5e/5c+HPGL/2+PCL XL+JetReady (PCL6) applications.
    • PCLWorks a complete tool set for developers of HP PCL3GUI/4/5/5e/5c+HPGL/2+PCL XL+JetReady (PCL6) applications.
    • PCLTool SDK is an industry exclusive library that converts HP PCL into TIFF, PDF, PDF/A, PNG and other formats including text extraction for legacy printstream data migration, re-engineering of print streams and other custom applications.
  • Cyrion Technologies PCL and Windows Printing informations. Tools, Articles and Links
  • RedTitan EscapeE includes PCL3GUI support in a versatile PCL3-PCL6c/HPGL view and transform system.

 
formats/page_description_languages/pcl.txt · Last modified: 2012/09/05 08:10 by christoph
 

All text is available under the terms of the GNU Free Documentation License (see Copyrights for details). Disclaimers

Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki