HOW TO SEND A FILE TO A REMOTE PRINTER The LPR and RPR utilities let you send a file to a printer connected to a remote host. [!!!NOTE: At MIT, once you are connected to MITnet with LWP network software, you can use the LWP remote printer utilities to send files to Athena printers located across campus. You can find the list of supported Athena printers on Athena. At the % prompt type olh welcome. This command will give you the online version of Welcome to Athena, which includes a "cluster list" -- both machines and printers.] These are DOS utilities, but they can be executed from Windows by double-clicking the appropriate icon in the LAN WorkPlace window. Note: After double-clicking the icon, a parameter entry box appears. The same parameters should be entered in this box as would be entered at the command line, but do not retype the command name (LPR, LPQ RPS, and so on). After the parameters are entered, a DOS window opens to display the host response to the command. This window should be closed (not minimized) after each command to prevent an accumulation of inactive windows. This accumulation might occur because each time one of the L- or R-utilities is executed, another window is created regardless of whether an identical window is already open. LPR UTILITY The LPR utility lets you send a file to a printer connected to a remote host by creating a printer job in a spooling area on the remote host. This job is printed once the printer becomes available. The LPR syntax is as follows: lpr [-Pprinter] [-Hhost] [-#copies] [-Cclass] [-Jjob] [-Ttitle] [-i [indent] ] [-wcolumns] [-m] [-h] [-q] [-p] [-1] [~-v] [-f] [-t] [-n] [-d] [-g] [ -c] [ filename [ . . . ] ] Note: L-utility command-line options and parameters are case-sensitive; they must be entered in uppercase or lowercase, as shown. The LPR command-line options and parameters are listed and briefly described in the table below. TABLE OF LPR OPTIONS AND PARAMETERS ============================================================= Options and Parameters Description ============================================================= -Pprinter Specifies the printer to which to send the print file; this is the ASCII name as it appears in the /etc/printcap file or equivalent on the remote host. The default for this parameter, if it is not set by the user, is the first PRINTER: entry in the PRINT.CFG file. -Hhost Specifies the host to which to send the command; this input can be the hostname or the IP address in dotted notation. The default for this parameter, if it is not set by the user, is the hostname associated with the first PRINTER: entry in the PRINT.CFG file. -#copies Specifies the number of copies of the file to print. The default is one copy. -Cclass Prints class as the job classification on the banner page. The class can be up to 31 characters long. The default is the hostname. -Jjob Prints job as the job name on the banner page; the default is the first filename entered. -Ttitle Uses title as the name to print for pr. The title can be up to 79 characters long. This option only becomes available when the -p option is used. The default is the filename. -i[indent] Specifies the number of columns to indent each line on the printout; this is only applicable with the -p option and is ignored with all other filter options. -wcolumns Uses columns as the page width for pr; this option is only available when the -p option is used. -m Sends mail back to user when the job is completed. NOTE: Sends mail on the -Hhost. -h Suppresses printing of the burst page; if the burst page is suppressed, associated values such as class and job are ignored. -q Quiet mode; suppresses the reporting of the status of the command. LPR FILTER OPTIONS The LPR filter options and parameters are listed and briefly described in the table below LPR filter options -p and -l are standard options; all remaining filter options are nonstandard. TABLE OF LPR FILTER OPTIONS AND PARAMETERS ============================================================= Options and Parameters Description ============================================================= -p Uses pr to format the files to print. pr is a pagination utility on UNIX for text files. -l Prints the file without filtering the control characters. -v Prints files in Sun raster format. -f Prints files using FORTRAN format; the first column of each line is treated as a FORTRAN carriage control character. -t Prints files as Graphic Systems C/A/T phototypesetter input; C/A/T is the standard output for the UNIX troff command. -n Prints files as ditroff output, if your printer is configured for this output. -d Prints files in Stanford DVI format for TeX output (if your printer is configured for this output). -g Prints files that are output from the Berkeley UNIX plot library, if your printer is configured for this output. -c Plots files that are formatted in CalTech Intermediate Format (CIF), if your printer is configured for this output. filename [ ... ] Specifies the name of one or more files that you want to print. You can include any valid DOS wildcard characters, such as * and ?, in the filename specification. You can specify filename as a complete or partial path name. If you omit filename, LPR reads from standard input (usually the keyboard). For additional information about LPR options, refer to the Line Printer Daemon Protocol document (RFC 1179) and the UNIX man pages. EXAMPLE: LPR The following command sends the file SCHEDULE.DOC to the printer LASER1 on the host VENUS with the title ProjectSchedule on the banner page. C:\> LPR -PLASERl -HVENUS TProjectSchedule schedule.doc [As the process is executed by the command shown above, appropriate messages are displayed to the user, similar to the sample messages below: LPR - Copyright (c) 1992, Novell, Inc. Sending schedule.doc to venus. schedule.doc sent.] If the -q option is used, the user will not be informed about the progress of the command. RPR UTILITY The RPR utility lets you send a file to a printer connected to a remote host. To do this, enter a command in the following format: C: \> RPR [ -A I -B ] [ -Lusername ] [ -Pprinter ] [ -Ttitle ] [ filename [ ... ] ] The RPR command-line options and parameters are listed and briefly described in the table below. TABLE OF RPR OPTIONS AND PARAMETERS ============================================================= Options and Parameters Description ============================================================= -A Forces RPR to send filename as an ASCII text file. Do not specify both the -A and -B options in the RPR command line. -B Forces RPR to send filename as a binary file. This option is useful for printing graphic-image files. Do not specify both the -A and -B options in the RPR command line. -Lusername Specifies the name of the remote user, username. This is the name of the account through which you can access the remote host. If you omit this option, RPR uses the default remote username you established with the DOS SET NAME command. -Pprinter Specifies the name of the remote printer you want to use. You must specify printer exactly as it is listed in the printer configuration file PRINT.CFG. The RPR entry is selected by matching printer to the PRINTER: entries in the printer configuration file. RPR uses the first matching PRINTER: entry. If you do not specify this option, RPR uses the first printer entry listed. Ttile Specifies the title to be printed instead of the default TITLE: entry given in the printer configuration file. filename [ ... ] Specifies the name of one or more files that you want to print. You can include any valid DOS wildcard characters, such as * and ?, in the filename specification. You can specify filename as a complete or partial path name. If you omit filename, RPR reads from standard input (usually the keyboard). You can also print files as a group. The following examples show two ways that you can group files together to become one print job: C:\> RPR -PLASERl JAN.SLS FEB.SLS MARCH.SLS C:\> RPR -PLASERl *.SLS If the remote printer is attached to a UNIX host, RPR typically displays no response when you send a file to print. If the remote printer is attached to a VMS host, RPR displays a message similar to the following one: job 936 (queue 3, entry 1) queued To abort an RPR command, press or and then press the key.