Lpr

Sends a file to a computer running Line Printer Daemon (LPD) in preparation for printing. Used without parameters, lpr displays command-line help for the lpr command.

Syntax

lpr [-S ServerID] -P PrinterName [-C BannerContent] [-J JobName] [{-o | -o l}] [-d] [-x] FileName

Parameters

-S   ServerID   : Specifies, by name or IP address, the computer that hosts the printer on which you want to print the file. You do not need to provide this parameter if the printer is attached to the local computer.

-P   PrinterName   : Required. Specifies, by name, the printer on which you want to print the file.

-C   BannerContent   : Specifies the content to print on the banner page of the print job. If you do not include this parameter, the name of the computer from which the print job was sent appears on the banner page.

-J   JobName   : Specifies the print job name that will be printed on the banner page. If you do not include this parameter, the name of the file being printed appears on the banner page.

{ -o | -o l } : Specifies the type of file that you want to print. The parameter -o specifies that you want to print a text file. The parameter -o l specifies that you want to print a binary file (for example, a PostScript file).

-d   : Specifies that the data file must be sent before the control file. Use this parameter if your printer requires the data file to be sent first. For more information, see your printer documentation.

-x   : Specifies that the lpr command must be compatible with the Sun Microsystems operating system referred to as SunOS for releases up to and including 4.1.4_u1.

FileName   : Required. Specifies, by name, the file to be printed.

/?   : Displays help at the command prompt.

Remarks

  • To find the name of the printer, open the Printers and Faxes folder. To open Printers and Faxes, click Start, click Control Panel, click Printers and Other Hardware, and then click Printers and Faxes

Formatting legend

Format

Meaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output

Lpq

Command-line reference A-Z