|
|
This chapter explains various ways to print copies of the files that you generate on MMM computers. The names and locations of the printers can be found on the Resources page. This chapter will cover the following commands.
Three printer environment variables are used for the various printing commands. These variables are listed below. You should set all of these in your .login file to point to your default printer. Users should also be considerate in their use of the laser printers. Do not print out excessively large jobs during normal work hours.
Syntax: lpr [options] filenameIf you specify a - (dash) for the file name, lpr will look for its input from standard input.
If you are using a Xerox printer, you can also use the xprint command, which is discussed later in this chapter.
The most commonly used options are:
-Pprinter Specify printer to receive the output. If this is not specified, the output defaults to the value of the PRINTER environment variable. -m Send mail to inform you of printing completion. -s Symbolic link. Normally, lpr copies files to the spooling directory of the machine where the command is typed. If -s is specified, lpr will use the original file for input. Thus, with this option, do not change the file until you finish printing. This option is for printing very large files. -#n Specify number of copies to print. -r Remove the file after printing. Use with the -s option.In addition, certain flags will tell lpr that the file is "special":
-d Presumes TeX (DVI) file. -v Presumes raster file. -t Presumes troff output fileFor example, to print three copies of fish.txt on the printer peach, enter
lpr -Ppeach -#3 fish.txt
Syntax: lp [options] filenameThe most commonly used options are
-ddest Specify printer (dest) to receive the output. If this is not specified, output will default to the value of the environment variable LPDEST. -n# Specify number of copies to print. -m Send mail to inform you of printing completion.For example, to print three copies of fish.txt on the printer peach, enter
lp -dpeach -#3 fish.txt
Syntax: lpq [-Pprinter] [-l]When lp requests that a file be printed, this request is put in a queue. lpq allows you to check the status of one (or all) of your printing requests while they reside in the local spool directory. Note that a print job may not have actually completed printing, even though this command may not list it.
If you invoke lpq without arguments, all the print requests in the default printer's queue are reported. (The default printer is specified by $PRINTER.) If the -P option is used, the status of that printer is reported.
The output will include the request_id associated with your printing request. This id can be used to cancel this request with lprm. Additional lp options are
-l Display information in "long" format. -Pprinter Designate printer to be analyzed.
Syntax: lpstat [options]Following are the options that can be used with lpstat.
-t Display all status information. -s Display a basic summary of printers, including what the default printer is and the devices associated with the various printers. -o Display status of all printer requests.
Syntax: lprm [-Pprinter] [-][request_id] [user]Note: lprm removes print requests from a queue.
Following is a list of lprm options.
- Removes all requests made by that user -Pprinter Specifies the printer queue to examine.As an example, to remove the request with id 13 on the printer peach, enter
lprm -Ppeach 13
Syntax: cancel [request_id] [printer]
Syntax: xprint [options] filename
The more commonly used xprint options are:
-dprinter Specify printer to receive the output. -cn Specify number of copies to print -n Do not display menu or graphical user interface4.2.2 The qpr Command
The qpr command was developed for the QMS printers, which are no longer available, but will also work in many instances for printing to the Xerox black and white printers. The qpr command can be used with a wide variety of options. For more details on these options, see the man page.Syntax: qpr [options] filenameThe more commonly used qpr options are:-P printer Specify printer to receive the output. -#n Specify number of copies to print -d Print in duplex mode. -t Print in tumble duplex mode. -ls Print in landscape mode. -p Print in portrait mode. -h option Turn header page on or off for the current job. Default is off.The following example shows how to use the qpr command to print test.ps on printer peach.qpr -P peach test.psNote: The space between the -P and the printer name is required.
On-line Information
The prtpost command takes a single optional argument, the source file name. If no file name is given, prtpost will read from the standard input. By default, the prtpost command writes to standard output.
Syntax: prtpost [options] filenameThe following example shows how to redirect the output to a file.
prtpost -L -P120 -F Helvetica stuff.txt > stuff.psThis command would process the file stuff.txt using the 12-point Helvetica font in landscape mode, and write the PostScript file, stuff.ps.
Note: Margins and points sizes are specified in decipoints; one decipoint is 1/720 of an inch. Thus, to obtain point sizes, multiply by 10. For example, -P120 was used to select the 12-point type above.
Some of the most commonly used prtpost options are:
-L Specify landscape
orientation. The default is portrait.
-N Turn off header.
The default is to print a header for
every page.
-2 Set text in two columns. The default is one column.
-# Select number of copies.
-P Specify body
point size (decipoints). This is the font
size used
for main body of text.
-tbydist Specify body top margin (decipoints).
The main text
will begin
printing at this distance from the bottom of
the page.
For example, to leave a top margin of 2" on
legal size
paper (8-1/2" x 14"), set tb to
(14-2)x720
= 8640. The defaultm is page length less
1" (720
decipoints).
-lbxdist Specify body left margin. The main
text will begin
printing
at this distance from the left edge of the
page. The
default is 3/4" (540 decipoints).
-bbydist Specify body bottom margin. The last
line on each page
will be
printed at this distance from the bottom of the
page. The
default is 1/2" (360 decipoints).
-thydist Specify header top margin. The page
header will print at
this distance
from the bottom of the page. The default
is page
length less 1/2" (360 decipoints).
Syntax: command [options] filenameThe duplexing commands available are:
dup80 Print double-sided, 80-character text. dup132 Print double-sided, 132-character text. dupf Print FORTRAN source code double-sided, two columns per page, in landscape mode.These options can be used with the above duplexing commands.
-N Turn off page headers. -P printer Specify printer.
Syntax: gpr filenameThis command will convert the metacode file to PostScript and send the job to the printer specified by the environment variable LASER.
Syntax: hpr [-P printer] -a or -ps [-t] filename
As there is currently only one HP printer available, you do not need to specify a printer name at this time. Should we acquire Additional HP printers at a later date this option will be required. You must, however, specify either the -a (ASCII) or -ps (PostScript) option to designate your file type. The -t option is for printing transparencies
Syntax: xprint -dbing filename.ps
This will bring up a GUI interface, which will allow you to select paper size and media type.
To switch to Landscape mode, select Text File Options. You will be able to specify Portrait/Landscape modes and adjust margins.
To print in duplex mode, select the Output tab and change Simplex to Long-Edge Binding.
Once selections are made Click on the Print button.
dotex [options] filenamewhere filename is the TeX input file. A default file type is not assumed.
Following are the options available with the dotex command:
-x Preview file on X window device. -P printer Print file on specified device. -c n Print n copies of the file. -p n Start processing at specified page number. -l n Last page to be processed. -n n Maximum number of pages to process. -o filename Send output to the specified file. -d Print in duplex mode. -t Print in tumble duplex mode.To process a file through TeX and print the output file on the printer specified by the environment variable LASER, enter
dotex filenameTo process the file letter.tex, and print two double-sided copies on the laser printer peach, enter
dotex -c 2 -d -P peach letter.texTo print only the fifth and sixth pages of the file letter.tex on the printer specified by the environment variable LASER, enter
dotex -p 5 -n 2 letter.tex
To preview a TeX file, use the command:
dotex -x filenameAfter you exit the preview, by clicking the quit button on the screen, the script will ask whether you want to print the document.
Viewing TeX files containing PostScript figures requires the following procedure.
1. Enter tex filename. This produces a .dvi file. 2. Convert the .dvi file to PostScript by entering dvips filename.dvi -o filename.ps 3. You can now view the file (without PostScript figures) by entering xdvi filename.dvi and view the final document, including PostScript figures, by entering ghostview filename.ps
The division has two scanners available connected to IBM-compatible
pc's. This is a Hewlett Packard Scanjet IICX scanner located in cubicle
3068 and a Umax Astra 1200s in cubicle 2058. For more information on the
use of the scanner and its software, see Chapter
15. Instructions for using the scanner are located on the table
by the PC. Please enter an assist request
if you have additional questions.
Users may use divisional facilities such as the printers and copiers for personal use provided it does not impact NCAR related activities. There is a charge for personal use of these facilities and payment should be given to Kathy Morgan (Room 2005, ext. 8954). Inform Kathy which facility has been used so that the proper accounts can be credited.
Charges are as follows: Copier $.05/page Laser Printers $.05/page