HP LASERJET PRINTERS - PCL COMMANDS, BASIC PAGE FORMATTING AND FONT SELECTION This document lists the HP LaserJet PCL printer commands for basic page formatting and font selection. If you need further information about PCL commands, HP-GL/2, macros, or PJL commands, please use the Technical Reference Manual set , part number 5961- 0601. You can order the manual set from our Support Materials Organization at 1-(800)-227-8164. A FEW NOTES ABOUT USING THESE COMMANDS: * Paper Source and Page Size commands may not work on all printers. Check your user's manual for supported paper tray and paper size options. * The commands are listed in hierarchical order and also give the decimal and hexidecimal equivalents. * Values in the parentheses "(x)" identify the lower case of the termination character that is used for combining commands. * Ec represents the escape character for your software. In DOS Edit, Ec is represented by holding down the - Ctrl key and pressing the letter P. Release both keys and press the Esc key. * # and #...# are variables that you will replace with the numbers needed for your document. EXAMPLE: To set the number of copies to 14, Ec&l#X, replace the # or #...# with: ASCII 14 Decimal 049 052 Hexidecimal 31 34 Use the following table to help you translate into decimal or hexidecimal: ASCII value Hex Dec Description 0 30 48 Zero 1 31 49 One 2 32 50 Two 3 33 51 Three 4 34 52 Four 5 35 53 Five 6 36 54 Six 7 37 55 Seven 8 38 56 Eight 9 39 57 Nine . 2E 46 Period (point) JOB CONTROL COMMANDS Function Parameter Command Decimal Value Hexadecimal Value RESET Reset EcE 027 069 1B 45 Number # of Copies Ec&l#X 027 038 108 #...# 088 1B 26 6C #. of (1-99) (x) (120) # 58 (78) Copies Unit of # = Number Ec&u#D 027 038 117 #...# 068 1B 26 75 Measure of units (d) (100) #...# 44 per inch (64) Function Parameter Command Decimal Value Hexadecimal Value SIMPLEX/DUPLEX OPERATION (ONLY APPLICABLE TO DUPLEX CAPABLE PRINTERS) Simplex Simplex Ec&l0S 027 038 108 048 083 1B 26 6C 30 53 Print (s) (115) (73) Duplex Print Long-Edge Ec&l1S 027 038 108 049 083 1B 26 6C 31 53 Binding (s) (115) (73) Short-Edge Ec&l2S 027 038 108 050 083 1B 26 6C 32 53 Binding (s) (115) (73) Long-Edge # of Ec&l#U 027 038 108 #...# 1B 26 6C #...# (left) Decipoints (u) 085 (117) 55 (75) Offset (1/720") Registration Short-Edge # of Ec&l#Z 027 038 108 #...# 1B 26 6C #...# (Top) Offset Decipoints (z) 090 (122) 5A (7A) Registration (1/720") Page Side Next Side Ec&a0G 027 038 097 048 071 1B 26 61 30 47 Selection (g) (103) (67) Front Side Ec&a1G 027 038 097 049 071 1B 26 61 31 47 (g) (103) (67) Back Side Ec&a2G 027 038 097 050 071 1B 26 61 32 47 (g) (103) (67) PAGE CONTROL COMMANDS Function Parameter Command Decimal Value Hexadecimal Value PAPER DESTINATION Auto Select Ec&l0G 027 038 108 048 103 1B 26 6C 30 67 (71) (47) Top Output Ec&l1G 027 038 108 049 103 1B 26 6C 31 67 Bin (71) (47) Left Output Ec&l2G 027 038 108 050 103 1B 26 6C 32 67 Bin (71) (47) OPTIONAL MULTI-BIN MAIL BOX (5SI) Left Bin Ec&l3G 027 038 108 051 072 1B 26 6C 33 67 (48) Face Up (104) Bin 1 Face Ec&l4G 027 038 108 052 103 1B 26 6C 34 67 (48) Down (104) Bin 2 Face Ec&l5G 027 038 108 053 103 1B 26 6C 35 67 (48) Down (104) Bin 3 Face Ec&l6G 027 038 108 054 103 1B 26 6C 36 67 (48) Down (104) Bin 4 Face Ec&l7G 027 038 108 055 103 1B 26 6C 37 67 (48) Down (104) Bin 5 Face Ec&l8G 027 038 108 056 103 1B 26 6C 38 67 (48) Down (104) Bin 6 Face Ec&l9G 027 038 108 057 103 1B 26 6C 39 67 (48) Down (104) Bin 7 Face Ec&l10G 027 038 108 049 048 1B 26 6C 31 31 67 (48) Down 103 (104) Bin 8 Face Ec&l11G 027 038 108 049 049 1B 26 6C 31 32 67 (48) Down 103 (104) PAPER SOURCE, LENGTH AND SIZE Paper Eject Page Ec&l0H 027 038 108 048 072 1B 26 6C 30 48 Source (h) (104) (68) C Paper Ec&l1H 027 038 108 049 072 1B 26 6C 31 48 Cassette (h) (104) (68) Paper Ec&l1H 027 038 108 049 072 1B 26 6C 31 48 Cassette / (h) (104) (68) tray 2 Manual Feed Ec&l2H 027 038 108 050 072 1B 26 6C 32 48 Paper (h) (104) (68) Manual Feed Ec&l3H 027 038 108 051 072 1B 26 6C 33 48 Envelope (h) (104) (68) C Tray 1 Ec&l8H 027 038 108 056 072 1B 26 6C 38 48 (h) (104) (68) Optional Ec&l5H 027 038 108 053 072 1B 26 6C 35 48 500 / 2000 (h) (104) (68) Sheet Lower Cassette MP Tray / Ec&l4H 027 038 108 052 072 1B 26 6C 34 48 Tray 3 (h) (104) (68) Envelope Ec&l6H 027 038 108 054 072 1B 26 6C 36 48 Feeder (h) (104) (68) Page Executive Ec&l1A 027 038 108 049 065 1B 26 6C 31 41 Size (a) (097) (61) Letter Ec&l2A 027 038 108 050 065 1B 26 6C 32 41 (a) (097) (61) Legal Ec&l3A 027 038 108 051 065 1B 26 6C 33 41 (a) (097) (61) Tabloid (11 Ec&l6A 027 038 108 054 065 1B 26 6C 36 41 X 17) (a) (097) (61) A4 Ec&l26A 027 038 108 050 054 1B 26 6C 32 36 (a) 065 (097) 41 (61) A3 Ec&l27A 027 038 108 050 055 1B 26 6C 32 37 (a) 065 (097) 41 (61) A4 Ec&l26A 027 038 108 050 054 1B 26 6C 32 36 (a) 065 (097) 41 (61) JIS B5 Ec&l45A 027 038 108 052 053 1B 26 6C 34 35 (a) 065 (097) 41 (61) JIS B4 Ec&l46A 027 038 108 052 054 1B 26 6C 34 36 (a) 065 (097) 41 (61) JPOST Ec&l71A 027 038 108 055 049 1B 26 6C 37 31 (a) 065 (097) 41 (61) JPOSTD Ec&l72A 027 038 108 055 050 1B 26 6C 37 32 (a) 065 (097) 41 (61) Monarch Ec&l80A 027 038 108 056 048 1B 26 6C 38 30 (a) 065 (097) 41 (61) COM 10 Ec&l81A 027 038 108 056 049 1B 26 6C 38 31 (a) 065 (097) 41 (61) B5 Ec&l100A 027 038 108 049 048 1B 26 6C 31 30 (a) 048 065 (097) 30 41 (61) Custom/ Ec&l101A 027 038 108 049 048 1B 26 6C 31 30 Maximum (a) 049 065 (097) 32 41 (61) DL Ec&l90A 027 038 108 057 048 1B 26 6C 39 30 (a) 065 (097) 41 (61) C5 Ec&l91A 027 038 108 057 049 1B 26 6C 39 31 (a) 065 (097) 41 (61) Page # if Lines Ec&l#P 027 038 108 #...# 1B 26 6C #...# Length (5-128) (p) 080 (112) 50 (70) Function Parameter Command Decimal Value Hexadecimal Value ORIENTATION Orientation Portrait Ec&l0O 027 038 108 048 1B 26 6C 30 4F (o) 079 (111) (6F) Landscape Ec&l1O 027 038 108 049 1B 26 6C 31 4F (o) 079 (111) (6F) Reverse Ec&l2O 027 038 108 050 1B 26 6C 32 4F Portrait (o) 079 (111) (6F) Reverse Ec&l3O 027 038 108 051 1B 26 6C 33 4F Landscape (o) 079 (111) (6F) Print # Degrees Ec&a#P 027 038 097 #...# 1B 26 61 #...# Direction of 080 (112) 50 (70) Rotation counter- clockwise. (90 degree increments only) MARGINS AND TEXT LENGTH # of Lines Ec&l#E 027 038 108 #...# 1B 26 6C #...# (e) 069 (101) 45 (65) Top Margin Text # of Lines Ec&l#F 027 038 108 #...# 1B 26 6C #...# Length (f) 070 (102) 46 (66) Left # of Ec&a#L 027 038 097 #...# 1B 26 61 #...# Margin Columns (l) 076 (108) 4C (6C) Right # of Ec&a#M 027 038 097 #...# 1B 26 61 #...# Margin Columns (m) 077 (109) 4D (6D) Clear Ec9 027 057 1B 39 Horizontal Margins PERFORATION SKIP MODE Perforation Disable EC&l0L 027 038 108 048 076 1B 26 6C 30 4C Skip (l) (108) (6C) Enable EC&l1L 027 038 108 049 076 1B 26 6C 31 4C (l) (108) (6C) HORIZONTAL COLUMN SPACING Horizontal # of 1/120 Ec&k#H 027 038 107 #...# 1B 26 6B #...# Motion inch (h) 072 (104) 48 (68) Index Increments (HMI) The Horizontal Motion Index (HMI) command designates the distance between columns in 1/120 inch increments. When fixed pitch fonts are selected, all printable characters, including the space and backspace characters, are affected by HMI. When proportional fonts are selected, the HMI affects only the control code space character. The default HMI is equal to the pitch value in the font header. The printer escape sequence that you send is as follows: Ec&k#H # is equal to a variable that is derived from the following formula: Horizontal Printable Area ____________________________ X 120 = # Desired Characters Per Line Function Parameter Command Decimal Value Hexadecimal Value VERTICAL LINE SPACING Vertical # of 1/48 Ec&l#C 027 038 108 #...# 1B 26 6C #...# Motion inch (c) 067 (99) 43 (63) Index Increments (VMI) The Vertical Motion Index (VMI) command designates the distance between rows in 1/48 inch increments (the vertical distance the cursor will move for a line feed operation). This command affects the line feed and half line feed spacing. The factory default VMI is eight, which corresponds to six lines per inch. VMI can be selected from the printer control panel or by sending a printer escape sequence: Ec&#C . # is equal to a variable that is derived from the following formula: Vertical Printable Area _____________________ X 48 = # Desired Lines Per Page Note: Use either VMI (most precise method of line spacing) OR Lines per inch as only the last command will execute. Line Spacing (Lines per inch) 1 line/inch Ec&l1D 027 038 108 049 068 1B 26 6C 31 44 (d) (100) (64) 2 Ec&l2D 027 038 108 050 068 1B 26 6C 32 44 lines/inch (d) (100) (64) 3 Ec&l3D 027 038 108 051 068 1B 26 6C 33 44 lines/inch (d) (100) (64) 4 Ec&l4D 027 038 108 052 068 1B 26 6C 34 44 lines/inch (d) (100) (64) 6 Ec&l6D 027 038 108 054 068 1B 26 6C 36 44 lines/inch (d) (100) (64) 8 Ec&l8D 027 038 108 056 068 1B 26 6C 38 44 lines/inch (d) (100) (64) 12 Ec&l12D 027 038 108 049 050 1B 26 6C 31 32 lines/inch (d) 068 (100) 44 (64) 16 Ec&l16D 027 038 108 049 054 1B 26 6C 31 36 lines/inch (d) 068 (100) 44 (64) 24 Ec&l24D 027 038 108 050 052 1B 26 6C 32 34 lines/inch (d) 068 (100) 44 (64) 48 Ec&l48D 027 038 108 052 056 1B 26 6C 34 38 lines/inch (d) 068 (100) 44 (64) CURSOR POSITIONING VERTICAL AND HORIZONTAL Vertical # of Rows Ec&a#R 027 038 097 #...# 1B 26 61 #...# Position (r) 082 (114) 52 (72) # of Dots Ec*p#Y 027 042 112 #...# 1B 2A 70 #...# (y) 089 (121) 59 (79) # of Ec&a#V 027 038 097 #...# 1B 26 61 #...# Decipoints (v) 086 (118) 56 (76) Horizontal # of Ec&a#C 027 038 097 #...# 1B 26 61 #...# Position Columns (c) 067 (99) 43 (63) # of Dots Ec*p#X 027 042 112 #...# 1B 2A 70 #...# (x) 088 (120) 58 (78) # of Ec&a#H 027 038 097 #...# 1B 26 61 #...# Decipoints (h) 072 (104) 48 (68) Half Line Ec= 027 061 1B 3D Feed END-OF LINE TERMINATION Line CR=CR;LF=L Ec&k0G 027 038 107 048 1B 26 6B 30 47 Termination F; FF=FF (g) 071 (103) (67) CR=CR+LF;L Ec&k1G 027 038 107 049 1B 26 6B 31 47 F=LF FF=FF (g) 071 (103) (67) CR=CR; Ec&k2G 027 038 107 050 1B 26 6B 32 47 LF=CR+LF; (g) 071 (103) (67) FF=CR+FF CR=CR+LF; Ec&k3G 027 038 107 051 1B 26 6B 33 47 LF=CR+LF; (g) 071 (103) (67) FF=CR+FF FONT SELECTION Function Parameter Command Decimal Value Hexadecimal Value SYMBOL SET SELECTION Primary ISO 60: Ec(0D 027 040 048 068 1B 28 30 44 Symbol Norwegian Set ISO 4: United Ec(1E 027 040 049 069 1B 28 31 45 Kingdom Windows 3.1 Ec(9E 027 040 057 069 1B 28 39 45 Latin 2 ISO 69: French Ec(1F 027 040 049 070 1B 28 31 46 ISO 21: German Ec(1G 027 040 049 071 1B 28 31 47 ISO 15: Ec(0I 027 040 048 073 1B 28 30 49 Italian Microsoft (R) Ec(6J 027 040 054 074 1B 28 36 4A Publishing DeskTop Ec(7J 027 040 055 074 1B 28 37 4A PS Text Ec(10J 027 040 049 048 1B 28 31 30 4A 074 MC Text Ec(12J 027 040 049 050 1B 28 31 32 4A 074 Ventura Ec(13J 027 040 049 051 1B 28 31 33 4A International 074 Ventura US Ec(14J 027 040 049 052 1B 28 31 34 4A 074 Wingdings Ec(579 027 040 053 055 1B 28 35 37 39 4C L 057 076 PS Math Ec(5M 027 040 053 077 1B 28 35 4D Ventura Math Ec(6M 027 040 054 077 1B 28 36 4D Math-8 Ec(8M 027 040 056 077 1B 28 38 4D Symbol Ec(19M 027 040 049 057 1B 28 31 39 4D 077 ISO 8859-1 Ec(0N 027 040 048 078 1B 28 30 4E (ECMA-94) Latin 1 ISO 8859-2: Ec(2N 027 040 050 078 1B 28 32 4E Latin 2 ISO 8859-9: Ec(5N 027 040 053 078 1B 28 35 4E Latin 5 ISO 11: Ec(0S 027 040 048 083 1B 28 30 53 Swedish ISO 17: Ec(2S 027 040 050 083 1B 28 32 53 Spanish Windows 3.1 Ec(5T 027 040 053 084 1B 28 35 54 Latin 5 PC Turkish Ec(9T 027 040 057 084 1B 28 39 54 ISO 6: ASCII Ec(0U 027 040 048 085 1B 28 30 55 Legal Ec(1U 027 040 049 085 1B 28 31 55 Roman-8 Ec(8U 027 040 056 085 1B 28 38 55 Windows 3.0 Ec(9U 027 040 057 085 1B 28 39 55 Latin 1 PC-8 Ec(10U 027 040 049 048 1B 28 31 30 55 085 PC-8 D/N Ec(11U 027 040 049 049 1B 28 31 31 55 085 PC 850 Ec(12U 027 040 049 050 1B 28 31 32 55 085 Pi Font Ec(15U 027 040 049 053 1B 28 31 35 55 085 PC-852 Ec(17U 027 040 049 055 1B 28 31 37 55 085 Windows 3.1 Ec(19U 027 040 049 057 1B 28 31 39 55 085 Latin 1 (ANSI) Refer to the PCL-5 Comparison Guide for additional supported symbol sets. SPACING Primary Fixed Ec(s0P 027 040 115 048 080 1B 28 73 30 50 Spacing (p) (112) (70) (70) Proportional Ec(s1P 027 040 115 049 080 1B 28 73 31 50 (p) (112) (70) PITCH Primary # Ec(s#H 027 040 115 #...# 1B 28 73 #...# Pitch Characters/inch (h) 072 (104) 48 (68) Set 10.0 Ec&k0S 027 038 107 048 1B 26 6B 30 53 Pitch (s) 083 (115) (73) Mode Compressed Ec&k2S 027 038 107 050 1B 26 6B 32 53 (16.5-16.7) (s) 083 (115) (73) Elite (12.0) Ec&k4S 027 038 107 052 1B 26 6B 34 53 (s) 083 (115) (73) Function Parameter Command Decimal Value Hexadecimal Value POINT SIZE Primary # Points Ec(s#V 027 040 115 #...# 1B 28 73 #...# Height (v) 086 (118) 56 (76) STYLE Primary Upright Ec(s0S 027 040 115 048 083 1B 28 73 30 53 Style (Solid) (s) (115) (73) Italic Ec(s1S 027 040 115 049 083 1B 28 73 31 53 (s) (115) (73) Condensed Ec(s4S 027 040 115 052 083 1B 28 73 34 53 (s) (115) (73) Condensed Ec(s5S 027 040 115 053 083 1B 28 73 35 53 Italic (s) (115) (73) Compressed Ec(s8S 027 040 115 056 083 1B 28 73 38 53 (Extra (s) (115) (73) Condensed) Expanded Ec(s24S 027 040 115 050 052 1B 28 73 32 34 (s) 083 (115) 53 (73) Outline Ec(s32S 027 040 115 051 050 1B 28 73 33 32 (s) 083 (115) 53 (73) Inline Ec(s64S 027 040 115 054 052 1B 28 73 36 34 (s) 083 (115) 53 (73) Shadowed Ec(s128S 027 040 115 049 050 1B 28 73 31 32 (s) 056 083 (115) 38 53 (73) Outline Ec(s160S 027 040 115 049 054 1B 28 73 31 36 Shadowed (s) 048 083 (115) 30 53 (73) Additional style values may be obtained from the related documentation provided with HP's font products. PCL 5 HP LaserJet printers allow you to specify complex structures (contours, outlines, shading, etc. ) and widths as well as posture. Refer to the HP PCL 5 Printer Language Technical Reference Manual. STROKE WEIGHT Primary Font Stroke Weight Ultra Thin Ec(s-7B 027 040 115 045 055 1B 28 73 2D 37 (b) 066 (98) 42 (62) Extra Thin Ec(s-6B 027 040 115 045 054 1B 28 73 2D 36 (b) 066 (98) 42 (62) Thin Ec(s-5B 027 040 115 045 053 1B 28 73 2D 35 (b) 066 (98) 42 (62) Extra Light Ec(s-4B 027 040 115 045 052 1B 28 73 2D 34 (b) 066 (98) 42 (62) Light Ec(s-3B 027 040 115 045 051 1B 28 73 2D 33 (b) 066 (98) 42 (62) Demi Light Ec(s-2B 027 040 115 045 050 1B 28 73 2D 32 (b) 066 (98) 42 (62) Semi Light Ec(s-1B 027 040 115 045 049 1B 28 73 2D 31 (b) 066 (98) 42 (62) Medium Ec(s0B 027 040 115 048 066 1B 28 73 30 42 (book or (b) (98) (62) text) Semi Bold Ec(s1B 027 040 115 049 066 1B 28 73 31 42 (b) (98) (62) Demi Bold Ec(s2B 027 040 115 050 066 1B 28 73 32 42 (b) (98) (62) Bold Ec(s3B 027 040 115 051 066 1B 28 73 33 42 (b) (98) (62) Extra Bold Ec(s4B 027 040 115 052 066 1B 28 73 34 42 (b) (98) (62) Black Ec(s5B 027 040 115 053 066 1B 28 73 35 42 (b) (98) (62) Extra Black Ec(s6B 027 040 115 054 066 1B 28 73 36 42 (b) (98) (62) Ultra Black Ec(s7B 027 040 115 055 066 1B 28 73 37 42 (b) (98) (62) Function Parameter Command Decimal Value Hexadecimal Value PRIMARY TYPEFACE FAMILY LinePrinter Ec(s0T 027 040 115 048 084 1B 28 73 30 54 (116) (74) Typeface Albertus Ec(s4362T 027 040 115 052 051 054 1B 28 73 34 33 Family (t) 050 084 (116) 36 32 54 (74) Antique Ec(s4168T 027 040 115 052 049 054 1B 28 73 34 31 Olive (t) 056 084 (116) 36 38 54 (74) Clarendon Ec(s4140T 027 040 115 052 049 052 1B 28 73 34 31 (t) 048 084 (116) 34 30 54 (74) Coronet Ec(s4116T 027 040 115 052 049 049 1B 28 73 34 31 (t) 054 084 (116) 31 36 54 (74) Courier Ec(s4099T 027 040 115 052 048 057 1B 28 73 34 30 (t) 057 084 (116) 39 39 54 (74) Garamond Ec(s4197T 027 040 115 052 049 057 1B 28 73 34 31 Antiqua (t) 055 084 (116) 39 37 54 (74) Letter Ec(s4102T 027 040 115 052 049 048 1B 28 73 34 31 Gothic (t) 050 084 (116) 30 32 54 (74) Marigold Ec(s4297T 027 040 115 052 050 057 1B 28 73 34 32 (t) 055 084 (116) 39 37 54 (74) CG Omega Ec(s4113T 027 040 115 052 049 049 1B 28 73 34 31 (t) 051 084 (116) 31 33 54 (74) CG Times Ec(s4101T 027 040 115 052 049 048 1B 28 73 34 31 (t) 049 084 (116) 30 31 54 (74) Univers Ec(s4148T 027 040 115 052 049 052 1B 28 73 34 31 (t) 056 084 (116) 34 38 54 (74) Arial (R) Ec(s16602 027 040 115 049 054 054 1B 28 73 31 36 T (t) 048 050 084 (116) 36 30 32 54 (74) Times New Ec(s16901 027 040 115 049 054 057 1B 28 73 31 36 Roman (R) T (t) 048 049 084 (116) 39 30 31 54 (74) Symbol Ec(s16686 027 040 115 049 054 054 1B 28 73 31 36 T (t) 056 054 084 (116) 36 38 36 54 (74) Wingdings Ec(s31402 027 040 115 051 049 052 1B 28 73 33 31 T (t) 048 050 084 (116) 34 30 32 54 (74) UNDERLINE Underline Enable Fixed Ec&d0D 027 038 100 048 1B 26 64 30 44 (d) 068 (100) (64) Enable Ec&d3D 027 038 100 051 1B 26 64 33 44 Floating (d) 068 (100) (64) Disable Ec&d@ 027 038 100 064 1B 26 64 40 ______________________________________________________________________ Arial (R) is a U.S. registered trademark of the Monotype Corporation. Microsoft (R) is a U.S. registered trademark of Microsoft Corp. MS-DOS (R) is a U.S. registered trademark of Microsoft Corporation. Windows (R) and MS Windows (R) are U. S. registered trademarks of Microsoft Corp. Times New Roman (R) is a U.S. registered trademark of the Monotype Corporation. Copyright Hewlett-Packard Co. 1997 This information is subject to change without notice and is provided "as is" with no warranty. Hewlett-Packard shall not be liable for any direct, indirect, special, incidental or consequential damages in connection with the use of this material. FAQ