Advanced printer configuration

Using the terminfo database

The print service relies on the standard interface script and the terminfo database to initialize each printer and set up a selected page size, character pitch, line pitch, and character set. Thus, it is usually sufficient to have the correct entry in the terminfo database (/usr/lib/terminfo/terminfo.lp) to add a new printer to the print service.

The terminfo database identifies each printer by a short name, identical to the kind of name used to set the TERM shell variable. For example, the name in the terminfo database for the AT&T model 455 printer is ``455''.

To specify the terminfo type for your printer, in the Printer Setup Manager select Properties from the Printer menu, then select Printer Model. By default, the terminfo database includes entries for several popular printers. Select the terminfo type from the list that corresponds to your printer.

If terminfo does not include an entry for your printer, you might still be able to use the printer with the print service. However, you will not be able to use automatic selection of page size, pitch, and character sets, and you might have trouble keeping the printer set to the correct modes for each print request or using printer forms with the printer. In this case, you can either add an entry to terminfo for your printer or create a customized interface program to use with the printer.

You can define hundreds of items for each terminal or printer in the terminfo database. However, the print service uses fewer than 50 of these, and most printers need even less than that. You can check items defined for a specific terminfo entry by typing the following command:

infocmp terminfo_name

See also:

Adding a printer entry to the terminfo database

To create a terminfo entry for your printer:

  1. Identify an entry in the /usr/lib/terminfo/terminfo.lp file that uses the same or similar commands as the printer you are adding and copy that information to filename, where filename is the file containing the terminfo entry you created for the printer.

  2. Use the information in the manual for your printer, ``terminfo entry definitions for printers'', and terminfo(4) to modify the entry in filename.

  3. Once you create the new entry, compile it into the database:

    tic filename

After adding or deleting terminfo entries or changing values that govern pitch settings, page width and length, or character sets, stop and restart the print service.

terminfo entry definitions for printers

terminfo entry Description
daisy printer needs operator to change character set
bufsz number of bytes buffered before printing
* cols number of columns in a line
* it tabs initially every # spaces
* lines number of lines on a page
orc horizontal resolution in units per character
orhi horizontal resolution in units per inch
orl vertical resolution in units per line
orvi vertical resolution in units per inch
cps average print rate in characters per second
* cr carriage return
cpi change number of characters per inch
lpi change number of lines per inch
chr change horizontal resolution
cvr change vertical resolution
csnm list of character set names
mgc clear all margins (top, bottom, and sides)
* hpa horizontal position absolute
* cud1 down one line
* cuf1 carriage right
swidm enable double-wide printing
rwidm disable double-wide printing
* ff page eject
* is1 printer initialization string
* is2 printer initialization string
* is3 printer initialization string
* if name of initialization file
* iprog pathname of initializing program
* cud move carriage down # lines
* cuf move carriage right # columns
* rep repeat a character # times
* vpa absolute vertical position
scs select character set
smgb set bottom margin at current line
smgbp set bottom margin
* smgl set left margin at current column
smglp set left margin
* smgr set right margin at current column
smgrp set right margin
smgt set top margin at current line
smgtp set top margin
scsd start definition of a character set
* ht tab to next 8-space tab stop
The items marked with an asterisk (*) are available on your system and the rest can be added.

See terminfo(4) for the terminfo file structure and for information on how to construct a terminfo database entry for a new printer.

See also:

Next topic: Creating a printer form
Previous topic: Setting up printer interface scripts

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004