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, use the -T option of the lpadmin command. By default, the terminfo database includes entries for many popular printers. Select the terminfo type 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 (Adding a printer entry to the terminfo database) for your printer or create a customized interface program (Creating printer interface scripts) 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 entering the following command:
infocmp terminfo_name