Managing printers and print jobs

Setting default printer page size and spacing

When a user submits a request to print a file, the page size, character pitch, and line pitch (spacing) are normally determined from the form that it is printed on. If the user does not require a form, he or she can specify the page size and print spacing to use. If the user gives neither a form to use nor the page size and print spacing, defaults are used.

NOTE: This information applies only to dot-matrix and print wheel printers, not to PostScript printers.

By setting defaults for each printer, you can make submitting print requests easier. For example, you can designate different printers as having different default page sizes or print spacing; you can dedicate one printer to printing wide (132-column) output, another to printing normal (80-columns, 66 lines) output, and yet to another printing letters in monospaced fonts (12 characters per inch, 8 lines per inch). Users simply route their file to the appropriate printer to get the style of output they want.

You can specify four default settings: page width, page length, character pitch, and line pitch. Specify the first two in columns and lines, inches (i) or centimeters (c); the last two in characters per inch (cpi) or lines per inch (lpi).

In addition, specify the character pitch as pica for 10 cpi, elite for 12 cpi, or compressed for the maximum cpi the printer can provide (up to a limit of 30 cpi).

To specify the default settings, use the following commands:

/usr/lib/lpadmin -p printer_name -o width=scaled-number
/usr/lib/lpadmin -p printer_name -o length=scaled-number
/usr/lib/lpadmin -p printer_name -o cpi=scaled-number
/usr/lib/lpadmin -p printer_name -o lpi=scaled-number

NOTE: lpadmin(ADM) uses the printer type to determine whether the settings are possible for the printer. Therefore, you must first set the printer type before you can specify these defaults.

For example, to specify a page width of 11 inches, a page length of 14 inches, character pitch to compressed, and line pitch of 3 lines per inch for the printer barney, enter:

/usr/lib/lpadmin -p barney -o width=11i
/usr/lib/lpadmin -p barney -o length=14i
/usr/lib/lpadmin -p barney -o cpi=compressed
/usr/lib/lpadmin -p barney -o lpi=3

If you do not provide defaults, the page size and print spacing are set to those available when the printer is initialized. You can find out what the defaults are by first defining the printer configuration without providing your own defaults, then using lpstat(C) to display the printer configuration. To display the default page size and print spacing, enter:

lpstat -p printer_name -l

You see a display that includes information similar to:

   Default pitch: compressed CPI 3 LPI
   Default page size: Default page size: 11i wide 14i long
If you do not set the defaults, lpstat reports defaults from the terminfo database entry for the printer.

See also:

Next topic: Bypassing the spooler
Previous topic: Customizing printer configuration

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003