Printer Configuration
A printer is defined in the PRO/5 configuration file using the ALIAS command as follows:
alias bbxname realname comment modes
Parameter |
Description |
alias |
Identifies the following information as an alias (i.e., bbxname is an alias for realname). |
bbxname |
Refers to the name of the printer for PRO/5 to use. In order for this device to be considered a printer, the first character of the name must be either an "L" or a "P." Traditionally, printers are named in the sequence 'LP', 'P0'..'P9'. For TCP/IP and UDP sockets, the bbxname must begin with "N". |
realname |
Refers to the name of the operating system device to be used as the printing device, such as "/dev/lp" and "/dev/rlp" for the UNIX operating system, "/dev/lpt1" and "/dev/com1" for MS-DOS systems. |
comment |
A text description of the printer, such as "Laser Printer" or "Helen's Printer." The information in the comment field is never used by PRO/5. An application program may use this information, e.g., a program may provide a list of available printers, by "comment field" to the user, via the TSK() function. |
Star 10x/15x |
Comrex 420 |
HP Laser Jet |
IBM Matrix |
HP Think Jet |
Brother HR-15/25/35 |
TI 855/865 |
Spirit 80 |
Okidata 82/92 |
Okidata 83A/93 |
Okidata 84 |
Epson 80s |
Epson 100s |
Toshiba 1351 |
BusinessLand BL 45 |
NEC 7700 series |
NEC 5500 series |
NEC P2 series |
Diablo 620,630 |
|
mode |
Tells PRO/5 how to control a particular printer. If your printer is one of the printers listed above (or compatible with one of these printers), select this printer during the installation. If your printer is not on this list, select "undefined" and the install procedure will then prompt you for some of the information about your printer. |
Mode |
Description |
BS |
Printer supports ASCII backspace. This is where the printer prints the most recent character and the print head is positioned such that the next character received will overprint the most recently printed character. Typically supported on serial printers. |
BS=hexstring |
Use hexstring instead of ASCII backspace. hexstring should perform the same function as an ASCII backspace, above. |
COPIES=int |
If the system device supports a specification of the number of copies to be printed, this would define the default number of copies to be printed. This is typically overridden using the MODE= option on the OPEN of the printer. This option may be used on the spooled output from PRO/5 (e.g., with the UNIX operating system spool commands "lp" or "lpr" or the 'nspool' device for a Novell Network), if the system spool command supports it. |
CP=hexstring |
|
CPCOLS=int |
Number of printable columns while in compressed print mode. The default is 80 and the maximum is 255. Prior to PRO/5 1.05, the operating system default was used for the default. |
CPLINES=int |
Number of printable lines while in compressed print mode. |
FORM=int |
If the system device supports a specification of the form number to use in printing, this defines the default form to use. This is typically overridden using the MODE= option on the OPEN of the printer. This option may be used on the spooled output of PRO/5 if the spool commands, support it. (See example of COPIES= above.) |
CR |
Printer supports ASCII carriage return. A CR should cause the printer to print all characters in its buffer and to position the print head to the first column on the paper. |
CR=hexstring |
Use hexstring instead of ASCII CR. This is for printers that do not support the normal definition of a CR. The sequence should cause the printer to perform the operations defined in CR, above. |
EOL=string |
Overrides end-of-record errors on print devices. |
EPON=hexstring EPOFF=hexstring |
If the mnemonic 'EP' (expanded print) is used, then the current line is sent to the printer with the EPON and EPOFF hexstrings. |
EPCOLS=int |
Width of each character printed in expanded print mode. |
EPLINES=int |
Height of each character printed in expanded print mode. If EPLINES is 2, PRO/5 will count each line printed in 'EP' mode as two lines. |
FF=hexstring |
Use hexstring instead of ASCII formfeed. If an ASCII formfeed will not position the paper to the top of form position, this sequence should be defined. If not defined, PRO/5 will send the ASCII formfeed character. |
LF=hexstring |
Use hexstring instead of ASCII linefeed. A linefeed should print the current line and advance the paper one line. If CR is not supported, the printer should consider the next print position the first column on the line. If this option is not used, PRO/5 will use an ASCII linefeed character. |
PTON=hexstring |
Send hexstring to printer on first OPEN. This is intended to initialize the printer to a known state. However, no data is sent to the printer until the program actually sends something. Then PTON and SP are sent. |
PTOFF=hexstring |
Send hexstring to printer on last CLOSE. This is intended to reset the printer to a state expected by the host system. |
SLON=hexstring SLOFF=hexstring |
SLON hexstring defines the codes required to divert output to the printer and SLOFF hexstring defines the codes required to resume output to the terminal or workstation screen. |
SP=hexstring |
Sequence for the standard print 'SP' mnemonic. This is intended to reset the printer from the 'CP' or 'EP' mnemonics and is sent to the printer on the first OPEN of a channel to the printer. |
SPCOLS=int |
Number of printable columns while in the standard print mode. The default is 80 and the maximum is 255. Prior to PRO/5 1.05, the operating system default was used for the default |
SPLINES=int |
Number of printable lines while in the standard print mode. |
WAIT=int |
Wait for int seconds before reporting printer timeouts. The range for int is from 0 to 255. If int is set to 0, wait forever (this disables printer timeouts). |
The modes that have most commonly caused problems are the CR, carriage return, and LF, linefeed, modes. PRO/5 considers a "carriage return action" to be an action that moves the print head back to the left side of the paper without advancing the paper. PRO/5 considers a "linefeed action" to be an action which advances the paper but does not move the print mechanism. In order to begin printing on a new line of the paper, both a carriage return and a linefeed must be performed. Note that there is a standard linefeed character (hex 0A) and a standard carriage return character (hex 0D). Different printers react differently to these characters.
Many printers have switches on them that can change this behavior. It is best to leave the printer alone and make PRO/5 adjust to the printer.
Local Printing
Local or slave printers are attached to an auxiliary port on the back of a terminal or workstation and are controlled by the SLON= and SLOFF= modes. Since output to the terminal or workstation usually goes to the display screen, PRO/5 must notify the terminal or workstation when output is intended for the printer instead.
Examples
Example 1
The following identifies a printer called L1 in BBx, located at /dev/lp1, that supports ASCII carriage return, sets the printable columns to 80, and supports ASCII backspace:
ALIAS L1 /dev/lp1 "Letter Quality" cr,spcols=80,bs
Example 2
The following identifies a printer called L1 in BBx, located at /dev/lp1, and sets the hex 0D character as the linefeed character:
ALIAS L1 /dev/lp1 "Letter Quality" LF=0D
Example 3
The following identifies the setting for a Wyse 60 terminal attached to a serial port of a computer called /dev/tty2a:
ALIAS T3 /dev/tty2a term
Example 4
The following identifies the settings for Wyse 60 in Example 3 were attached to a local printer. It will print to the auxiliary port when it receives a hexadecimal 1B6423, and it will end printing to the auxiliary port when it receives a hexadecimal 14:
ALIAS P3 /dev/tty2a "Jan's Ptr" CR,SLON=1B6423,SLOFF=14