PC LTAS comes with a printer configuration file called PRINTERS.LT. New printers can be added to this file or to a new file with NEWPRTRS.EXE. This is a utility which is started at the DOS prompt with the command "newprtrs". The following figures show how it appears on the screen.
To enter a new printer you will need to read the printer manual to find the printer control codes. These are the characters to send to the printer to change its font, character spacing, character size, print direction, etc. Sometimes these are called "escape sequences" because they often begin with the escape character. You will need to enter the printer characters as pairs of hexadecimal bytes. Sometimes manuals will give these values as decimal numbers or as abbreviations. Use the table of ASCII characters at the end of this appendix to convert characters or decimal numbers into hexadecimal.
Tables of printer control characters are included in this appendix.
NEWPRTRS.EXE screen when first entering the program. |
It is also necessary to identify the output port to which the printer is connected. By pressing the spacebar, NEWPRTRS cycles through a list available ports (generally LPT1 through LPTn for parallel ports and COM1 through COMn for serial ports.)
If you are adding to an existing file you will be given a warning. Choose "Append " if you are adding a new printer to the file. Choose "WriteOver" if you are starting the file from the beginning; this will remove older entries. Choose "ReSpecify " if you want to name a different file.
"Add to file" button is used after entering all the information into the fields. Leave fields blank if the printer does not have a command for the option. The code for italic style might be substituted for underline on if the upright (normal) style is substituted for underline off. Other codes could be placed in the setup field.
After adding the printer configuration to the file the cursor will return to the "printer type" field. The values from the previous printer remain on the screen until they are overwritten. This is helpful when entering several configurations for the same printer with only minor changes. This Figure has the control codes for Hewlett-Packard LaserJet specifying duplex printing using the short edge as the binding edge. There is no place on the screen labeled "duplex short edge" so the codes are added to the end of the landscape and portrait fields. Whether landscape or portrait is chosen in PC LTAS, the "duplex short edge" command will also be sent to the printer.
Warning box when choosing an existing file. |
Example of a completed screen for HP duplex short edge |
The printer code sequences from the default PRINTERS.LT file supplied with PC LTAS are shown in two formats. The first line is a set of hexadecimal pairs separated by spaces. The second line lists the literal characters. Unprintable or upper ASCII characters are represented in curly brackets as the control code name or for upper ASCII the hexadecimal number. For example, escape, ^[, decimal 27, hex 1B = '{ESC}', character 255 = '{ chr 255 }'.
Table N-1: Printer control codes in "printers.lt" file | ||||
---|---|---|---|---|
NAME | CONTROL STRING | HEXADECIMAL | ||
EPSON DOT MATRIX | ||||
reset | {ESC}@ | 1B 40 | ||
underline on | {ESC}-{SOH} | 1B 2D 01 | ||
underline off | {ESC}- | 1B 2D 00 | ||
ten pitch | {ESC}P | 1B 50 | ||
twelve pitch | {ESC}M | 1B 4D | ||
condensed | {SI} | 0F | ||
IBM DOT MATRIX | ||||
reset | {ESC}?{STX} | 1B 3F 02 | ||
underline on | {ESC}-{STX} | 1B 2D 02 | ||
underline off | {ESC}- | 1B 2D 00 | ||
ten pitch | {DC2} | 12 | ||
twelve pitch | {ESC}: | 1B 3A | ||
condensed | {SI} | 0F | ||
OKIDATA DOT MATRIX | ||||
underline on | {ESC}C | 1B 43 | ||
underline off | {ESC}D | 1B 44 | ||
ten pitch | {RS} | 1 | ||
twelve pitch | {FS} | 1C | ||
condensed | {GS} | 1D | ||
PANASONIC DOT MATRIX | ||||
reset | {ESC}@ | 1B 40 | ||
underline on | {ESC}-{SOH} | 1B 2D 01 | ||
underline off | {ESC}- | 1B 2D 00 | ||
ten pitch | {ESC}n{ESC}P | 1B 6E 1B 50 | ||
twelve pitch | {ESC}l{ESC}@ | 1B 6C 1B 40 | ||
condensed | {ESC}{SI}{SI} | 1B 0F 0F | ||
HP LASERJET | ||||
setup | {ESC}(10U{ESC}&l0E | 1B 28 31 30 55 1B 26 6C 30 45 | ||
reset | {ESC}E | 1B 45 | ||
underline on | {ESC}&d0D | 1B 26 64 30 44 | ||
underline off | {ESC}&d@ | 1B 26 64 40 | ||
ten pitch | {ESC}&k0S | 1B 26 6B 30 53 | ||
twelve pitch | {ESC}&k4S | 1B 26 6B 34 53 | ||
condensed | {ESC}&k2S | 1B 26 6B 32 53 | ||
landscape | {ESC}&l1O | 1B 26 6C 31 4F | ||
portrait | {ESC}&l0O | 1B 26 6C 30 4F | ||
HP DUPLEX LONG EDGE | ||||
setup | {ESC}(10U{ESC}&l0E | 1B 28 31 30 55 1B 26 6C 30 45 | ||
reset | {ESC}E | 1B 45 | ||
underline on | {ESC}&d0D | 1B 26 64 30 44 | ||
underline off | {ESC}&d@ | 1B 26 64 40 | ||
ten pitch | {ESC}&k0S | 1B 26 6B 30 53 | ||
twelve pitch | {ESC}&k4S | 1B 26 6B 34 53 | ||
condensed | {ESC}&k2S | 1B 26 6B 32 53 | ||
landscape | {ESC}&l1O{ESC}&l1S | 1B 26 6C 31 4F 1B 26 6C 31 53 | ||
portrait | {ESC}&l0O{ESC}&l1S | 1B 26 6C 30 4F 1B 26 6C 31 53 | ||
HP DUPLEX SHORT EDGE | ||||
setup | {ESC}(10U{ESC}&l0E | 1B 28 31 30 55 1B 26 6C 30 45 | ||
reset | {ESC}E | 1B 45 | ||
underline on | {ESC}&d0D | 1B 26 64 30 44 | ||
underline off | {ESC}&d@ | 1B 26 64 40 | ||
ten pitch | {ESC}&k0S | 1B 26 6B 30 53 | ||
twelve pitch | {ESC}&k4S | 1B 26 6B 34 53 | ||
condensed | {ESC}&k2S | 1B 26 6B 32 53 | ||
landscape | {ESC}&l1O{ESC}&l2S | 1B 26 6C 31 4F 1B 26 6C 32 53 | ||
portrait | {ESC}&l0O{ESC}&l2S | 1B 26 6C 30 4F 1B 26 6C 32 53 |
Table N-2: Dot matrix printers -- selected control codes. | |||
---|---|---|---|
FUNCTION | CONTROL STRING | HEXADECIMAL | |
IBM ProPrinter 4201
IBM ProPrinter II/XL |
|||
bold | {ESC}E | 1B 45 | |
condensed | {SI} | 0F | |
draft quality | {ESC}I{NUL} | 1B 49 00 | |
letter quality | {ESC}G | 1B 47 | |
reset | {FF}{DC}{ESC}F{ESC}H{ESC}4 | 0C 12 1B 46 1B 48 1B 34 | |
NEC Pinwriter P-6 | |||
bold | {ESC}E | 1B 45 | |
condensed | {ESC}{SI} | 1B 0F | |
draft quality - elite | {ESC}x0{ESC}!{SOH} | 1B 78 30 1B 21 01 | |
draft quality - pica | {ESC}x0{ESC}!{NUL} | 1B 78 30 1B 21 00 | |
draft quality - proportional | {ESC}x0{ESC}!{STX} | 1B 78 30 1B 21 02 | |
letter quality - elite | {ESC}x1{ESC}!{SOH} | 1B 78 31 1B 21 01 | |
letter quality - pica | {ESC}x1{ESC}!{NUL} | 1B 78 31 1B 21 00 | |
letter quality - proportional | {ESC}x1{ESC}!{STX} | 1B 78 31 1B 21 02 | |
reset | {FF}{FS}@ | 0C 1C 40 | |
NEC Spinwriter 2050/3050 | |||
bold | {ESC}E | 1B 45 | |
condensed | {ESC}{SI} | 1B 0F | |
reset | {FF}{ESC}#A | 0C 1B 23 41 | |
bold | {ESC}* | 1B 2A | |
condensed | {ESC}]H | 1B 5D 48 | |
reset | {FF}{ESC}#A | 0C 1B 23 41 | |
Panasonic 1080/1080i | |||
bold | {ESC}E | 1B 45 | |
condensed | {ESC}{SI} | 1B 0F | |
letter quality | {ESC}n | 1B 6E | |
reset | {FF}{ESC}@ | 0C 1B 40 | |
bold | {ESC}E | 1B 45 | |
condensed | {ESC}{SI} | 1B 0F | |
draft quality - elite | {ESC}n | 1B 6E | |
draft quality - pica | {ESC}p | 1B 70 | |
letter quality - elite | {ESC}o | 1B 6F | |
letter quality - pica | {ESC}n | 1B 6E | |
reset | {FF}{ESC}@ | 0C 1B 40 | |
Star Gemini 10X | |||
condensed | {SI} | 0F | |
letter quality | {ESC}E | 1B 45 | |
reset | {FF}{ESC}@ | 0C 1B 40 | |
Star NX-1000 | |||
condensed | {SI} | 0F | |
letter quality | {ESC}x1 | 1B 78 31 | |
reset | {FF}{ESC}@ | 0C 1B 40 |
Table N-3: HP LaserJet series -- selected control codes. | ||
---|---|---|
FUNCTION | CONTROL STRING | HEXADECIMAL |
Character Set - IBM USA (PC-8) | {ESC}(10U | 1B 28 31 30 55 |
Character Set - Line Draw | {ESC}(0B | 1B 28 30 42 |
Character Set - Roman Extension | {ESC}(0E | 1B 28 30 45 |
Character Set - Roman-8 | {ESC}(8U | 1B 28 38 55 |
Character Set - USASCII | {ESC}(0U | 1B 28 30 55 |
Duplex - Long Edge Binding | {ESC}&l1S | 1B 26 6C 31 53 |
Duplex - Short Edge Binding | {ESC}&l2S | 1B 26 6C 32 53 |
Orientation - Landscape | {ESC}&l1O | 1B 26 6C 31 4F |
Orientation - Portrait | {ESC}&l0O | 1B 26 6C 30 4F |
Pitch 10 | {ESC}&k0S | 1B 26 6B 30 53 |
Pitch 12 | {ESC}&k's | 1B 26 6B 34 53 |
Pitch 16.6 - Condensed | {ESC}&k2S | 1B 26 6B 32 53 |
Reset | {ESC}E | 1B 45 |
Simplex | {ESC}&l0S | 1B 26 6C 30 53 |
Stroke - Light | {ESC}(s-3B | 1B 28 73 2D 33 42 |
Stroke Weight - Bold | {ESC}(s3B | 1B 28 73 33 42 |
Stroke Weight - Normal | {ESC}(s0B | 1B 28 73 30 42 |
Style - Italic | {ESC}(s1S | 1B 28 73 31 53 |
Style - Upright (Normal) | {ESC}(s0S | 1B 28 73 30 53 |
Top Margin - 0 lines | {ESC}&l0E | 1B 26 6C 30 45 |
Underline Off | {ESC}&d@ | 1B 26 64 40 |
Underline On - Floating | {ESC}&d3D | 1B 26 64 33 44 |
Underline On - Solid | {ESC}&d0D | 1B 26 64 30 44 |
Table N-4: ASCII characters |
---|
Each character is shown with its decimal number, hexadecimal number, and the character. The first 32 characters (0 through 31) are not printable so they are shown with their standard abbreviation followed by their control code. "^" is an abbreviation for the control key. For example, the null character is shown as "^@ " -- an abbreviation for control key plus "@" key.
0 | 00 | NUL | ^@ |
1 | 01 | SOH | ^A |
2 | 02 | STX | ^B |
3 | 03 | ETX | ^C |
4 | 04 | EOT | ^D |
5 | 05 | ENQ | ^E |
6 | 06 | ACK | ^F |
7 | 07 | BEL | ^G |
8 | 08 | BS | ^H |
9 | 09 | HT | ^I |
10 | 0A | LF | ^J |
11 | 0B | BT | ^K |
12 | 0C | FF | ^L |
13 | 0D | CR | ^M |
14 | 0E | SO | ^N |
15 | 0F | SI | ^O |
16 | 10 | DLE | ^P |
17 | 11 | DC1 | ^Q |
18 | 12 | DC | ^R |
19 | 13 | DC3 | ^S |
20 | 14 | DC4 | ^T |
21 | 15 | NAK | ^U |
22 | 16 | SYN | ^V |
23 | 17 | ETB | ^W |
24 | 18 | CAN | ^X |
25 | 19 | EM | ^Y |
26 | 1A | SUB | ^Z |
27 | 1B | ESC | ^[ |
28 | 1C | FS | ^\ |
29 | 1D | GS | ^] |
30 | 1E | RS | ^^ |
31 | 1F | US | ^_ |
32 | 20 | |
33 | 21 | ! |
34 | 22 | " |
35 | 23 | # |
36 | 24 | $ |
37 | 25 | % |
38 | 26 | & |
39 | 27 | ' |
40 | 28 | ( |
41 | 29 | ) |
42 | 2A | * |
43 | 2B | + |
44 | 2C | , |
45 | 2D | - |
46 | 2E | . |
47 | 2F | / |
48 | 30 | 0 |
49 | 31 | 1 |
50 | 32 | 2 |
51 | 33 | 3 |
52 | 34 | 4 |
53 | 35 | 5 |
54 | 36 | 6 |
55 | 37 | 7 |
56 | 38 | 8 |
57 | 39 | 9 |
58 | 3A | : |
59 | 3B | ; |
60 | 3C | < |
61 | 3D | = |
62 | 3E | > |
63 | 3F | ? |
64 | 40 | @ |
65 | 41 | A |
66 | 42 | B |
67 | 43 | C |
68 | 44 | D |
69 | 45 | E |
70 | 46 | F |
71 | 47 | G |
72 | 48 | H |
73 | 49 | I |
74 | 4A | J |
75 | 4B | K |
76 | 4C | L |
77 | 4D | M |
78 | 4E | N |
79 | 4F | O |
80 | 50 | P |
81 | 51 | Q |
82 | 52 | R |
83 | 53 | S |
84 | 54 | T |
85 | 55 | U |
86 | 56 | V |
87 | 57 | W |
88 | 58 | X |
89 | 59 | Y |
90 | 5A | Z |
91 | 5B | [ |
92 | 5C | \ |
93 | 5D | ] |
94 | 5E | ^ |
95 | 5F | _ |
96 | 60 | ` |
97 | 61 | a |
98 | 62 | b |
99 | 63 | c |
100 | 64 | d |
101 | 65 | e |
102 | 66 | f |
103 | 67 | g |
104 | 68 | h |
105 | 69 | I |
106 | 6A | j |
107 | 6B | k |
108 | 6C | l |
109 | 6D | m |
110 | 6E | n |
111 | 6F | o |
112 | 70 | p |
113 | 71 | q |
114 | 72 | r |
115 | 73 | s |
116 | 74 | t |
117 | 75 | u |
118 | 76 | v |
119 | 77 | w |
120 | 78 | x |
121 | 79 | y |
122 | 7A | z |
123 | 7B | { |
124 | 7C | | |
125 | 7D | } |
126 | 7E | ~ |
127 | 7F | DEL |