Contents
Hewlett-Packard Vancouver Site
Preface and Printing History
Printing History
About this Developer’s Guide
Which printers are covered by this guide1
Special Notes
Special Note HP DeskJet 710C, 720C and 820C Series printers
Table of Contents
HP PCL Commands
Fonts
HP LaserJet Bitmap Character Definition
Printer Commands
Length set to 66 lines
Setting
How This Developer’s Guide Works
Length is set, in number
Command Options F
Command Summary D
Command Usage Table E
Command Option Recognition Grid G
Detailed Command Description
Important Point
Introduction to HP PCL
What are Printer Commands?
HP PCL Commands
History of HP PCL Printer Language
Two-Character Escape Sequences
Syntax of Escape Sequences
Parameterized Escape Sequences
Esc & l 1 O
Esc
Text Area
Logical Page, Physical
Layout
Current Active Position CAP
CAP Position
CAP Reference Point
Print Environment
Merged Text and Graphics
Programming Hints
Follow Specifications
Priority of Feature Set Commands
Leverage from Previous Programs
Priority of Commands
Time Savers
Programming Hints
Control Codes and Special Character Codes
HP PCL Commands
Testing Commands
Print Modes
Display Functions turned on
Display Functions Mode on
Display Functions Mode OFF
Display Functions turned off
Text Enhancements
CR = CR LF = CR, LF FF =
CR = CR LF = LF FF = FF
CR = CR, LF LF = LF FF = FF
CR = CR, LF LF = CR, LF FF
Disables End-of-Line Wrap
Enables End-of-Line Wrap
End-of-Line Wrap
Reset Esc E
Job Control
Printer Control
Gray Balance Default Modes
Gray Balance
Dry Timer
Dry Timer Defaults
Normal quality selected
EconoFast mode selected
Print Quality
Best quality selected
Special paper HP Premium
Plain paper
Bond paper
Inkjet Paper
HP PCL Commands
Printer Diagnostics
Self-Test Esc z
Control
Length Line Values
By value index in the following
Size
Size set to that indicated
Tables
Value Description
Unchanged
Load z-fold media banners
Print current page source is
Load from tray
Landscape
Orientation
Portrait
Reverse Portrait
Number of 1/120 inch
Horizontal Motion Index
Increments
Between rows
Vertical Motion Index
Number of 1/48 inch increments
Out of range values
Per inch
Line Spacing
Sets the number of lines printed
Clear Horizontal Margins
Edge of the specified column
Left Margin
Sets the left margin to the left
Right Margin
Top margin is set to specified
Lines-per-inch setting
Top Margin
Number of lines at the current
Sets length of the text area,
Disables perforation skip mode
Enables perforation skip mode
Lines, from the top margin
HP PCL Commands
Carriage Return
Horizontal Positioning Commands
Backspace
Space
Formfeed
Horizontal Tab
Specified number of decipoints
Move CAP Horizontal Decipoints
Moves CAP horizontally by
Inch
Specified number of HP PCL
Specified number of columns
Limit
Units
HP PCL Commands
Moves CAP to the same
Vertical Positioning Commands
Move CAP Vertical Rows
Column position on a new line
Moves CAP to a new position
Move CAP Vertical Decipoints
Along the vertical axis
HP PCL units along the Y
Move CAP Vertical HP PCL Units
Moves CAP specified number
Axis
Font Selection
Font Symbol Set
Font Selection by Attribute
Symbol Set Name
TIS TAPCI23
Inter character spacing for
Fixed spacing
Proportional spacing
Current font is set
Font Height
Height for current font is set
Font Style
Specified characteristics are
Applied to font style request
Matching Algorithm
Extra thin
Book or text weight
Ultra thin
Thin
Font with indicated ID is
Font Selection by ID
Selected
Font ID Esc * c # D
Downloading Fonts
Download Font Esc s # W font definition
Download Font
Character Code
Download Character
Delete all temporary fonts
Delete all fonts temp
Permanent, and soft
Temp, permanent, and soft
Commands Allowed in Raster Mode
Raster Mode
Commands Locked Out of Raster Mode
Raster Graphics
Start graphics at logical
Printer returns to text mode
Command processing
Left boundary current vertical
Graphics data printed at 150 dpi
Graphics data printed at 75 dpi
Graphics data printed at 100 dpi
Graphics data printed at 300 dpi
Raster region width is set to
Current resolutiona
Source Raster Width
Specified number of pixels at
Number of raster lines of vertical
Offset
Cursor is moved specified
Movement
Graphics data for a single plane
Raster Data Transfer
Specified number of bytes
Data is set to the printer.
Data bytes sent to the printer as
Transfer Raster by Row/Block
Following specified number
Data
Raster Compression
Method 2 Tagged Image File Format Encoding Tiff revision
Has precedence if it is met before the literal run count
Replacement count 1 Left offset from the current byte O
Method 3 Delta Row Encoding
Delta ROW Example
Row 2 Esc * b 2 W
Method 9 Compressed Replacement Delta Row Encoding
Row 1 Esc * b 3 m 2 W 00000001
Row 3 Esc * b 5 W 000000000000111100100010101010101010
Control Bit
Control Bit =
HP PCL Commands
Planes, device CMY palette
Color
Single plane K palette
Planes, device RGB palette
White no ink Black
Black/Yellow Black/Magenta
Specified by the given index
Foreground Color
Current palette
Planes per Row Index Color
Planes per Row Index Color Printed
Standard Bitmap Font Definition
Fonts
Format
Resolution-Specified Bitmap Font Definition
Font Descriptor Size Uint
Symbol Set Type Ubyte
Descriptor Format Ubyte
Font Type Ubyte
Style MSB Uint
Cell Height Uint
Baseline Position Uint
Cell Width Uint
Orientation Ubyte
Character Set UINT16
Symbol Set Uint
Spacing Bool
Pitch Uint
XHeight Uint
Stroke Weight Sbyte
Height Uint
Width Type Sbyte
Typeface LSB/MSB Ubyte
Typeface Family Value
Serif Style Ubyte
Quality
Underline Thickness Ubyte
Placement
Underline Position Sbyte
Text Height Uint
Pitch Extended Ubyte
First Code Uint
Last Code/Number of Chars Uint
Height Extended Ubyte
Font Number Uint
Resolution Uint
Cap Height Uint
Font Name ASC16
Segment Size
Copyright
Font Scaling Technology
102
Resolution UINT16
Bitmap Resolution Segment
103
Style UINT32
Stroke Weight UINT32
Character Enhancement Segment
104
Sizing UINT16
105
Half-Width-Space Character Code
Dual-Pitch-Space Char Segment
Full-Width-Space Character Code UINT16
106
Format Ubyte
HP LaserJet Bitmap Character Definition
107
Class Ubyte
Continuation Bool
Descriptor Size Ubyte
108
109
Class 2 Compressed Bitmap Character Data 110
Character Width Uint
Left Offset Sint
Top Offset Sint
Character Height Uint
Character Data
Delta X Sint
112
Esc & l # H
Banner Printing
113
Moving to a New Logical
Command Sequence
Margins
Unloading Continuous Media
Sample HP PCL for a Banner Print Job
Power-On with Continuous Media
Power-Off with Continuous Media
Printing Cutsheet with Z-Fold Media
Formatting Program Example
HP PCL Code Samples
116
117
Commands Sent to Printer
118
14.3 3-Plane Color Graphics
119
14.4 4-Plane Color Graphics
120
121
Printer Commands
122
123
Comments & Feedback
Other Resources for Assistance
HP Developer Exchange
124