To print to other printers:
To print to a printer named dell5130cdn, type as follows.
% lp -d dell5130cdn filename
The name of the printer can be confirmed by executing lpstat -v.
To change the default printer temporarily for printing:
To change the default printer, set the printer name in the environment variable LPDEST.
To set a printer named dell5130cdn as the default printer for printing, type as follows.
% setenv LPDEST dell5130cdn
% lp filename
Using this method, a default printer can be set up for each user.
The above example describes the setup method executed when cache is used.
To select a paper tray for printing:
To select a paper tray for printing, specify the paper tray after the -y option of the lp command.
Depending on installed options, the available paper trays are different.
To select and print to a letter size paper of the printer named dell5130cdn with landscape, specify as follows.
% lp -d dell5130cdn -y landscape -y letter filename
The following options can be specified by the lp command.
To print text files:
It prints according to the length and width specified by the lpadmin command.
Sets printing to 2-column printing.
Rotates the image by 90° and uses the paper in the landscape orientation.
Sets the font size to n point.
This option converts text to single-byte text and sets printing to start from the nth column.
Sets printing to start from the nth line.
Sets the font for printing single-byte alphanumeric characters. If the font specified is not available for the
printer, the default fonts are used.
To specify a font, type the font name as-is after the -y font= option.
% lp -y font=Courier-Oblique filename
For information on the available fonts, see the PS Fonts List.
Specifies the margin of a page in inches. The u (upper margin), b (bottom margin), r (right margin), and l
(left margin) are positive real numbers (up to two decimal points). The default is 0.