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
Setting
How This Developer’s Guide Works
Length set to 66 lines
Length is set, in number
Command Summary D
Command Usage Table E
Command Options F
Command Option Recognition Grid G
Detailed Command Description
Important Point
What are Printer Commands?
HP PCL Commands
Introduction to HP PCL
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
Follow Specifications
Priority of Feature Set Commands
Programming Hints
Leverage from Previous Programs
Priority of Commands
Time Savers
Programming Hints
HP PCL Commands
Testing Commands
Control Codes and Special Character Codes
Print Modes
Display Functions Mode on
Display Functions Mode OFF
Display Functions turned on
Display Functions turned off
Text Enhancements
CR = CR LF = LF FF = FF
CR = CR, LF LF = LF FF = FF
CR = CR LF = CR, LF 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
EconoFast mode selected
Print Quality
Normal quality selected
Best quality selected
Plain paper
Bond paper
Special paper HP Premium
Inkjet Paper
HP PCL Commands
Printer Diagnostics
Self-Test Esc z
Control
Length Line Values
Size
Size set to that indicated
By value index in the following
Tables
Value Description
Load z-fold media banners
Print current page source is
Unchanged
Load from tray
Orientation
Portrait
Landscape
Reverse Portrait
Number of 1/120 inch
Horizontal Motion Index
Increments
Vertical Motion Index
Number of 1/48 inch increments
Between rows
Out of range values
Line Spacing
Sets the number of lines printed
Per inch
Clear Horizontal Margins
Left Margin
Sets the left margin to the left
Edge of the specified column
Right Margin
Lines-per-inch setting
Top Margin
Top margin is set to specified
Number of lines at the current
Disables perforation skip mode
Enables perforation skip mode
Sets length of the text area,
Lines, from the top margin
HP PCL Commands
Horizontal Positioning Commands
Backspace
Carriage Return
Space
Formfeed
Horizontal Tab
Move CAP Horizontal Decipoints
Moves CAP horizontally by
Specified number of decipoints
Inch
Specified number of columns
Limit
Specified number of HP PCL
Units
HP PCL Commands
Vertical Positioning Commands
Move CAP Vertical Rows
Moves CAP to the same
Column position on a new line
Moves CAP to a new position
Move CAP Vertical Decipoints
Along the vertical axis
Move CAP Vertical HP PCL Units
Moves CAP specified number
HP PCL units along the Y
Axis
Font Selection
Font Symbol Set
Font Selection by Attribute
Symbol Set Name
TIS TAPCI23
Fixed spacing
Proportional spacing
Inter character spacing for
Current font is set
Font Height
Height for current font is set
Font Style
Specified characteristics are
Applied to font style request
Matching Algorithm
Book or text weight
Ultra thin
Extra 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 fonts temp
Permanent, and soft
Delete all temporary fonts
Temp, permanent, and soft
Raster Mode
Commands Locked Out of Raster Mode
Commands Allowed in Raster Mode
Raster Graphics
Printer returns to text mode
Command processing
Start graphics at logical
Left boundary current vertical
Graphics data printed at 75 dpi
Graphics data printed at 100 dpi
Graphics data printed at 150 dpi
Graphics data printed at 300 dpi
Current resolutiona
Source Raster Width
Raster region width is set to
Specified number of pixels at
Offset
Cursor is moved specified
Number of raster lines of vertical
Movement
Raster Data Transfer
Specified number of bytes
Graphics data for a single plane
Data is set to the printer.
Transfer Raster by Row/Block
Following specified number
Data bytes sent to the printer as
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
Method 9 Compressed Replacement Delta Row Encoding
Row 1 Esc * b 3 m 2 W 00000001
Row 2 Esc * b 2 W
Row 3 Esc * b 5 W 000000000000111100100010101010101010
Control Bit
Control Bit =
HP PCL Commands
Color
Single plane K palette
Planes, device CMY 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
Baseline Position Uint
Cell Width Uint
Cell Height Uint
Orientation Ubyte
Symbol Set Uint
Spacing Bool
Character Set UINT16
Pitch Uint
Stroke Weight Sbyte
Height Uint
XHeight Uint
Width Type Sbyte
Typeface LSB/MSB Ubyte
Typeface Family Value
Serif Style Ubyte
Quality
Placement
Underline Position Sbyte
Underline Thickness Ubyte
Text Height Uint
First Code Uint
Last Code/Number of Chars Uint
Pitch Extended Ubyte
Height Extended Ubyte
Resolution Uint
Cap Height Uint
Font Number Uint
Font Name ASC16
Copyright
Font Scaling Technology
Segment Size
102
Resolution UINT16
Bitmap Resolution Segment
103
Stroke Weight UINT32
Character Enhancement Segment
Style UINT32
104
Sizing UINT16
105
Dual-Pitch-Space Char Segment
Full-Width-Space Character Code UINT16
Half-Width-Space Character Code
106
Format Ubyte
HP LaserJet Bitmap Character Definition
107
Continuation Bool
Descriptor Size Ubyte
Class Ubyte
108
109
Class 2 Compressed Bitmap Character Data 110
Left Offset Sint
Top Offset Sint
Character Width Uint
Character Height Uint
Character Data
Delta X Sint
112
Esc & l # H
Banner Printing
113
Command Sequence
Margins
Moving to a New Logical
Unloading Continuous Media
Power-On with Continuous Media
Power-Off with Continuous Media
Sample HP PCL for a Banner Print Job
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
Other Resources for Assistance
HP Developer Exchange
Comments & Feedback
124