HP LaserJet Printer Commands -- PCL5 Context

-----------------------------------------------------------------------------
 FUNCTION                    PARAMETER                           COMMAND                                                         VALUE
------------------------------------------------------------------------------
JOB CONTROL COMMANDS:
Reset:
  Reset                                                        <Esc>E
  Number of Copies              # of Copies (1-99)             <Esc<Esc>&l#X

Simplex/Duplex Operation:
  Simplex/Duplex Print          Simplex                        <Esc>&l0S     
                                Duplex
                                Long-Edge Binding              <Esc>&l1S
                                Short-Edge Binding             <Esc>&l2S    

  Long-Edge (Left)
    Offset Registration         # of Decipoints (1/720")       <Esc>&l#U 
  Short-Edge (Top)
    Offset Registration         # of Decipoints (1/720")       <Esc>&l#Z

  Page Side Selection           Next Side                      <Esc>&a0G                 
                                Front Side                     <Esc>&a1G  
                                Back Side                      <Esc>&a2G      

  Job Separation                                               <Esc>&l1T


PAGE CONTROL COMMANDS:
Page Length and Size:
  Paper Source                  Eject Page                     <Esc>&l0H
                                Upper Tray                     <Esc>&l1H
                                Manual Feed                    <Esc>&l2H    
                                Manual Envelope Feed           <Esc>&l3H
                                Lower Tray                     <Esc>&l4H      
                                Envelope Feeder                <Esc>&l6H     

  Paper Destination             Upper Output Bin               <Esc>&l1G
                                Rear Output Bin                <Esc>&l2G  
                                                               
  Page Size                     Executive                      <Esc>&l1A
                                Letter                         <Esc>&l2A
                                Legal                          <Esc>&l3A
                                A4                             <Esc>&l26A   
    Envelopes:                  Monarch                        <Esc>&l80A
                                COM 10                         <Esc>&l81A     
                                DL                             <Esc>&l90A   
                                C5                             <Esc>&l91A

  Page Length                   # of Lines                     <Esc>&l#P

Orientation:
  Orientation                   Portrait                       <Esc>&l0O
                                Landscape                      <Esc>&l1O
                                Reverse Portrait               <Esc>&l2O
                                Reverse Landscape              <Esc>&l3O   

  Print Direction               # Degrees of Rotation
                                  (counterclockwise -
                                  90 degree increments only)   <Esc>&a#P

Margins and Text Length:
  Top Margin                    # of Lines                     <Esc>&l#E
  Text Length                   # of Lines                     <Esc>&l#F     
  Left Margin                   # of Columns                   <Esc>&a#L
  Right Margin                  # of Columns                   <Esc>&a#M
  Clear Horizontal Margins                                     <Esc>9


Perforation Skip Mode:
  Perforation Skip              Disable                        <Esc>&l0L 
                                Enable                         <Esc>&l1L   

Horizontal Column Spacing:
  Horizontal Motion Index
    (HMI)                       # of 1/120" Increments         <Esc>&k#H     

Vertical Line Spacing:
  Vertical Motion Index
    (VMI)                       # of 1/48" Increments          <Esc>&l#C    

  Line Spacing                  1 line/inch                    <Esc>&l1D   
    (Lines per inch)            2 lines/inch                   <Esc>&l2D
                                3 lines/inch                   <Esc>&l3D 
                                4 lines/inch                   <Esc>&l4D
                                6 lines/inch                   <Esc>&l6D 
                                8 lines/inch                   <Esc>&l8D
                                12 lines/inch                  <Esc>&l12D
                                16 lines/inch                  <Esc>&l16D
                                24 lines/inch                  <Esc>&l24D
                                48 lines/inch                  <Esc>&l48D


CURSOR POSITIONING:
Vertical and Horizontal:
  Vertical Position             # of Rows                      <Esc>&a#R
                                # of Dots                      <Esc>*p#Y   
                                # of Decipoints                <Esc>&a#V

  Horizontal Position           # of Columns                   <Esc>&a#C
                                # of Dots                      <Esc>*p#X
                                # of Decipoints                <Esc>&a#H  

  Half Line Feed                                               <Esc> = 

End-of-Line Termination:
  Line Termination              CR=CR; LF=LF; FF=FF            <Esc>&k0G
                                CR=CR+LF; LF=LF; FF=FF         <Esc>&k1G
                                CR=CR; LF=CR+LF; FF=CR+FF      <Esc>&k2G
                                CR=CR+LF; LF=CR+LF; FF=CR+FF   <Esc>&k3G

Push/Pop Position:
  Push/Pop Position             Push                           <Esc>&f0S
                                Pop                            <Esc>&f1S


FONT SELECTION:
Symbol Set Selection:
  Primary Symbol Set            ISO 60: Norwegian 1            <Esc>(0D
                                ISO 4: United Kingdom          <Esc>(1E
                                ISO 69: French                 <Esc>(1F 
                                ISO 21: German                 <Esc>(1G
                                ISO 15: Italian                <Esc>(0I
                                Microsoft Publishing           <Esc>(6J
                                DeskTop                        <Esc>(7J
                                PS Text                        <Esc>(10J 
                                Ventura International          <Esc>(13J  
                                Ventura US                     <Esc>(14J
                                Ventura ITC Zapf Dingbats      <Esc>(9L
                                PS ITC Zapf Dingbats           <Esc>(10L
                                ITC Zapf Dingbats Series 100   <Esc>(11L
                                ITC Zapf Dingbats Series 200   <Esc>(12L
                                ITC Zapf Dingbats Series 300   <Esc>(13L
                                PS Math                        <Esc>(5M
                                Ventura Math                   <Esc>(6M 
                                Math-8                         <Esc>(8M
                                ECMA-94 Latin 1                <Esc>(0N
                                ISO 11: Swedish                <Esc>(0S
                                ISO 17: Spanish                <Esc>(2S
                                ISO 6: ASCII                   <Esc>(0U 
                                Legal                          <Esc>(1U
                                Roman-8                        <Esc>(8U
                                Windows                        <Esc>(9U
                                PC-8                           <Esc>(10U
                                PC-8 D/N                       <Esc>(11U
                                PC 8                           <Esc>(12U
                                Pi Font                        <Esc>(15U

Spacing:
  Primary Spacing               Fixed                          <Esc>(s0P         080         
                                Proportional                   <Esc>(1P  

Pitch:
  Primary Pitch                 # Characters/inch              <Esc>(s#H
  Set Pitch Mode                10.0 cpi                       <Esc>&k0S 
                                16.67 cpi                      <Esc>&k2S
                                12.0 cpi                       <Esc>&k4S   

Point Size:
  Primary Height                # Points                       <Esc>(s#V 

Style:
  Primary Style                 Upright (Solid)                <Esc>(s0S
                                Italic                         <Esc>(s1S      
                                Condensed                      <Esc>(s4S  
                                Condensed Italic               <Esc>(s5S
                                Compressed (Extra Condensed)   <Esc>(s8S
                                Expanded                       <Esc>(s24S 
                                Outline                        <Esc>(s32S
                                Inline                         <Esc>(s64S
                                Shadowed                       <Esc>(s128S
                                Outline Shadowed               <Esc>(s160S

**Additional style values may be obtained from the related documentation
provided with HP's font products.

**PCL5 LaserJet Printers allow you to specify complex structures (contours,
outlines, shading etc.) and widths as well as posture. Refer to the PCL5
LaserJet Technical Reference Manual. 


Stroke Weight:
  Primary Font Stroke Weight    Ultra Thin                     <Esc>(s-7B
                                Extra Thin                     <Esc>(s-6B   
                                Thin                           <Esc>(s-5B 
                                Extra Light                    <Esc>(s-4B
                                Light                          <Esc>(s-3B
                                Demi Light                     <Esc>(s-2B
                                Semi Light                     <Esc>(s-1B
                                Medium (book or text)          <Esc>(s0B
                                Semi Bold                      <Esc>(s1B
                                Demi Bold                      <Esc>(s2B
                                Bold                           <Esc>(s3B
                                Extra Bold                     <Esc>(s4B
                                Black                          <Esc>(s5B
                                Extra Black                    <Esc>(s6B
                                Ultra Black                    <Esc>(s7B     

Primary Typeface Family:
  Typeface Family               Courier                        <Esc>(s3T
                                Univers                        <Esc>(s4148T  
                                LinePrinter                    <Esc>(s0T                 
                                CG Times                       <Esc>(s4101T       
     
**Many more typeface families are supported.  Refer to the PCL Comparison Guide.


Font Default:
  Font Default                  Primary Font                   <Esc>(3@
                                Secondary Font                 <Esc>)3@
Underline:
  Underline                     Enable Fixed                   <Esc>&d0D
                                Enable Floating                <Esc>&d3D   
                                Disable                        <Esc>&d@

Transparent Print:
  Transparent Print Data        # of Bytes                     <Esc>&p#X


FONT MANAGEMENT:
  Assign Font ID                Font ID #                      <Esc>*c#D

  Font and Character Control    Delete all Fonts               <Esc>*c0F
                                Delete all temporary fonts     <Esc>*c1F
                                Delete last font ID specified  <Esc>*c2F
                                Delete last character
                                  specified                    <Esc>*c3F 
                                Make font temporary            <Esc>*c4F
                                Copy/Assign the currently
                                  invoked font as temporary    <Esc>*c6F

Font Selection by ID Number:
  Select font (with ID #)       ID # primary font              <Esc>(#X
                                ID # secondary font            <Esc>)#X


SOFT FONT CREATION:
  Font descriptor               # of bytes                     <Esc>)s#W [data]
    (font header)              
  Download character            # of bytes                     <Esc>(s#W [data]
  Character code                Character code # (decimal)     <Esc>*c#E


GRAPHICS:
PCL Vector Graphics Switching/Set-Up:
  Enter PCL Mode                Use previous PCL cursor
                                  position                     <Esc>%0A
                                Use current HP-GL/2 pen
                                 position cursor position      <Esc>%1A
  
  Enter HP-GL/2 Mode            Use Previous HP-GL/2 pen
                                  position                     <Esc>%0B
                                Use current PCL cursor
                                  position                     <Esc>%1B
  
  HP-GL/2 Plot                  
    Horizontal Size             Horizontal size in inches      <Esc>*c#K
  
  HP-GL/2 Plot
    Vertical Size               Vertical size in inches        <Esc>*c#L
  
  Set Picture Frame 
    Anchor Point                Set anchor point to cursor
                                  position                     <Esc>*c0T
  Picture Frame
    Horizontal Size             Decipoints                     <Esc>*c#X
  
  Picture Frame 
    Vertical Size               Decipoints                     <Esc>*c#Y

Raster Graphics:
   Raster Resolution            75 dots/inch                   <Esc>*t75R
                                100 dots/inch                  <Esc>*t100R
                                150 dots/inch                  <Esc>*t150R
                                300 dots/inch                  <Esc>*t300R
                                                               
Raster Graphics Presentation:      
  Raster Graphics
    Presentation                Rotate image                   <Esc>*r0F
                                LaserJet
                                  Landscape compatible         <Esc>*r3F

  Start Raster Graphics         Left Raster Graphics
                                  Margin                       <Esc>*r0A
                                Current Cursor                 <Esc>*r1A

  Raster Y Offset               # of Raster Lines
                                  of vertical movement         <Esc>*b#Y      

  Set Raster 
    Compression Mode            Uncoded                        <Esc>*b0M
                                Run-Length Encoded             <Esc>*b1M
                                Tagged Image File
                                  Format                       <Esc>*b2M
                                Delta Row                      <Esc>*b3M
 
  Transfer Raster Data          # of Bytes                     <Esc>*b#W [data]
 
  End Raster Graphics                                          <Esc>*rB     
 
  Raster Height                 # Raster Rows                  <Esc>*r#T
 
  Raster Width                  # Pixels of the
                                  Specified Resolution         <Esc>*r#S


THE PRINT MODEL:
Imaging:
  Select Current
    Pattern                     Solid Black (default)          <Esc>*v0T
                                Solid White                    <Esc>*v1T
                                HP-defined Shading 
                                  Pattern                      <Esc>*v2T
                                HP-defined Cross-Hatched
                                  Pattern                      <Esc>*v3T

  Select Source
    Transparency Mode           Transparent                    <Esc>*v0N     
                                Opaque                         <Esc>*v1N

  Select Pattern
    Transparency Mode           Transparent                    <Esc>*v0O    
                                Opaque                         <Esc>*v1O
                                                               
Rectangular Area Fill:
  Rectangle Width 
    (Horizontal Size)           # of dots                      <Esc>*c#A
                                # of decipoints                <Esc>*c#H     
  
  Rectangle Height
    (Vertical Size)             # of dots                      <Esc>*c#B
                                # of decipoints                <Esc>*c#V 

  Fill Rectangular Area         Solid Black                    <Esc>*c0P
                                Erase (solid white fill)       <Esc>*c1P  
                                Shaded Fill                    <Esc>*c2P
                                Cross-hatched Fill             <Esc>*c3P   
                                Current Pattern                <Esc>*c5P

  Pattern ID                    % of Shading or
                                  Type of Pattern              <Esc>*c#G

  Shading                       2% Gray                        <Esc>*c2G
                                10% Gray                       <Esc>*c10G
                                15% Gray                       <Esc>*c15G
                                30% Gray                       <Esc>*c30G
                                45% Gray                       <Esc>*c45G
                                70% Gray                       <Esc>*c70G    
                                90% Gray                       <Esc>*c90G
                                100% Gray                      <Esc>*c100G

  Pattern                       1 Horizontal Line              <Esc>*c1G
                                2 Vertical Lines               <Esc>*c2G
                                3 Diagonal Lines               <Esc>*c3G
                                4 Diagonal Lines               <Esc>*c4G
                                5 Square Grid                  <Esc>*c5G
                                6 Diagonal Grid                <Esc>*c6G
           
  
MACROS:
  Macro ID                      Macro ID #                     <Esc>&f#Y

  Macro Control                 Start Macro Definition         <Esc>&f0X   
                                Stop Macro Definition          <Esc>&f1X
                                Execute Macro                  <Esc>&f2X
                                Call Macro                     <Esc>&f3X 
                                Enable Overlay                 <Esc>&f4X                 
                                Disable Overlay                <Esc>&f5X
                                Delete Macros                  <Esc>&f6X                 
                                Delete All Temporary Macros    <Esc>&f7X   
                                Delete Macro ID                <Esc>&f8X              
                                Make Temporary                 <Esc>&f9X  
                                Make Permanent                 <Esc>&f10X 


PROGRAMMING HINTS:
End-of-Line Wrap                Enabled                        <Esc>&s0C                   
                                Disabled                       <Esc>&s1C

Display Functions               ON                             <Esc>Y
                                OFF                            <Esc>Z

These escape sequences can be found in your HP Printer User's Manual.  For
additional information on using and sending printer commands to the printer
download HPPCL.TXT and PTRCMD.TXT in LaserJet Library (4).
