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: The preceding information does not apply to PostScript printers.

By setting defaults for each printer, you can make it easier to submit print requests. 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 another to 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 the following default settings:

  • Page width
  • Page length
  • Character pitch
  • Line pitch

Specify the first two in columns and lines respectively (or in inches). Specify character pitch and line pitch 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
Note: The lpadmin command 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/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 determine what the defaults are by first defining the printer configuration without providing your own defaults, then using the lpstat command to display the printer configuration. To display the default page size and print spacing, enter:

lpstat -p printer_name -l

Information similar to the following displays:

   Default pitch: compressed CPI 3 LPI
   Default page size: Default page size: 11i wide 14i long

If you do not set the defaults, the lpstat command reports defaults from the terminfo database entry for the printer.