Using the LPR command line approach

LP commands

Use the LPR command line approach to add files to the print queue. Follow the example closely with regard to spacing and case. You can enter additional file names, or option switches followed by file names, if necessary.

Enter the following command at the MS-DOS prompt. Follow the example closely with regard to spacing and case.

LPR -Sserver -Pprinter [-options] print file name, copies

For example, use the LPR command to print five copies of the plot file test.txt from the 999.9.999.9 network address to printer1: LPR -S999.9.999.9 -Pprinter1 -Og test.txt,5.

  1. After the -S parameter, enter the IP address Short for Internet Protocol address. A 32-bit (4-byte) binary number that uniquely identifies a host (computer) connected to the Internet to other Internet hosts. or equivalent host name of the print server where files will be sent.

  2. After the -P parameter, enter the name of the print queue on the print server.

  3. Once the server and printer parameters have been defined, enter any custom command line switches.

  4. Enter the file name of the print document. LPR will transmit the original file name to be used as the display name by the receiving LPD, unless a different name is specified on the command line, using the -N command. Spaces in long file names are supported.

  1. Enter a comma followed by the number of copies you want to print.

Use the interactive approach to TCP/IP printing to simplify the LPR configuration process. This approach eliminates the need to remember either the switch syntax or the attributes and options of the switches. Also, the functionality of some switches is dependent on other switches. Dependencies are built into the interactive approach so that you do not have to remember which switches must be active for the dependent switches to work.

What do you want to do?

See also: