for the
HP LaserJet III / IIID / IIIP / IIISi
HP LaserJet 4 / 5 / 6 Families
HP LaserJet 1100 series
HP LaserJet 2100 series
HP LaserJet 4000 series
HP LaserJet 5000 series
HP LaserJet 8000 series
HP LaserJet 8100 series
HP Color LaserJet
HP Color LaserJet 5 / 5M
HP Color LaserJet 4500 series
HP Color LaserJet 8500 series
HP DeskJet 1200C / HP DeskJet 1600C
Printers
All Rights Reserved.
Reproduction, adaptation, or
translation without prior written
permission is prohibited, except
as allowed under the copyright
laws.
The information contained in
this document is subject to
change without notice.
Publication Number: 5021-0378
Edition 2, 6/2003
Trademarks
Intellifont is a U.S. registered
trademark of Agfa Division,
Miles Incorporated. CG Times is
a product of Agfa Corporation,
AGFA Compugraphic Division.
LaserJet, PCL, DeskJet, Vectra,
and Resolution Enhancement
are U.S. registered trademarks
of Hewlett-Packard Company.
IBM is a registered trademark of
International Business
Machines Corporation.
Wingdings, MS-Mincho, and
MS-Gothic are trademarks, and
Microsoft, Windows, and
MS-DOS are U.S. registered
trademarks of Microsoft
Corporation. Centronics is a
U.S. registered trademark of
Centronics Corporation. ITC Zapf Dingbats is a U.S.
registered trademark of
International Typeface
Corporation. Helvetica and
Times Roma n are trademarks of
Linotype AG and its
subsidiaries.
Univers is a U.S. registered
trademark of Linotype AG and
its subsidiaries. PostScript and
the PostScript logo are
registered trademarks of Adobe
Systems, Inc. in the U.S. and
other countries/regions. Arial,
Times New Roman, and
Monotype are U.S. registered
trademarks of Monotype
Corporation plc. Macintosh is a
registered trademark and
TrueType is a trademark of
Apple Computer, Inc. ESC/P is
a trademark of Seiko-Epson
Corporation.
Manual Conventions
This manual uses the following conventions:
• Bold indicates a term defined in the glossary.
• Italic refers to a related document, or is used for emphasis.
• The cursive letter l is used in some examples to distinguish
the letter “l” from the numeral “1” (one).
• A slash zero 0 is used in some examples and escape
sequences to distinguish the letter “O” from the number “0”.
• 0x XX represents a hexadecimal number (XX).
• The
NoteNotes contain important information set off from the text.
~ character indicates that the current line of code is a
Hewlett-Packard printers which support the PCL 5 printer language
contain slightly different feature sets, each suitable for that printer's
intended use. Each printer implements minor variations of PCL 5 as a
result of those differences. With new printer releases, new features
may be added with new commands and/or PCL operations which
require documentation.
The purpose of this guide is to identify the differences in the
implementation of the PCL 5 Printer Language for different
HP LaserJet and DeskJet printers, as compared to the features
described in the PCL 5 Printer Language Technical Reference Manual. This guide describes new commands and exceptions to
existing commands unique to the printers, as well as internal
typeface/font support and print environment settings.
NoteFor information about products newer than those included in this
book, see the PCL5 Comparison Guide Addendum, which includes
product-specific information about newer products, as well as
commands and variables added to support these newer products.
ENWWPrinter Features 1-1
This guide covers the following HP LaserJet printers:
This guide also covers the HP 1200C and 1600C DeskJet printers.
1-2 Printer FeaturesENWW
PCL Feature Support
Tables 1-1A through 1-1C, the PCL Feature Support Matrix, lists all
the printer commands from the PCL 5 Printer Language Technical Reference Manual and identifies which of these commands are
supported by the various printers. The table below describes the
printers covered in each table. (More detailed PCL information for
each PCL 5 printer is provided in Chapter 2.)
Table PagesFeatures for these Printers
1-1A1-6 to 15HP LaserJet III, IIID, IIISi, IIIP, 4, 4M, 4Si,
1-1B1-16 to 25HP Color LaserJet, Color LaserJet 5/5M,
1-1C1-26 to 35HP LaserJet 1100 Series, 2100 Series,
4000 Series, 5000 Series, 8000 Series,
8100 Series,
HP Color LaserJet 4500 Series,
HP Color LaserJet 8500 Series
NoteThe PCL 5 Printer Language Technical Reference Manual (part
number 5961-0509) was revised for the release of the HP LaserJet 4
printer and contains all PCL language features up to the
HP LaserJet 4 printer. Subsequent commands are covered in this
PCL 5 Comparison Guide and the PCL 5 Color Technical Reference
Manual.
ENWWPrinter Features 1-3
NoteIn Table 1-1, if the command value field parameters are not listed,
then all parameters are supported by printers that support that
command.
The value in parentheses following a command parameter identifies
the parameter value (for example, the parameter “Letter (2)” indicates
that the value field to select letter size in the Page Size command is
“2”).
Commands which are not supported (“ns”) by a printer are ignored.
1-4 Printer FeaturesENWW
PCL 5 Technical Reference Manual Corrections
This section describes updates to the PCL 5 Printer Language
Technical Reference Manual (5961-0509). Because this manual will
not be updated, any changes to it are documented in this guide.
Some errors have been identified in the PCL 5 Printer Language Technical Reference Manual since its printing. Those errors are
identified and corrections are provided on this page.
Chapter 4 PCL Job Control Commands
Unit of Measure Command
In Figure 4-6 on page 4-18, the two escape sequences at the top
should read “(
and (
?&u200B).”
Chapter 8 PCL Font Selection
Transparent Print Data Command
The last sentence in the note at the bottom of page 8-33 should read
“Refer to the PCL 5 Comparison Guide, Appendix A, for character
codes for the various symbol sets.” instead of “Refer to Appendix A
for character codes for the various symbol sets.”
?&u100D) and (?&u200D)” instead of “(?&u100B)
Chapter 13 The PCL Print Model
User-Defined Pattern Command
In Figure 13-10 on page 13-19, byte zero should read Format (20)
instead of Format (0)
On page 13-21, Format (Byte 0) should read “0” for a 300 DPI
user-defined pattern header and “20” for a resolution-specified
user-defined pattern header.
The Primary font printer comma nds in thi s tab le can be changed to Secondary by replaci n g th e left par enthe si s “(” in the command with a ri ght
parenthesis “)”.
Select Palette?&p#Snsnsnsnsnsnsnsnsnsnsns
Set Viewing Illuminant?*i#W[data]nsnsnsnsnsnsnsnsnsnsns
Simple Color?*r#Unsnsnsnsnsnsnsnsnsnsns
✓ Indicates a command is supported.ns - Indicates a command is not supported.
4Si
4Si Mx 4L
4ML
4P
4MP 4PJ
4 Plus
4M Plus4V4MV
1-14 Printer FeaturesENWW
Table 1-1A. PCL 5 Feature Support Matrix (continued)
FUNCTIONCOMMANDIII IIID IIISi IIIP44M
HP-GL/2 GRAPHICS
HP-GL/2—Commands listed
in Table A-2 except as
shown below
Advance Full PagePGns nsnsnsnsnsnsnsnsnsns
BezierBR, BZnsnsnsns✓✓✓✓✓ ✓ ✓
Begin PlotBPnsnsnsnsnsnsnsnsnsnsns
Chord Tolerance ModeCTnsnsnsnsnsnsnsnsnsnsns
(Relative) Color RangeCRnsnsnsnsnsnsnsnsnsnsns
Download CharacterDLnsnsnsnsnsnsnsnsnsnsns
Fill TypeFT
✓ Indicates a command is supported.ns - Indicates a command is not supported.
1
Supported in stand-alone HP-GL/2 Mode only (DeskJet 1200)
1
ns
1
ns
1
ns
ENWWPrinter Features 1-25
Table 1-1C. PCL 5 Feature Support Matrix
1100
2100
4000
4500
5000
8000
8100
FUNCTIONCOMMAND
Configuration (AppleTalk)?&b#W[data]✓✓✓✓✓✓✓ns
Universal Exit/Start of PJL (UEL) ?%–12345X ✓✓✓✓✓✓✓✓
Reset ?E ✓✓✓✓✓✓✓✓
Number of Copies ?&l#X ✓✓✓✓✓✓✓✓
Simplex/Duplex Print ?&l#S ✓✓✓✓✓✓✓✓
Left (Long-Edge) Offset
Registration
Top (Short-Edge) Offset
Registration
Unit Of Measure ?&u#D ✓✓✓✓✓✓✓✓
Mechanical Print Quality?*o#Qnsnsnsnsnsnsnsns
Media Type?&l#Mnsns3ns3nsns✓
Negative Motion?&a#Nnsnsnsnsnsnsnsns
Self-Test?z ✓✓✓✓✓✓✓✓
Paper Type?&n5WdBondnsns✓✓✓✓✓✓
✓ Indicates a command is supported.ns - Indicates a command is not supported.
1
For custom paper, replace “CustomType” with the name of the paper, and replace “#” with the number of characters in the name, plus1.
nsnsns
Print Direction?&a#P✓✓✓✓✓✓✓✓
Character Text Path Dir.?&c#T✓✓✓✓✓✓✓✓
Left Margin?&a#L✓✓✓✓✓✓✓✓
Right Margin?&a#M✓✓✓✓✓✓✓✓
Clear Horizontal Margins?9✓✓✓✓✓✓✓✓
Top Margin?&l#E ✓✓✓✓✓✓✓✓
Text Length?&l#F✓✓✓✓✓✓✓✓
Perforation Skip?&l#L✓✓✓✓✓✓✓✓
Horizontal Motion Index?&k#H✓✓✓✓✓✓✓✓
Vertical Motion Index?&l#C✓✓✓✓✓✓✓✓
Line Spacing ?&l#D✓✓✓✓✓✓✓✓
ALPHANUMERIC ID (Media selection by type/PCL mass storage command)
Alphanumeric ID?&n#W[operation] [string]✓✓✓✓1✓✓✓✓
✓ Indicates a command is supported.ns - Indicates a command is not supported.
1
The LaserJet 4500 series printers support any Alphanumeric ID command that does not reference anything stored on a hard disk.
2
For these printers, see the printer-specific sections in Chapter 2.
3
The LaserJet 4000 series printers support HCI trays 2 – 41 (20 – 59)
Series
8500
Series
1-28 Printer FeaturesENWW
Table 1-1C. PCL 5 Feature Support Matrix (continued)
1100
2100
4000
4500
5000
8000
8100
FUNCTIONCOMMAND
Horizontal Position?&a#C✓✓✓✓✓✓✓✓
?*p#X✓✓✓✓✓✓✓✓
?&a#H✓✓✓✓ ✓ ✓✓✓
Vertical Position?&a#R✓✓✓✓✓✓✓✓
?*p#Y✓✓✓✓✓✓✓✓
?&a#V✓✓✓✓✓ ✓✓✓
Half Line Feed?=✓✓✓✓✓✓✓✓
Line Termination?&k#G✓✓✓✓✓✓✓✓
Push/Pop Position?&f#S✓✓✓✓✓✓✓✓
The Primary font commands in this table can be changed to Secondary by replacing the left parenthesis “(” in the command with a right
parenthesis “)”.
Symbol Set (Primary)?(ID✓✓✓✓✓✓✓✓
Spacing (Primary)?(s#P✓✓✓✓✓✓✓✓
Pitch (Primary)?(s#H✓✓✓✓✓✓✓✓
Height (Primary)?(s#V✓✓✓✓✓✓✓✓
Style (Primary)?(s#S✓✓✓✓✓✓✓✓
Stroke Weight (Primary)?(s#B✓✓✓✓✓✓✓✓
Typeface (Primary)?(s#T✓✓✓✓✓✓✓✓
Font Selection By ID # (Pri.)?(#X✓✓✓✓✓✓✓✓
Select Default Font (Primary)?(3@✓✓✓✓✓✓✓✓
Underline?&d#D✓✓✓✓✓✓✓✓
?&d@ ✓✓✓✓✓✓✓✓
Transparent Print Data?&p#X[data]✓✓✓✓✓✓✓✓
Text Parsing Method?&t#P ✓✓✓✓✓✓✓✓
Assign Font ID #?*c#D✓✓✓✓✓✓✓✓
Font Control?*c#F✓✓✓✓✓✓✓✓
USER-DEFINED SYMBOL SET
Symbol Set ID Code?*c#R✓✓✓✓✓✓✓✓
Define Symbol Set?(f#W[data]✓✓✓✓✓✓✓✓
Symbol Set Control?*c#S✓✓✓✓✓✓✓✓
✓ Indicates a command is supported.ns - Indicates a command is not supported.
Series
Series
CURSOR POSITIONING
FONT SELECTION
FONT MANAGEMENT
Series
Series
Series
Series
Series
8500
Series
ENWWPrinter Features 1-29
Table 1-1C. PCL 5 Feature Support Matrix (continued)
1100
2100
4000
4500
5000
8000
8100
FUNCTIONCOMMAND
Font Descriptor?)s#W[data]
Range: 0 - 32767✓✓✓✓✓✓✓✓
Range: 0 - 65535✓✓ns
Character Code?*c#E✓✓✓✓✓✓✓✓
Download Character?(s#W[data]✓✓✓✓✓✓✓✓
Macro ID?&f#Y✓✓✓✓✓✓✓✓
Macro Control?&f#X ✓✓✓✓✓✓✓✓
Source Transparency Mode ?*v#N ✓✓✓✓✓✓✓✓
Pattern Transparency Mode?*v#O✓✓✓✓✓✓✓✓
Area Fill (Pattern) ID?*c#G✓✓✓✓✓✓✓✓
Select Current Pattern?*v#T
Solid Black (0)✓✓✓✓✓✓✓✓
Solid White (1)✓✓✓✓✓✓✓✓
HP Shading Pattern (2)✓✓✓✓✓✓✓✓
Cross-hatch Pattern (3)
(HP-hatch Pattern)
User-defined Pat tern (4)✓✓✓✓✓✓✓✓
Logical Operation?*l#O✓✓✓✓✓✓✓✓
Pixel Placement?*l#R✓✓✓✓✓✓✓✓
At CAP, scaling ON (3)nsnsns✓nsnsns✓
Y Offset?*b#Y✓✓✓✓✓✓✓✓
Set Compression Mode?*b#M
Unencoded (0)✓✓✓✓✓✓✓✓
Run-Length Encoded (1)✓✓✓✓✓✓✓✓
TIFF Encoded (2)✓✓✓✓✓✓✓✓
Delta Row Encoded (3)✓✓✓✓✓✓✓✓
Mode 5 Adaptive (5)✓✓✓✓✓✓✓✓
Replacement Delta Row (9)nsnsnsnsnsnsnsns
Transfer Raster (Row/Block)?*b#W[data]✓✓✓✓✓✓✓✓
Transfer Ra ster (Plane)?*b#V[data]nsnsns3nsnsns✓
End Graphics
Version B?*rB✓✓✓✓✓✓✓✓
Version C (Preferred)?*rC✓✓✓✓✓✓✓✓
✓ Indicates a command is supported.ns - Indicates a command is not supported.
1
Supported if printer resolution is 600 dpi.
1
Series
Series
Series
Series
Series
RASTER GRAPHICS
✓✓✓✓✓✓✓✓
nsnsns✓nsnsns✓
Series
Series
8500
Series
ENWWPrinter Features 1-31
Table 1-1C. PCL 5 Feature Support Matrix (continued)
1100
2100
4000
4500
5000
8000
8100
FUNCTIONCOMMAND
RECTANGULAR AREA FILL
Horizontal Rectangle Size?*c#A✓✓✓✓✓✓✓✓
?*c#H✓✓✓✓✓✓✓✓
Vertical Rectangle Size?*c#B✓✓✓✓✓✓✓✓
?*c#V✓✓✓✓✓✓✓✓
Pattern ID (Area Fill ID)?*c#G
1-100 for Shading✓✓✓✓✓✓✓✓
1-6 for Cross-hatch✓✓✓✓✓✓✓✓
0-32767 for User-defined ✓✓✓✓✓✓✓✓
Fill Rectangle Area?*c#P
Black (solid) (0)✓✓✓✓✓✓✓✓
(Solid) White (erase) (1)✓✓✓✓✓✓✓✓
Shaded (gray) (2)✓✓✓✓✓✓✓✓
Cross-hatch Pattern (3)✓✓✓✓✓✓✓✓
User-defined Pat tern (4)✓✓✓ ✓✓✓✓✓
Current Pattern (5)✓✓✓✓✓✓✓✓
Set Status Readback Location
Type
Set Status Readback Location Unit ?*s#U✓✓✓✓✓✓✓✓
Inquire Status Readback Entity?*s#I ✓✓✓✓✓✓✓✓
Free Space?*s1M✓✓✓ns✓✓✓✓
Flush All Pages?&r#F✓✓✓ns ✓✓✓✓
Echo?*s#X✓✓✓✓✓✓✓✓
✓ Indicates a command is supported.ns - Indicates a command is not supported.
?*s#T✓✓✓✓✓✓✓✓
Series
Series
STATUS READBACK
Series
Series
Series
Series
Series
8500
Series
1-32 Printer FeaturesENWW
Table 1-1C. PCL 5 Feature Support Matrix (continued)
1100
2100
4000
4500
5000
8000
8100
FUNCTIONCOMMAND
PICTURE FRAME (for Vector Graphics)
Picture Frame Horiz. Size ?*c#X✓✓✓✓✓✓✓✓
Picture Frame Vert. Size?*c#Y✓✓✓✓✓✓✓✓
Set Picture Frame Anchor Point ?*c0T✓✓✓✓✓✓✓✓
HP-GL/2 Horiz. Plot Size?*c#K✓✓✓✓✓✓✓✓
HP-GL/2 Vert. Plot Size?*c#L✓✓✓✓✓✓✓✓
Enter HP-GL/2?%#B
_Stand-alone plotter (-1)nsnsnsnsnsnsnsns
_Previous HP-GL (0)✓✓✓✓✓✓✓✓
_Current PCL CAP (1)✓✓✓✓✓✓✓✓
_Current PCL coordinates and
old HP-GL/2 (2)
_Current PCL coordinates and
current CAP (3)
Enter PCL Mode?%#A✓✓✓✓✓✓✓✓
Display Functions
On?Y✓✓✓✓✓✓✓✓
Off?Z✓✓✓✓✓✓✓✓
End-Of-Line Wrap?&s#C✓✓✓✓✓✓✓✓
✓ Indicates a command is supported.ns - Indicates a command is not supported.
Series
Series
nsnsnsnsnsnsnsns
nsnsnsnsnsnsnsns
PROGRAMMING HINTS
Series
Series
Series
Series
Series
8500
Series
ENWWPrinter Features 1-33
Table 1-1C. PCL 5 Feature Support Matrix (continued)
1100
2100
4000
4500
5000
8000
FUNCTIONCOMMAND
PCL 5 COLOR COMMANDS
Assign Color Index?*v#Insnsns✓nsnsns✓
Color Component 1?*v#Ansnsns✓nsnsns✓
Color Component 2?*v#Bnsnsns✓nsnsns✓
Color Component 3?*v#Cnsnsns✓nsnsns✓
Color Lookup Tables?*l#W[data]nsnsnsnsnsnsns✓
Configure Image Data?*v#W[data]nsnsns✓
Download Dither Matrix?*m#Wnsnsnsnsnsnsns✓
Driver Function Config.?*o3W643nsnsns✓nsnsnsns
Select Palette?&p#Snsnsns✓nsnsns✓
Set Viewing Illuminant?*i#W[data]nsnsnsnsnsnsns✓
Simple Color?*r#Unsnsns✓nsnsns✓
✓ Indicates a command is supported.ns - Indicates a command is not supported.
1
The HP LaserJet 4500 Series printers do not support Luminance-Chrominance and CIE Lab , the long fo rm of RGB/CMY, and the long form
of cRGB
Series
Series
Series
Series
Series
1
nsnsns✓
nsnsns✓
only
nsnsns✓
only
Series
8100
Series
Series
8500
1-34 Printer FeaturesENWW
Table 1-1C. PCL 5 Feature Support Matrix (continued)
1100
2100
4000
4500
5000
8000
8100
FUNCTIONCOMMAND
HP-GL/2—Commands listed in
Table A-2 except as shown below
Advance Full PagePG✓✓✓ns✓✓✓ns
BezierBR, BZ✓✓✓✓✓✓✓✓
Begin PlotBPnsnsnsnsnsnsnsns
Chord Tolerance ModeCTnsnsnsnsnsnsnsns
(Relative) Color RangeCRnsnsns✓nsnsns✓
Download CharacterDLnsnsnsnsnsnsnsns
Fill TypeFT
21✓✓✓✓✓✓✓✓
Media TypeMTnsnsnsnsnsnsnsns
Merge ControlMC ✓✓✓✓✓✓✓✓
Number of PensNPnsnsns✓nsnsns✓
Output ErrorOEnsnsnsnsnsnsnsns
Output Hardcopy LimitsOHnsnsnsnsnsnsnsns
Output IdentificationOInsnsnsnsnsnsnsns
Output P1 and P2OPnsnsnsnsnsnsnsns
Output StatusOSnsnsnsnsnsnsnsns
Pen Color AssignmentPCnsnsns✓nsnsns✓
Pixel PlacementPP ✓✓✓✓✓✓✓✓
Plot SizePSnsnsnsnsnsnsnsns
Quality LevelQLnsnsnsnsnsnsnsns
ReplotRPnsnsnsnsnsnsnsns
✓ Indicates a command is supported.ns - Indicates a command is not supported.
Series
Series
HP-GL/2 GRAPHICS
✓✓✓✓✓✓✓✓
Series
Series
Series
Series
Series
8500
Series
ENWWPrinter Features 1-35
Printable Area
The relationships between physical page, logical page, default picture
frame, and printable area are illustrated in Figures 1-1 and 1-2. The
tables list the variations in sizes for the different physical page sizes.
For more information concerning printable area or logical/physical
page differences, consult the PCL 5 Printer Language Technical Reference Manual.
1-36 Printer FeaturesENWW
DIMENSIONS (in dots at 300 DPI - double for 600 DPI)
PAPER SIZEABCDEFGH
Portrait Dimensi ons
Letter255033002400330075050150
Legal255042002400420075050150
Ledger330051003150510075050150
Executive217531502025315075050150
A4248035072338350771050150
A3350749603365496071050150
Com-10123728501087285075050150
Monarch116222501012225075050150
C5191327041771270471050150
B5207829521936295271050150
DL129925981157259871050150
JIS B4303542992893429971050150
JIS B5214930352007303571050150
Hagaki118117481039174871050150
Oufuku-hagaki174823 621606236271050150
Figure 1-1Portrait Logical Page and Printable Area Boundaries
ENWWPrinter Features 1-37
DIMENSIONS (in dots at 300 DPI - double for 600 DPI)
Figure 1-2Landscape Logical Page and Printable Area Boundaries
1-38 Printer FeaturesENWW
Printer-Specific
2
Differences
Introduction
Each Hewlett-Packard printer implements minor variations of PCL 5
in order to best suit its intended use. This chapter describes specific
differences that are important when developing applications for the
various PCL 5 printers. The sections in this chapter describe such
information as new commands not contained in the PCL 5 Printer Language Technical Reference Manual, and other misc ell an eou s
differences in PCL operation particular to that printer.
NoteFor information about products newer than those included in this
book, see the PCL5 Comparison Guide Addendum, which includes
product-specific information about newer products, as well as
commands and variables added to support these newer products.
HP LaserJet III and IIID Printers
With the introduction of the HP LaserJet III printer, Hewlett-Packard
introduced the PCL 5 printer language. The PCL 5 printer language
incorporated many new features over the PCL 4 language. A few of
the more significant features included such things as the addition of a
scalable font technology, HP-GL/2 vector graphics language support,
print model features, raster graphics enhancements, and the Print
Direction command.
The HP LaserJet IIID printer language support is basically identical to
the HP LaserJet III printer except for the addition of the duplex
feature, dual input bin, envelope feeder support and their associated
commands (see Table 1-1).
ENWWPrinter-Specific Differ ences 2-1
HP LaserJet IIISi Printer
Several new PCL features were added to the PCL 5 language with the
release of the HP LaserJet IIISi printer. These new features are
summarized in Table 2-1 below.
Table 2-1. PCL Feature Additions for HP LaserJet IIISi Printer
FeatureStatusComments
Number of CopiesModified Greater range, 1 to 32,767.
Page SizeModifiedC5 Envelopes not supported.
Output Bin Selection
Command
End Raster Graphics
Command
Job SeparationNew CommandCauses the paper stacker to shift
FontsNew Additions Four variations of Univers
NewAllows programmatic selection of
upper or lower output paper bins.
New/ModifiedModified version of the existing End
Raster Graphics command.
positions to offset the output paper
stack.
Condensed; ITC Zapf Dingbats in
five symbol sets.
HP LaserJet IIIP Printer
Several new PCL features were added to the PCL 5 language with the
release of the HP LaserJet IIIP printer. These new features are
summarized in Table 2-2. One new feature listed here is adaptive
compression (method 5) for the Raster Compression Mode
command. In addition to compressing data for transmission, if certain
rules are followed (discussed below), the HP LaserJet IIIP printer will
store adaptive compressed data in compressed format and only
decompress it when required for printing. There are certain
requirements which must be met for this data to be stored in
compressed format. These requirements are discussed following
Table 2-2.
2-2 Printer-Specific DifferencesENWW
Table 2-2. HP LaserJet IIIP PCL Feature Additions
Feature/CommandStatusComments
Set Compression MethodModified Adds Adaptive Compression method to the
Set Compression Method command.
End Raster Graphics
Command
ModifiedModified version of the End Raster
Graphics command.
User-defined PatternsNewEnables users to define and download
their own user-defined pattern.
User-defined Pattern
Command
Set Pattern Reference Point
New
Feature
Used to download the binary data for
user-defined pattern.
New Sets pattern reference point.
Command
Pattern Control CommandNewUsed to make user-defined patterns
permanent or temporary, or to delete them.
Select Pattern & Fill
Rectangular Area
ModifiedAdds a parameter to support user-defined
patterns.
Commands
Pattern ID CommandModifiedIn addition to selecting internal patterns,
this command is now used to assign an ID
to a user-defined pattern as well as to
select patterns. Also, parameter range is
extended from 100 to 32,767.
User-defined Symbol SetsNew
Feature
Define Symbol Set
NewIdentifies the characters for a user-defined
Command
Enables user to build a symbol set which
contains user-selected characters.
symbol set.
Symbol Set ID Code
Command
Symbol Set Cont rol
Command
Unbound Scalable FontsNew
NewAssigns a number for identification to the
user-defined symbol set.
NewUsed to make user-defined symbol sets
permanent or temporary, or to delete them.
Allows typefaces (unbound fonts), not just
Feature
fonts (bound fonts) to be downloaded to
the printer.
Unbound Scalable Font
Descriptor
ENWWPrinter-Specific Differ ences 2-3
NewAddition of a new header used for unbound
fonts (font type 10).
Raster Graphics Adaptive Compression (IIIP)
Adaptive compression was added to the PCL language with the
introduction of the HP LaserJet IIIP printer. Adaptive compression (or
method 5 as it is referred to) is a method for compressing raster data
using the raster Set Compression Method command (parameter
value 5). (Refer to the Set Compression Method command in the
PCL 5 Printer Language Technical Reference manual for detailed
information on using this compression technique.) Also, refer to
Chapter 5 in this document, “Raster Graphics Adaptive Compression
(Method 5)” for additional information.
HP LaserJet 4 Printer
Several new PCL features were added to the PCL 5 language with the
release of the HP LaserJet 4 printer. These new features are
summarized in Table 2-3. Most of these features are described in the
revised PCL 5 Printer Language Technical Reference Manual (part
number 5961-0509). (This revised technical reference manual is
supplied as part of the Technical Reference Documentation Package
which can be obtained by ordering part number 5961-0601.) In
addition, there are some additional differences for the HP LaserJet 4
printer that are not covered in the technical reference manual but are
described below.
NoteThe HP LaserJet 4M printer, in addition to PCL, contains PostScript
and a LocalTalk I/O for printing in the Macintosh environment. PCL
operation and the PCL internal fonts for this printer are identical to the
HP LaserJet 4 printer. Thus, for PCL information for the
HP LaserJet 4M printer, refer to the HP LaserJet 4 printer features.
2-4 Printer-Specific DifferencesENWW
Table 2-3. PCL Feature Additions for HP LaserJet 4
Feature/CommandSupportComments
Adaptive Compression System N ewAdaptive compression system enables the printer to
Configuration CommandNewAllows PCL jobs to be printed (using LocalTalk or
Number of CopiesModified Supports 1-32,767 copies as does the HP LaserJet IIISi
Units of Measure Command NewAllows selection of the units of measure for cursor
Page Size ModifiedA parameter value is added for B5 enve lope size; the
Bitmap Font SupportNew HeaderPrinter will expand 300 dpi bitmap fonts to 600 dpi. A
Scalable Font SupportNew HeaderA new Universal header has been added to allow
T rueTypeNewTrueType scaling technology support has been added to
Internal TypefacesNewSev eral new Intellifont and TrueType internal typef ac es
Raster Resolution Command ModifiedParameter values ha ve been added to support raster
User-defined PatternNew HeaderA new 300/600 dpi user-defined pattern header has
Continued on next page.
compress internal raster data when memory becomes
low. This operation occurs automatically; there are no
PCL commands for this feature (refer to Chapter 5 for
ADC information).
EtherTalk MIO) using AppleT alk protocol.
printer.
moves, drawing rules, and for character spacing (font
metrics).
HP LaserJet 4 printer supports the four standard paper
sizes and five envelope sizes.
new 300/600 dpi bitmap font descriptor has been added
to allow bitmap fonts to be created that work at either
1/300 or 1/600 inch printer resolution.
design of typefaces of different scaling technologies to
be supported by one header. This header is used to
support TrueType on the HP LaserJet 4 printer. (This
header will be used to support any other new scaling
technologies HP may add in the future).
the printer.
(and supporting symbol sets) are now provided in the
printer.
resolutions of 200 dpi and 600 dpi.
been added to support patterns that work at either
1/300 or 1/600 inch printer resolution.
ENWWPrinter-Specific Differ ences 2-5
Table 2-3. PCL Feature Additions for HP LaserJet 4 (continued)
Feature/Command Support Comments
Status ReadbackNew FeatureThe addition of 6 new status readback commands
Location Type Command New Used to specify a status readback type of location
Location Unit Command NewSpecifies a status readback location unit (all,
Inquire Entity Command NewRequests the status from the location (type and unit)
Flush All Pages CommandNewAllows the user to clear page data from printer
Free Memory CommandNewThis command returns the current available memory.
Echo CommandNewAllows the user to send a unique ID number to the
Bezier Curve CommandsNewHP-GL/2 commands (relative and absolute) that allow
Label OriginModifiedLabel position LO 21 is provided for correct alignment
Fill PolygonModifiedPreviously, the HP-GL/2 Fill Polygon command filled
MacrosModifiedHP-GL/2 is now supported in macros.
Configuration CommandNewAdded to allow the user to communicate with the MIO
enable the user to receive certain information back
from the printer about fonts, symbol sets, macros,
user-defined patterns, and available memory.
(current, all, internal, downloaded, cartridge, SIMMs).
temporary or permanent, highest-lowest priority,
specific SIMM).
specified for fonts, symbol sets, macros, or
user-defined patterns.
memory.
printer to be used as a “place holder.”
a user to draw complex curves with less data required
than that required for arcs.
of HP-GL/2 text with PCL text.
polygons using the odd/even fill technique. A second
technique, non-zero winding fill, has been added.
card in the printer.
2-6 Printer-Specific DifferencesENWW
Configuration Command (AppleTalk)
The Configuration command allows a user to send PCL jobs to the
printer over AppleT alk. This data is sent in the form of “key/value” data
pairs (refer to “AppleTalk Configuration” below for more information).
?&b#W [key]<sp>[value]
# = Number of data bytes that follow command
Default =0
Range = 0 - 32767
[key] can be 1 character through 32765 characters.
[value] can be 1 character through 32765 characters.
AppleTalk Configuration
The HP LaserJet 4 printer can be configured to receive PCL print jobs
over an AppleTalk connection using the Configuration command. The
HP LaserJet 4 MIO AppleTalk interfaces support three key values:
RENAME, JOB, and TYPE. These keys are used for configuring an
installed LocalTalk or EtherTalk MIO card to allow PCL print jobs
generated by a Macintosh host to be printed.
ENWWPrinter-Specific Differ ences 2-7
NotePostScript in the HP LaserJet 4 printer supports the PostScript level 1
operators setprintername, AppleTalktype, and jobname, and the
PostScript level 2 setdevparams operator to allow PostScript print
jobs to change the Name Binding Protocol (NBP) printer name and
printer type, as well as change the print job name.
MIO sub-system in the printer accepts a new NBP printer name, NBP
printer type, and job name from either the PCL or PostScript
personalities. The printer passes that information across the MIO
interface to the installed MIO card which indicated support for the
MIO AppleTalk extensions. The MIO sub-system will treat the PCL
NBP type and the PostScript NBP type separately.
For information about AppleTalk Name Binding Protocol refer to
Inside AppleTalk published by Addison Wesley Company, Inc.
RENAME
RENAME changes the printer name portion of the printer’s AppleTalk
Name Binding Protocol name field.
?&b#WRENAME<sp>printername
Valid characters for the printer name include 0-255 except for
characters $00, “@” ($40), “:” ($3A), “*” ($2A), “=” ($3D), and $C5.
The printername must contain at least one character, and only the
first 31 characters are used. If an invalid character ($00 is not treated
as an invalid character) is contained in the printername, the printer
will ignore the escape sequence. If the printer encounters the NULL
($00) character, the printer uses the NULL character to terminate the
printer name. All the characters preceding the NULL will be used. If
another device on the AppleTalk network uses the same printer
name, another character is added to the end of the printer name.
The default printername is the printer model (for example,
“HP LaserJet 4”).
2-8 Printer-Specific DifferencesENWW
JOB
JOB renames the current job name.
?&b#WJOB<sp>jobname
All characters are valid. For the job name the first 127 characters are
used.
There is no default jobname.
TYPE
TYPE changes the type (device type) portion of the printer’s
AppleTalk Name Binding Protocol type field.
?&b#WTYPE<sp>devicetype
Valid characters for the device type include 0-255 except for
characters $00, “@” ($40), “:” ($3A), “*” ($2A), “=” ($3D), and $C5.
The devicetype must contain at least one character, and only the first
31 characters are used. If an invalid character ($00 is not treated as
an invalid character) is contained in the devicetype, the printer will
ignore the escape sequence. If the printer encounters the NULL ($00)
character in the devicetype, it uses the NULL character to terminate
the device type. All the characters preceding the NULL will be used
as the devicetype. If the device type is invalid then the printer's type is
not changed.
The default device type for PCL is “HP LaserJet 4” and for PostScript
is “LaserWriter”.
ENWWPrinter-Specific Differ ences 2-9
HP LaserJet 4Si Printer
The HP LaserJet 4Si printer is the follow-on to the HP LaserJet IIISi
printer. The HP LaserJet 4Si printer contains many new PCL features
over the HP LaserJet IIISi. PCL support for the HP LaserJet 4Si
printer is identical to the HP LaserJet 4 printer except for the addition
of the duplex feature, dual output bin (see Table 1-1) and resource
saving.
Like the HP LaserJet IIISi printer, the HP LaserJet 4Si supports the
HP LaserJet IIISi features listed in Table 2-1 with two exceptions.
First, is that the HP LaserJet 4Si does not support ITC Zapf Dingbats.
Font s up p ort for the HP LaserJet 4 Si is identic al t o t h e HPLaserJet 4
printer (refer to Chapter 3, “Internal T ypefaces/Fonts and Symbol
Sets,” for complete font support information). The other exception
concerns job separation. The PCL Job Separation command is not
supported. The HP LaserJet 4Si printer handles job separation
through the control panel. If a PCL Job Separation command is
received by the printer it will be ignored. Refer to the HP LaserJet 4Si User’s Manual (part number C2010-90901) for additional information.
Resource saving, a new feature in the HP LaserJet 4Si printer, allows
saving information for the current language (PCL or PostScript) when
switching to the other language. If resource saving is enabled (from
the control panel or PJL; no PCL commands are required for this
operation), all the permanent fonts, macros, and user-defined
patterns plus some other miscellaneous data is saved in a reserved
portion of printer memory. This data is stored until the language is
enabled again. When the language is re-enabled, the stored data will
be made a vailable for use.
2-10 Printer-Specific Differenc esENWW
HP LaserJet 4L Printer
The HP LaserJet 4L printer is a smaller, low-cost HP LaserJet printer.
The control panel on this printer is limited to one button with four
indicators. Many of the control panel functions must be controlled
programmatically using Hewlett-Packard’s Printer Job Language
(refer to the Printer Job Language Technical Reference Manual, part
number 5021-0380 for detailed PJL information).
The HP LaserJet 4L printer PCL command features are identical to
those of the HP LaserJet 4 printer PCL features, except for some
differences in parameter values (such as for paper source—refer to
Table 1-1). Additional features which do not require PCL command
control include EconoMode and HP Memory Enhancement
technology (MEt). EconoMode causes the printer to print less dots,
thus saving toner. Memory Enhancement technology involves some
memory saving techniques to better utilize available memory (refer to
Chapter 5, “Memory Usage” for additional information).
Typefaces in the HP LaserJet 4L printer are different from those of the
HP LaserJet 4 printer. The HP LaserJet 4 printer contains both
Intellifont and TrueType scaling technologies, but the 4L contains only
Intellifont scaling technology. T hus, the 4L does not contain any of the
TrueType typefaces, with one modification. The TrueType Wingdings
typeface has been converted to Intellifont format and is available in
the printer as an Intellifont typeface (refer to Chapter 3, “Internal
Typefaces/Fonts and Symbol Sets” for additional information). The
Line Printer bitmap font is not present on the HP LaserJet 4L printer.
ENWWPrinter-Specific Differences 2-11
HP LaserJet 4ML Printer
The HP LaserJet 4ML printer is similar to the HP LaserJet 4L printer,
however, the 4ML includes PostScript and a LocalTalk I/O for printing
in the Macintosh environment. The HP LaserJet 4ML printer also
includes some new PCL features: print model logical operation
(ROP3) and pixel placement, as described on the following pages.
The HP LaserJet 4ML supports the typefaces that the HP LaserJet 4
printer supports. Several of the typefaces in the HP LaserJet 4ML
printer have additional support for the Latin 2 and Latin 5 symbol sets
(refer to Chapter 3, “Internal Typefaces/Fonts and Symbol Sets,” for
complete font support information). The Line Printer bitmap font is not
present on the HP LaserJet 4L printer.
Table 2-4. PCL Feature Additions for HP LaserJet 4ML
FeatureStatusComments
Paper (Job) Size
Command
Logical OperationsNewModifies the print model to allow logical
Pixel Placement (PCL) NewAllows user to select either grid intersection
Pixel Placement
(HP-GL/2)
Merge ControlNewAllows the user to use logical operations
ModifiedAn additional parameter (101) has been
added to provide support for custom size.
operations (such as AND, OR, XOR, NOT) to
be performed on source, texture, and
destination.
or grid centered placement of pixels when
rendering an image in PCL.
NewAllows user to select either grid intersection
or grid centered placement of pixels when
rendering an image in HP-GL/2.
(ROP’s) in HP-GL/2.
2-12 Printer-Specific Differenc esENWW
Logical Operations
With the introduction of the HP LaserJet 4ML printer the print model
was expanded to include logical operations.
The basic print model defines how a pattern, source image, and
destination image are applied to each other using the print model’s
transparent and opaque modes to produce a resulting image (refer to
the PCL 5 Printer Language Technical Reference Manual for detailed
information about the basic print model operation). The Logical
Operations (
AND, OR, XOR, NOT) to any of these operands except transparency,
which must be specified first.
The print model process consists of the following steps:
1Specify source and/or pattern transparency modes, if desired.
2Specify the logical operation (or use the default).
3Define the desired operands (source, destination, pattern).
Definitions
?*l#O) command can apply logical functions (e.g.,
Source: The source image may be one of the following:
• HP-GL/2 primitives
• Rules
• Characters
• Raster images (single plane mask or multiplane color)
Destination: The destination image contains whatever is currently
defined on the page. It includes any images placed through previous
operations.
Pattern or Texture: The pattern is defined by Current Pattern
(
?*v#T). The terms pattern and texture are used interchangeably in
this section.
Transparency Modes: The white pixels of the source and/or pattern
may be made transparent (source transparency 0, pattern
transparency 0). The destination shows through these areas.
Transparency modes are set by the Source Transparency (
and Pattern Transparency (
Printer Language Technical Reference Manual).
ENWWPrinter-Specific Differences 2-13
?*v#O) commands (refer to the PCL 5
?*v#N)
The print model allows logical operations, such as AND, OR, XOR,
NOT, to be performed on source, texture, and destination images.
Transparency modes and Logical Operation must be specified before
printable data is sent.
Operators
• Source Transparency (specified before logical operation;
default is transparent)
• Pattern Transparency (specified before logical operation;
default is transparent)
• Logical Operators (default is Texture OR Source)
Operands
• Source objects: character cell, raster image, rule, HP-GL/2
vectors and polygons
• Texture: pattern mask
• Destination: current page definition
Assuming three bits per pixel, the following diagram shows the print
model process.
NoteThe Logical Operation command (?*l#O) provides 255 possible
logical operations. All of these logic operations map directly to their
ROP3 (raster operation) counterparts (see the Microsoft Document,
Reference, Volume 2, Chapter 11, Binary and Ternary Raster
Operation Codes).
The logical operations were defined by Microsoft Windows for an
RGB color space (a “1” is white and a “0” is black).
2-14 Printer-Specific Differenc esENWW
Logical Operations and Transparency
Interactions
As described above, transparency modes operate in addition to
logical operations. The logical operations in Table 2-5, Logical
Operations (ROP3), on the following pages, are true only if source
and pattern transparency (for white pixels) are explicitly set to opaque
(
?*v1N and ?*v1O). If source and/or pattern transparency modes
are transparent (defaulted), the additional operations shown on the
following page must be performed to achieve the final result.
The four basic interactions are:
• Case 1: Source and Pattern are opaque.
Return ROP3 (Dest, Src, Texture).
• Case 2: Source is opaque, Pattern is transparent.
Temporary_ROP3 = ROP3 (Dest, Src, Texture).
• Case 3: Source is transparent, Pattern is opaque.
Temporary_ROP3 = ROP3 (Dest, Src, Texture).
Image_A = Temporary_ROP3 & Src.
Image_B = Dest & Not Src.
Return Image_A | Image_B
• Case 4: Source and Pattern are transparent
Temporary_ROP3 = ROP3 (Dest, Src, Texture).
Image_A = Temporary_ROP3 & Src & Pattern.
Image_B = Dest & Not Src.
Image_C = Dest & Not Pattern.
Return Image_A | Image_B | Image_C.
ENWWPrinter-Specific Differences 2-15
Logical Operation Command
Specifies the logical operation to be performed in RGB color space on
the destination, source and texture to produce new destination data.
?*l#O
# = Logical operation value (see Table 2-6)
Default = 252 (TSo)
Range = 0 to 255
NoteWhen source and/or pattern transparency modes are set opaque (not
defaulted), values specified by this command map directly to the
ROP3 (raster operation) table values on the following page. However,
when source and/or pattern transparency modes are set transparent,
the additional operations shown on the previous page must be
performed to achieve the final result.
Logical operations in the table are shown in RPN (reverse polish
notation). For example, the value 225 corresponds to TDSoxn, the
logical function of
NOT (texture XOR (source OR destination))
NoteThis command is the PCL Version of the HP-GL/2 MC command.
This command sets the ROP value which affects not only PCL
operation but also the HP-GL/2 ROP value.
2-16 Printer-Specific Differenc esENWW
Example:
The Logical Operation default value is 252 (TSo), corresponding to a
logical function of:
(texture | source)
The result is computed below for both case 1 (source and pattern
opaque) and case 4 (source and pattern transparent) on the previous
page. Note that the ROP3 value of 252 results only with case 1, when
both source and pattern transparency modes are set to opaque.
ROP3 Transparencies
(source & pattern are transparent)
Each column of destination, source, and texture values are the input
to the logical function. The result, 252, is the value that would be sent
to identify the logical operation (source and pattern transparency
modes are opaque). The last row, “ROP3 + Transparencies (source &
pattern are transparent)” shows the result if source and pattern
transparency modes are transparent (the default transparency mode).
11101010
ENWWPrinter-Specific Differences 2-17
Table of Logical Operations
Table 2-6, Logical Operations (ROP3), shows the mapping between
input values and their logical operations. Note that the logical
operations are specified as RPN (reverse polish notation) equations.
Here is a key to describe what the Boolean Function values mean;
S = Sourcea = AND
T = Textureo = OR
D = Destinationn = NOT
x = EXCLUSIVE OR
NoteSince logical operations are interpreted in RGB space (white = 1 and
black = 0) rather than in CMY space (white = 0 and black = 1), the
results may not be intuitive. For e xample, ORing a white object with a
black object in RGB space yields a white object. This is the same as
ANDing the two objects in CMY space. It must be remembered that
the printer operates in something similar to a CMY space and inverts
the bits and reverses the order.
2-18 Printer-Specific Differenc esENWW
Table 2-6. Logical Operations (ROP3)
Input ValueBoolean FunctionInput ValueBoolean Function
This command determines how pixels are rendered in images.
?*l # R
# =0 - Grid intersection
1 - Grid centered
Default =0
Range = 0, 1 (command is ignored for other values)
Two models are used for rendering pixels when an image is placed on
paper:
• Grid Intersection Mode l
• Grid Centered Model
This command can be invoked multiple times during a page. It has no
effect except to switch the model being used for imaging.
NoteThe PCL Pixel Placement command determines how pixels are
placed for both PCL and HP-GL/2 operation.
The example shown in Figure 2-1 illustrates the concepts of the two
models. Assume a rectangle extends from coordinate position (1,1) to
position (3,4). As shown below, each model produces a different
result. (Since PCL printers print only at intersections, grid centered
pixel placement is implemented as shown on the right.)
2-24 Printer-Specific Differenc esENWW
Figure 2-1Pixel Placement
The grid centered model produces a rectangle that is one dot row
thinner and one dot row shorter than the grid intersection model. The
grid intersection model is the PCL default.
NoteThe grid centered method is used by Microsoft Windows.
ENWWPrinter-Specific Differences 2-25
Placement Variations
PCL and HP-GL/2 (see following pages for HP-GL/2 pixel placement
command description) provide two pixel placement modes: grid
intersection (the default) and grid centered. Grid intersection places
pixels on the intersections of the grid (see Figure 2-2). Grid centered
places pixels in the center of the grid. In Figure 2-2, a rectangle
extends from position (1,1) to (3,4). The grid centered model
produces a rectangle one dot thinner and one dot shorter then the
grid intersection model.
When rectangular area fills are used and grid intersection is used, an
overlapping of pixels can occur if rectangular area fills are placed
adjacent to one another (as shown below). Depending on the raster
operation presently in effect, this overlap can produce undesirable
results in the final printed image. To avoid this problem, use the grid
centered method.
NoteSince PCL printers print only at intersections, grid centered is
implemented as shown on the right.
Figure 2-2Pixel Placement Variations
2-26 Printer-Specific Differenc esENWW
Pixel Placement Command (HP-GL/2)
The Pixel Placement (PP) command controls how pixels are placed
on the layout grid during polygon fills. Two pixel placement modes are
grid intersection or grid centered.
PP [mode] ;
Pixel Placement Command (HP-GL/2)
Parameter Format Functional Range Default
mode clamped integer0 or 1 0 (grid intersection)
mode
0 = grid intersection; device draws pixels centered at grid
intersections (see Figure 2-1).
1 = grid centered; device draws pixels centered inside the boxes
created by the grid (see Figure 2-1).
The command is the HP-GL/2 version of the PCL Pixel Placement
command. Whatever mode is selected, using the HP-GL/2 PP
command also applies to PCL operation. Likewise the PCL Pixel
Placement command also affects HP-GL/2 pixel placement.
NoteMicrosoft Windows fills polygons based on grid centered method.
This command determines how pixels will be placed for both HP-GL/2
and PCL operation.
The PP command is not defaulted by an IN command.
ENWWPrinter-Specific Differences 2-27
Merge Control Command (HP-GL/2)
The Merge Control (MC) command specifies the raster operation
(ROP's) to be performed in HP-GL/2. Raster Operations specify how
source, destination, and patterns are combined to produce final
images. This command supports all 256 Microsoft Windows ternary
(ROP3) raster-operation codes.
MC [mode, [opcode] ] ;
Merge Control Command (HP-GL/2)
Parameter Format Functional Range Default
mode clamped integer0 or 1 0 (ROP 252)
opcode clamped integer 0...255
1
For opcode ROP values refer to Table 2-6, Logical Operation.
mode
0 = opcode value is ignored; printer sets ROP to 252.
1
168, 252
1 = opcode value is used as the ROP value. If no opcode value is
sent, printer sets ROP to 168. If opcode is out of range (some
value other then 0-255), the command is ignored and the
default ROP of 252 is used. (For example: MC1,60; MC1,60-; MC1,+60; MC1,60+; all set the ROP to 60; however, MC1,-60;
or MC1,300; set the ROP to the default value (252).
NoteThis command is the HP-GL/2 version of the PCL Logical Operation
command.
This command sets a ROP value which affects not only HP-GL/2
operation but also the PCL ROP value.
The MC command is defaulted by an IN command.
2-28 Printer-Specific Differenc esENWW
NoteWhen using the MC command, some pattern types will not produce
the expected ROP result. This only occurs when using the FT (Fill
Type) command pattern types 1, 2, 3, and 4, and the ROP includes an
XOR operation. (This problem is due to the fact that these patterns
are the result of a vector operation and do not produce raster data for
use by a ROP operation.) All other Fill Type command patterns
(types, 10, 11, 21, or 22) operate as expected.
opcode
The operation code (opcode) specifies the logical operations that are
performed on a source, destination, and patterned image prior to
drawing the final image. The opcodes are created by listing all
possible combinations of a single pattern, source and destination
pixel, and constructing the desired final pixel values. The following
table shows three common opcodes (also see Table 2-6).
The HP LaserJet 4P printer is the follow-on to the HP LaserJet IIIP
printer. The HP LaserJet 4MP printer is the multi-platform (PostScript)
version of the 4P printer. PCL operation and the internal fonts in these
two printers are identical to that of the HP LaserJet 4ML printer. The
4P and 4MP printers have a control panel unlike the 4L and 4ML
printers. Refer to Table 1-1, PCL Feature Support Matrix, for the
commands these printers support and to Chapter 3, “Internal
Typefaces/Fonts and Symbol Sets,” for font support information.
2-30 Printer-Specific Differenc esENWW
HP LaserJet 4PJ Printer
The HP LaserJet 4PJ printer is a modified version of the
HP LaserJet 4P printer designed specifically for the Japanese
market. The enhanced PCL 5 printer language in this printer includes
all of the PCL 5 features of the HP LaserJet 4P, plus special features
which specifically support the Asian printing market. These features
include large font support, support for vertical printing, and the ESC/P
printer language. Table 2-8 lists the PCL feature additions for this
printer.
Table 2-4. PCL Feature Additions for HP LaserJet 4PJ
FeatureStatusComments
Text Parsing Method
Command
Character Text Path
Direction Command
Font Header FormatModifiedAdds Font Format 16, a font header which
FontsNew Additions
Page Size Command New AdditionsAdds support for JIS B5 paper (
NewProvides a method for specifying character
codes to select characters in large fonts
(> 256 characters).
NewAllows vertical printing for Asian markets,
which use both horizontal and vertical
printing.
supports large TrueType fonts. Five new font
header segments are supported.
The resident typefaces are different than
and Deletions
those in the HP LaserJet 4P printer. Two
large fonts (fonts containing a large number
of characters) are included to support the
Japanese market: MS Mincho and MS
Gothic. The printer also contains some
Western TrueType typefaces (Arial and
Times Roman families). The printer does not
have any Intellifont typefaces except the
Courier family.
?&l45A)
and two Japanese postcard sizes: Hagaki
(
?&l71A) and Oufuku-Hagaki (?&l72A).
Character
Enhancements
ENWWPrinter-Specific Differences 2-31
NewAllows pseudo-bold and pseudo-italic
enhancements to be applied to MS Mincho,
MS Gothic, and certain downloaded
TrueType fo nts.
Descriptions of the Text Parsing Method Command, Character Text Path Direction Command, and Font Format 16 are provided in the
following paragraphs. Following that, a “LaserJet 4PJ Programming
Tips” section offers examples and tips for performing specific tasks
using PCL 5.
Text Par sing Method Command
The Text Parsing Method command informs the PCL parser whether
character codes should be interpreted as 1-byte or 2-byte character
codes as described below.
?&t#P
# = 0, 1 - All character codes are processed as one-byte
characters.
21 - Character codes are processed as one-byte or two-byte
characte rs as described below.
31 - Character codes are processed as one-byte or two-byte
characte rs as described below.
38 - Character codes are processed as one-byte or two-byte
characte rs as described below.
Default = 0 or 31 (if the default symbol set is WIN3 1J , th e v a lue is
31; otherwise it is 0)
Range = 0, 1, 21, 31, 38
If the value field is 21, character codes in the range 0x21-0xFF are
processed as the first byte of a two-byte character. The following byte
is processed as the second byte of the two-byte character. All
character codes outside this range are processed as one-byte values.
This method can be used for parsing characters in Asian seven-bit
encoding specifications, including JIS X0208 (Japan), GB 2312-80
(China), and KS C 5601-1992 (Korea).
If the value field is 31, character codes in the range 0x81-0x9F and
0xE0-0xFC are processed as the first byte of a two-byte character.
The following byte is processed as the second byte of the two-byte
character. All character codes outside this range are processed as
one-byte values. This method can be used for parsing characters in
the Shift-JIS encoding specification.
2-32 Printer-Specific Differenc esENWW
If the value field is 38, character codes in the range 0x80-0xFF are
processed as the first byte of a two-byte character. The following byte
is processed as the second byte of the two-byte character. All
character codes outside this range are processed as one-byte values.
This method can be used for parsing Asian eight-bit encoding
specifications, such as the Big Five and TCA encoding specifications
(Taiwan), and KS C 5601-1992 and GB 2312-80, which can be either
7 or 8 bit.
Character Text Path Direction Command
This command allows the user to vertically rotate text for use in
vertical writing applications.
?&c#T
# =0 - Horizontal printing
-1 - Vertical rotated printing
Default =0
Range =0, 1
?&c0T, the printer’s current active position (CAP) advances
Using
left to right, and linefeed advances top to bottom with horizontal,
upright characters.
Using
?&c–1T, the following actions occur:
• Full-width characters in large fonts are rotated
counter-clockwise 90 degrees (“vertical rotated” characters).
• Vertical sub sti tute s ar e made for characters which ch ange
their appearance, orientation, or positioning when written
vertically.
• All other characters are unaffected by this setting.
• The vertical-rotated printing mode (
transforming a portrait page with horizontal text into a
landscape page with vertical text. The PCL Print Direction
command can be used to achieve other text orientations.
ENWWPrinter-Specific Differences 2-33
?&c-1T) has the effect of
Vertical substitution characters are those characters which change
their appearance, orientation, or positioning when written vertically.
Examples in Japanese fonts include parentheses, brackets,
punctuation and small kana. In the example above, the two small
characters are replaced with vertical substitutes. Vertical substitution
characters are accessed through the Vertical Substitutes Character
Segment, which is described in more detail later in this chapter.
Font Header Format 16
The HP LaserJet 4PJ printer provides support for large fonts. Large
fonts, such as the MS Mincho and MS Gothic fonts supplied in the
printer, are fonts which are bound to large symbol sets. The
LaserJet 4PJ printer supports a new font header to accommodate
large bound fonts. New segments are provided for support of vertical
substitutes, galley characters, typeface strings, and character
enhancements.
The Font Header Command, described beginning on page 11-6 of thePCL 5 Printer Language Technical Reference Manual, has several
different header formats. The support of large fonts adds Font Header
Format 16 (Universal Font Header). Font Header Format 16 is
identical in structure to format 15 (Universal Scalable Font Header)
except that the size field for data segments has been enlarged from
16 bits to 32 bits, and a new Font Type has been added for large fonts
(Font Type 3).
2-34 Printer-Specific Differenc esENWW
New Font Format Header Segments
For the HP LaserJet 4PJ printer, Font Header Format 15 has been
extended to include optional data segments for supporting galley
characters, typeface strings, and character enhancements. Font
Format 16 supports these segments plus optional segments for
supporting vertical substitution and a vertical rotation offset.
(Segmented Font Data is described beginning on page 11-45 of the
PCL 5 Printer Language Technical Reference Manual.)
Galley Character Segment
If an application requests a character that does not exist within the
current font, the printer checks the Galley Character Segment for a
substitute character to print.
Vertical Substitution Character Segment
The Vertical Substitution Character Segment is used to identify
vertical substitute glyphs for characters which change their
appearance, orientation, or positioning when written vertically.
Typeface String Segment
The Typeface String Segment allows names of permanent
downloaded fonts to be displayed, using non-Latin characters, in the
appropriate typeface on the Typeface List.
Vertical Rotation Segment
When the character text path direction is set to vertical rotation,
full-width characters are rotated counter-clockwise 90°. The Vertical
Rotation Segment sets the point around which the character rotates,
so that character alignment is compatible with the way Windows 3.1J
rotates characters.
Character Enhancement Segment
The HP LaserJet 4PJ printer can apply pseudo-bold and pseudo-italic
enhancements to MS Mincho, MS Gothic, and certain downloaded
TrueType fonts. This segment is used to indicate that a particular
downloaded font is able to have these character enhancements
applied.
ENWWPrinter-Specific Differences 2-35
Table 2-5. Printer Segment Support for Font Format 16
Segment
1
LJ 4PJ LJ 4V/
4MV
LJ 4LC LJ 4LJ
Pro
DJ 1600 LJ 5P
Galley Character – GC✓✓✓✓✓✓
Vertical Substitution – VT✓✓✓✓✓✓
Typeface string – TF✓✓✓✓✓ns
Vertical Rotation – VR✓✓✓✓✓✓
Character Enhancement –
✓✓✓✓✓✓
CE
Bitmap Resolution – BR*ns✓✓✓ns✓
TrueType fonts✓✓✓✓✓✓
Bitmap fonts*ns✓✓✓ns✓
ns – not supported
* Format 16 bitmap font support is described beginning on page 2-63.
1
These segments are supported for the HP LaserJet 5Si and all later LaserJet printers.
Description of Font Header Segments
Each font header data segment contains three parts:
• Segment Identifier
• Data Segment Size
• Data Segment
2-36 Printer-Specific Differenc esENWW
Segment Identifier Values
The Segment Identifier Values for the Galley Character, Vertical
Substitution Character, Typeface String, Vertical Rotation, and
Character Enhancement Segments are as shown in the following
table.
* The mnemonic is obtained when the two bytes of this big-endian word are treated as
ASCII characters.
Data Segment Size
The Data Segment Size indicates the number of bytes in the
immediately following Data Segment. The size of this field is 4 bytes
for Font Format 16 fonts, and 2 bytes for Font Format 15 fonts. The
rest of the data segments are identical for both font formats.
Galley Character Segment
If an application requests a character that does not exist within the
current font, the printer checks the Galley Character Segment for a
substitute character to print instead. The Galley Character Segment
specifies the character codes of the substitute characters to be
printed. A different galley character can be specified for different
regions of the symbol set. For example, this segment can be set up
so that an asterisk prints when a non-existent character is selected in
the region 0x81 - 0x9F, and a question mark for characters in the
region 0xE0-0xFC.
Byte15 (MSB) 87 (LSB) 0Byte
0GC (18243)1
2
Data Segment Size (6*n+6) *3
4
6Format = 07
8Default Galley Character9
ENWWPrinter-Specific Differences 2-37
5
Byte15 (MSB) 87 (LSB) 0Byte
10Number of Regions (n)11
12Region #1 Upper Left Character Code13
14Region #1 Lower Right Character Code15
16Region #1 Galley Character17
. . .. . .
6*n+6Region #n Upper Left Character Code6*n+7
6*n+8Region #n Lower Right Character Code6*n+9
6*n+10Region #n Galley Character6*n+11
* This segment is for Font Format 16. The Data Segment Size field for Font Format 16
fonts is 4 bytes; the segment for Font Format 15 fonts is identical except the Data
Segment Size field is 2 bytes instead.
• Default Galley Character (UI). Character code of the
character to be printed when a specified character is not within
any of the defined regions.
• Number of Regions (UI). Number of regions for which galley
characters are defined. Regions are defined for a table in
which the first character code byte specifies the row and the
second byte specifies the column.
• Region #x Upper Left Character Code (UI). Character code
defining upper left corner of Region #x.
• Region #x Lower Right Character Code (UI). Character
code defining lower right corner of Region #x.
• Region #x Galley Character (UI). Character code of the
character to be printed when a character within Region #x is
missing from the selected font.
If the value of the galley character field is 0xFFFF, then if the font
contains a missing character glyph, that glyph is printed. The missing
character glyph can be downloaded using the PCL Download
Character command with a character code = 0xFFFF and a glyph
ID = 0.
If both the character specified by the original character code and by
the galley character code are missing, the CAP is advanced in
accordance with previous PCL rules for missing characters, that is, it
is advanced according to the current setting of HMI (Horizontal
Motion Index).
2-38 Printer-Specific Differenc esENWW
The Galley Character Segment will be invalid if the format number is
not supported or if the segment size declared in the Segment Size
field is larger or smaller than required for the number of regions (N). If
the segment is invalid, the font download will be ignored.
Galley Character Segments can be downloaded with any Font Format
15 or 16 font, regardless of font type.
The Galley Character Segment can be used to implement a
requirement of the Microsoft Windows Version 3.1, J apan ese Version, Microsoft Standard Character Set Specification (March 11, 1993),
which states “when there is an output request for a character of a
specified typeface, even if the glyph corresponding to the specified
character code does not exist, some glyph data will be output. For
double-byte characters, the glyph of the default character defined for
the given TrueType font is used. For single-byte characters, the glyph
at 0xA5 (small dot, U+FF65) is used.”
The following table shows a Galley Character Segment which follows
the Japanese Windows specification.
Byte15 (MSB) 87 (LSB) 0Byte
0GC (18243)1
2
Data Segment Size (12) *3
4
5
6Format = 07
8Default Galley Character = 0xFFFF9
10Number of Regions (n) = 111
12Region #1 Upper Left
13
Character Code = 0x0000
14Region #1 Lower Right
15
Character Code = 0x00FF
16Region #1 Galley Character = 0x00A517
* This segment is for Font Format 16. The Data Segment Size field for Font Format 16
fonts is 4 bytes; the segment for Font Format 15 fonts is identical except the Data
Segment Size field is 2 bytes instead.
ENWWPrinter-Specific Differences 2-39
In this example segment, there is one galley character region. This
region is applied to all one-byte characters (character codes
0x0000-0x00FF); any missing character in this region is replaced with
the character at character code location 0x00A5. Any missing
characters falling into this region (e.g. character codes 0x0100 0xFFFF) are replaced with the default galley character. Since in this
example the Default Galley Character field = 0xFFFF, the missing
character glyph is printed if it is present in the font.
Vertical Substitution Segment
The Vertical Substitution Segment contains pairs of glyph IDs. Each
pair specifies the horizontal and vertical glyph ID for a character. The
segment can be built directly from a TrueType mort table which
contains a vertical substitution array . The segment definition is shown
in the table below.
Byte15 (MSB) 87 (LSB) 0Byte
0VT (22100)1
2
Data Segment Size (4*n+4) *3
4
6Horizontal Glyph ID #17
5
8Vertical Glyph ID #19
. . .. . .
4*n+2Horizontal Glyph ID #n4*n+3
4*n+4Vertical Glyph ID #n4*n+5
4*n+6End of table mark #1 = 0xFFFF4*n+7
4*n+8End of table mark #2 = 0xFFFF4*n+9
The Horizontal Glyph ID field is used by TrueType as an ID number for
the horizontal glyph data associated with a given character. The
Vertical Glyph ID field contains the ID number for the vertical glyph
data associated with the same character.
The vertical glyphs can be downloaded using the PCL Character
Definition Command using a character code = 0xFFFF.
2-40 Printer-Specific Differenc esENWW
A TrueType mort table typically contains a header of 76 bytes,
followed by the vertical substitution array which follows the segment
format described here. However, the mort table header is designed to
be variable-length, and the location of the vertical substitution data
may be located elsewhere in mort tables in future fonts.
If the Font Type is not Type 3 (16-bit fonts), this data segment is
ignored.
If the value pairs are not sorted by horizontal glyph ID, the data
segment is invalid. If the End of Table mark #1 is not 0xFFFF, the data
segment is invalid. The location of the end of the table is determined
using the Data Segment Size field. If the segment is invalid, the font
download is ignored.
Typeface String Segment
The purpose of this segment is to provide a substitute string to print
for a permanent downloaded font when doing a PCL Typeface List
printout. It has the following structure:
Byte15 (MSB) 87 (LSB) 0Byte
0TF (21574)1
2
Data Segment Size (2*n+2) *3
4
6Embedded Font
Name Flag
Substitute String
Length (n)
5
7
8Substitute String Character List9
. . .. . .
* This segment is for Font Format 16. The Data Segment Size field for Font Format 16
fonts is 4 bytes; the segment for Font Format 15 fonts is identical except the Data
Segment Size field is 2 bytes instead.
Embedded Font Name Flag (UB)—A zero value in this field is used to
indicate that the ASCII name of the font (from the Font Name field)
should be printed in addition to the substitute string. A non-zero value
is used to indicate that only the substitute string should be printed.
• Substitute String Length (UB)—the number of UI characters in
the Substitute String Character List.
ENWWPrinter-Specific Differences 2-41
• Substitute String Character List (array of UI)—the characters
which make up the substitute string. Each character is
represented as a UI value. If the font is a bound font, then the
values are accessed by their character codes values; if the font
is unbound, then the Unicode index numbers (see
Appendix D) are used.
The Typeface String Segment will be invalid if the Data Segment Size
declared in the Data Segment Size field is larger or smaller than
required for substitute string length, or if the Data Segment Size is an
odd number of bytes. If the segment is invalid, the font download will
be ignored.
Typeface String Segments can be downloaded with any Font
Format 15 or Font Format 16 font, regardless of font type.
The following tables are examples of Typeface String Segments for
two downloaded fonts. The first is for MS Mincho, and has the
embedded font name flag set to true. The second is for MS Gothic,
and has the embedded font name flag set to false.
MS Mincho
Byte15 (MSB) 87 (LSB) 0Byte
0TF (21574)1
2
Data Segment Size
4
(10) *
6Embedded Font
Name Flag = 1
Substitute String Character List =
0x826c (Note: these are full-width
8
10
12
14
2-42 Printer-Specific Differenc esENWW
0x8272 Shift-JIS character codes
0x96be for “MS” and Kanji “Mincho”)
0x92a9
Substitute String
Length = 4
3
5
7
9
11
13
15
MS Gothic
Byte15 (MSB) 87 (LSB) 0Byte
0TF (21574)1
2
Data Segment Size
4
(14) *
3
5
6Embedded Font
Name Flag = 0
Substitute String
Length = 6
7
Substitute String Character List =
0x826c (Note: these are full-width
8
10
12
14
16
18
* This segment is for Font Format 16. The Data Segment Size field for Font Format 16
fonts is 4 bytes; the segment for Font Format 15 fonts is identical except the Data
Segment Size field is 2 bytes instead.
0x8272 Shift-JIS character codes
0x8353 for “MS” and Katakana for
0x8356 “Gothic”)
0x8362
0x834e
9
11
13
15
17
19
ENWWPrinter-Specific Differences 2-43
The following illustration shows how the PCL Typeface List would
look.
Vertical Rotation Segment
The Vertical Rotation Segment is used to define the lower boundary
of the rotation box used when the character text path direction is set
to vertical rotation. This is an optional segment which may be
downloaded with Font Format 16 TrueType fonts.
The following illustration shows an example of character rotation. The
boxes around each character represent the vertical rotation box. The
distance between the baseline and the bottom of the character box is
represented by the Descender value in the Vertical Rotation
Segment.
2-44 Printer-Specific Differenc esENWW
The structure of the Vertical Rotation Segment is:
Byte15 (MSB) 87 (LSB) 0Byte
0VR (22098)1
2
Data Segment Size (4) *3
4
5
6Format (0)7
8Descender value9
* This segment is for Font Format 16. The Data Segment Size field for Font Format 16
fonts is 4 bytes; the segment for Font Format 15 fonts is identical except the Data
Segment Size field is 2 bytes instead.
• Format (UINT16)—Set this value to 0.
• Descender Value (SINT16)—Set this value to equal the
“sTypoDescender” value from the “OS/2” table of the T rueType
font.
ENWWPrinter-Specific Differences 2-45
• If the Vertical Rotation Segment is not downloaded with the
font definition, a default value is used for the Descender value.
The default value is set to the following:
Descender value = -36/256 * ScaleFactor
Where: ScaleFactor is Bytes 64 and 65 from the Font Format
16 Font Header.
Character Enhancement Segment
This segment indicates whether the pseudo-bold or pseudo-italic
enhancements can be performed on a downloaded font.
The structure of the Character Enhancement Segment is:
Byte15 (MSB) 87 (LSB) 0Byte
0CE (17221)1
2Data Segment Size (8)3
45
6Style7
89
10Stroke Weight11
12Reserved13
* This segment is for Font Format 16. The Data Segment Size field for Font Format 16
fonts is 4 bytes; the segment for Font Format 15 fonts is identical except the Data
Segment Size field is 2 bytes instead.
• Style (UINT32)—This field specifies the style types that the
printer is allowed to perform on the font characters.
31 43 0
ReservedPosture
Bit Positions (#) = Posture
1 = Italics
0, 2, 3 = Reserved
2-46 Printer-Specific Differenc esENWW
• Stroke Weig ht (UINT16)—This field specifies the stroke
weights which the printer is allowed to provide using the
pseudo-bold enhancement algorithm.
15 0
Stroke weight
Bit Position (#) = Stroke Weight
0 = Reserved8 = “Book” or “Text” Weight
1 = U ltra T hin9 = Semi-Bold
2 = Ex tra Thin10 = Demi-Bold
3 = Th in11 = Bold
4 = Ex tra Light12 = Extra Bold
5 = L ig ht13 = Black
6 = D emi Light14 = Extra Black
7 = Semi Light15 = Ultra Black
NoteOnly stroke weights greater than the stroke weight of the font can be
provided using the pseudo-bold enhancement algorithm.
ENWWPrinter-Specific Differences 2-47
HP LaserJet 4PJ Programming Tips
This section provides programming tips concerning specific
considerations for the HP LaserJet 4PJ printer. This section covers
general print job initialization, font metric calculation, vertical writing,
and other issues which are pertinent to printing Japanese text on the
HP LaserJet 4PJ printer using PCL 5.
General Print Job Initialization
This example demonstrates the general print job initialization
procedure for the HP LaserJet 4PJ printer, which is slightly different
than that used for other HP LaserJet printers.
Output from pre-LaserJet 4PJ PCL drivers (for example, a
HP LaserJet 4P driver) will only print correctly on the
HP LaserJet 4PJ printer if the default PCL symbol set is set to a value
other than the Japanese Windows 3.1 (Win3.1J) symbol set. This is
because the default PCL text parsing method is set based on the
default PCL symbol set. When the default PCL symbol set is set to
Win3.1J, the default text parsing method is Shift-JIS parsing; for any
other value, such as Roman-8, the default text parsing method is
1-byte parsing. To set the default PCL symbol set value, use PJL or
the control panel.
The first example given here is nearly identical to the initialization
used for other HP LaserJet 4 family printers. The only difference is
that it includes a PJL command to set the default PCL symbol set to
Roman-8.
?%-12345X@PJL<CR><LF>
@PJL SET RESOLUTION=600<CR><LF>
@PJL PAGEPROTECT=OFF<CR><LF>
@PJL RET=MEDIUM<CR><LF>
@PJL COMMENT *** This command is added ***
@PJL SET LPARM:PCL SYMSET=ROMAN8<CR><LF>
@PJL ENTER LANGUAGE=PCL<CR><LF>
?E?&l1x1s1h2a0o8c6e54F?&a5L?(0U?(s1p9vs3b41
~01T
The commands in the above example are explained in more detail in
the PCL 5 and PJL technical reference manuals.
2-48 Printer-Specific Differenc esENWW
The second example given here initializes a PCL 5 print job for
printing Japanese text. The major differences from the previous
example are that it specifies A4 paper, initializes the text parsing
method to Shift-JIS, selects Win3.1J as the primary symbol set,
selects MS-Mincho as the primary font.
?%-12345X@PJL<CR><LF>
@PJL SET RESOLUTION=600<CR><LF>
@PJL PAGEPROTECT=OFF<CR><LF>
@PJL RET=MEDIUM<CR><LF>
@PJL ENTER LANGUAGE=PCL<CR><LF>
The last line (2 lines, as shown) in the above example is a PCL 5
initialization string. This set of commands resets the printer, specifies
1 copy, specifies the paper tray as a paper source, chooses A4-size
paper, selects portrait orientation, VMI=8 (6LPI), sets top margin to
6 lines, selects a text length of 60 lines, a 5-column left margin,
Shift-JIS parsing, WIN3.1J symbol set, and a proportional, 10-point,
upright, text-weight MS-Mincho font.
After the PCL print data, the following commands would be used to
complete the job:
?E?%-12345X
Font Metric Calculation
Accurate character placement relies on the ability to predict character
width and height. As a character’s point size changes, so does its
width and height. (CAP displacement, the distance the CAP moves
for vertically rotated text, is a full-width calculation.)
In proportionally spaced fonts, character widths also vary from
character to character within the font. Variable character widths add
complexity to maintaining accurate line widths, page breaks, or
WYSIWYG operation. To support most proportionally spaced fonts,
font metrics must be extracted from the font metric files.
ENWWPrinter-Specific Differences 2-49
In the MS-Mincho and MS-Gothic fonts provided in the
HP LaserJet 4PJ, font metric calculation is somewhat easier than for
the Latin-based fonts. Width calculations are easier because all
characters of these fonts conform to one of two different character
widths at a particular point size. The characters are either considered
full-width or half- width. One-byte characters are always half-width
and two-byte characters are always full-width.
Full-width characters occupy the entire EM width at a particular point
size. Half-width characters occupy half of an EM width. The following
equations show how to calculate the EM width and character widths
for a full-width and a half-width character.
ppem = round (DeviceResolution * PointSize/72)
FullWidthDeltaX = round (ppem * PCLUni ts/ D eviceResolution)
DeviceResolution = current device resolution in dots per inch
(600 or 300dpi)
PointSize = point size requested
FullWidthDeltaX = character width of full-width character in PCL Units
HalfWidthDeltaX = character width of half-width character in PCL Units
PCLUnits = PCL Units
The PCL Unit of measure is explained in more detail in the PCL 5
Technical Reference Manual. The default PCL Unit size is 1/300th of
an inch, but the Unit of M easure command can be used to set the
PCL Unit size to other values.
Note that HalfWidthDeltaX may not be exactly half of FullWidthDeltaX
because of rounding. For example, if FullWidthDeltaX = round(99.0) =
99, then the corresponding HalfWidthDeltaX = round(99.0/2) =
round(49.5) = 50.
2-50 Printer-Specific Differenc esENWW
Character Enhancements
The HP LaserJet 4PJ printer supports PCL pseudo-bold and
pseudo-italic character enhancements. These enhancements can be
applied to the internal MS-Mincho and MS-Gothic fonts. They can
also be applied to a TrueType soft font if a suitable “Character
Enhancement” Segment is downloaded with the font header.
The enhancements are selected using PCL font selection commands.
The pseudo-italic enhancement can be selected using the Style
command. The pseudo-bold enhancement can be selected using the
Stroke Weight command. The bold levels which can be applied to the
internal MS-Mincho and MS-Gothic fonts are Semi Bold, Demi Bold,
Bold, and Extra Bold. For example, to select a 10-point, Extra Bold,
Italic, MS-Mincho font, use the following PCL command:
?(19K?(s1p10v1s4b28752T
In the above command, Italics style (1s) and Extra Bold weight (4b)
are selected. Since there is not an Extra Bold Italic MS-Mincho font
resident in the printer, pseudo-italics and pseudo-bolding algorithms
are applied to characters printed from the regular MS-Mincho font.
If a soft font is selected using the “Font Selection by ID” command
(e.g.
?(#X ), the font is selected without any character
enhancements applied. To select a soft font by ID with character
enhancements, first select the font by ID, then select the desired
attributes. For example, assume a soft font is downloaded with ID = 1
and a Character Enhancement Segment indicating that pseudo-bold
and pseudo-italics character enhancements can be applied. The
following command can be used to select that font with those
enhancements:
?(1X?(s1s3B
Other font effects, such as character shadowing, strike-through, and
gray-shading can be accomplished using the print model.
ENWWPrinter-Specific Differences 2-51
NoteHP-GL/2 as implemented in HP LaserJet printers has no mechanism
for parsing 2-byte characters. Therefore, HP-GL/2 character
transformations (e.g. SI and SR commands) cannot be applied to
these characters.
HP-GL/2 as implemented in HP LaserJet printers has no mechanism
for parsing 2-byte characters. Therefore, HP-GL/2 character
transformations (e.g. SI and SR commands) cannot be applied to
these characters.
Vertical Writing
Vertical writing can be accomplished using the vertical rotated (“-1”)
mode of the Character Text Path command (
vertical rotated text path direction, full-width characters are rotated
and printed “on their sides.” All other characters are unaffected and
the CAP is still advanced in the horizontal direction. The “-1” mode
has the effect of transforming a portrait page with horizontal full-width
characters into a landscape page with vertical full-width characters.
This can be combined with the Print Direction command (
achieve the desired text orientation (e.g. portrait, landscape, reverse
portrait, or reverse landscape).
?&c-1T). When using a
?&a#P) to
An example of horizontal and vertical rotat ed writing is shown below.
The first line of text is horizontal writing and the second line is vertical
rotated writing. Note that the “~” character is replaced with a vertical
substitute on the second line. The C program that follows was used to
generate the PCL commands for this example.
2-52 Printer-Specific Differenc esENWW
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.