You are currently offline, waiting for your internet to reconnect

WD: PCL Escape Codes to Use with the PRINT Field

This article was previously published under Q135569
This article has been archived. It is offered "as is" and will no longer be updated.
This article lists some of the escape codes that can be used in the PRINTfield for printing documents to Hewlett-Packard (HP) or HP-compatibleprinters. For example, the construction {PRINT 27"&l2S"} at the top of apage causes a duplexing printer to begin printing on both sides of thepage.
Note: Not all of these commands are supported on all HP printers, nor arethey guaranteed to work exactly as described on non-HP printers. Check yourprinter's manual or technical support line to be sure.

For further information on HPCL escape sequences, refer to your HPprinter's user's manual or the "Hewlett-Packard PCL 5 Printer LanguageTechnical Reference Manual," available from Hewlett Packard.
PrinterCommand     Function             # refers to--------------------------------------------27"E"       Printer Reset27"&l#X"    Number of copies     1 to 32,76727"&l#G"    Output bin           1 = upper bin                                 2 = lower bin27"&l1T"    Job separation27"&l#S"    Selects single or    0 = single-sided            duplex (two-sided)   1 = duplex, long-edge binding            printing and choice  2 = duplex, short-edge binding            of binding27"&l#H"    Paper source         0 = current source                                 1 = upper tray                                 2 = manual feed - paper                                 3 = manual feed -  envelope                                 4 = lower tray or mp tray                                 5 = envelope feeder or optional 500-                                     sheet cassette (HP 4/4M)                                 6 = envelope feeder (HP 4/4M)27"&l#A"    Paper Size           1 = executive                                 2 = letter                                 3 = legal                                 26 = A4            Envelope Size        100 = Commercial B5                                 80 = Monarch                                 81 = Commercial 10                                 90 = DL                                 91 = International C527"&l#O"    Orientation          0 = portrait                                 1 = landscape                                 2 = reverse portrait                                 3 = reverse landscape27"&l#G"    Output Destination   1 = Upper tray                                 2 = Rear tray27"*t#R"    Resolution           75   =  75 dpi                                 300  =  300 dpi                                 600  =  600 dpi (on supported printers)KEY---27             The Escape character; just type 27."              Opening or closing quotation marks for the command string               (must be "straight" quotes, not "smart" or "curly" quotes).&              Ampersand.l              Lowercase letter "L".#              Option specifier, a number.E, X, G, etc.  Printer command specifier.				

  • If you are using version 3.31.89 of the HP IIIx driver, insert these command sequences at the beginning of the page where you want the new setting to take effect. For versions of the HP III driver later than 3.31.89, if header or footer text exists in the document (including page numbers), you must insert the printer control sequence in the header on a line by itself, terminated with a hard-carriage return. You can format this line for 1 point to minimize its effect on the formatting of header text, if necessary.
  • The Resolution setting of 600 dpi using a 300 dpi driver with a 600-dpi printer will make the resulting printout half the normal size.
For more information about PRINT fields, do one of the following for yourversion of Word:

Word 97

Click the Office Assistant, type PRINT field, click Search, and then click to view " Field codes: Print field."

NOTE: If the Assistant is hidden, click the Office Assistant button on theStandard toolbar. If Microsoft Help is not installed on your computer,please see the following article in the Microsoft Knowledge Base:
120802 Office: How to Add/Remove a Single Office Program or Component

Word 95

On the Help menu, click Answer Wizard. On the Answer Wizard tab, typePRINT field, and click Search. Click the "Field Codes: Print field" topic and then click Display.

Word 6.0

On the Help menu, click "Search for help on". On the Index tab, type PRINT field, and then click Display.

Article ID: 135569 - Last Review: 12/04/2015 11:53:37 - Revision: 1.2

Microsoft Word 6.0 Standard Edition, Microsoft Word 6.0a, Microsoft Word 6.0c, Microsoft Word 95 Standard Edition, Microsoft Word 95a, Microsoft Word 97 Standard Edition

  • kbnosurvey kbarchive kbfield kbhowto kbinfo kbprint KB135569