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.
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 respectively, or in inches; last two in characters per inch (cpi) and lines per inch(lpi) respectively.
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/sbin/lpadmin -p printer_name -o width=scaled-number
/usr/sbin/lpadmin -p printer_name -o length=scaled-number
/usr/sbin/lpadmin -p printer_name -o cpi=scaled-number
/usr/sbin/lpadmin -p printer_name -o lpi=scaled-number
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/sbin/lpadmin -p barney -o width=11i
/usr/sbin/lpadmin -p barney -o length=14i
/usr/sbin/lpadmin -p barney -o cpi=compressed
/usr/sbin/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,
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 longIf you do not set the defaults, lpstat reports defaults from the terminfo database entry for the printer.