|
UNIX Printing
All of the printers on the Network Printers list
are available on our UNIX servers. Most of our servers and workstations are running Solaris 2.5.1 and above. Although the lpr command is somewhat supported
on the Solaris machines, please use the "lp" command instead. The "lp" command
will allow for more functionality - printing duplex, etc.
For example, to print the file "testing" to the printer
hp7132mx:>
lp -d hp7132mx testing
If you are printing Postscript files, just send the job
like any other file. The spooler will detect the file type and
print the job without difficulty. For example to print the Postscript
file, joe.ps, just send the job via the lp command.
lp -d hp7132mx joe.ps
The most noticeable difference to users is that the BSD "lpr"
command uses "-P" to specify printer, whereas, the ATT-ish
"lp" command uses "-d" to specify the printer.
By default the department printers will print a banner page, with
the username and date at the top. If you wish to conserve paper and
suppress the printing of the page, use the
"-o nobanner" switch for the lp command. For example, to suppress
the printing of the banner page in the above issuance, proceed as
follows:
lp -o nobanner -d hp7132mx joe.ps
To print on both sides of the paper, i.e., in duplex, use the
"-o duplex" option to "lp". [only available on sprn2420,
sprn5880c, and hp7132mx]
lp -d hp7132mx -o duplex joe.ps
To suppress both the banner page and print in duplex:
lp -d hp7132mx -o duplex -o nobanner joe.ps
TeX printing:
To print dvi files, please use dvips. "lpr -d" is
scripted to route to dvips, but it is best to use dvips directly
Once you have the dvi file, you can print using dvips,
for example, to print the file joe.dvi to the printer hp7132mx,
issue the following command:
dvips -Php7132mx joe.dvi
To suppress the banner page and/or print in duplex,
use the "-f" option to dvips (this will dump postscript
to standard output and allow you to pipe it to the "lp" command:
dvips -f joe.dvi | lp -d hp7132mx -o duplex -o nobanner
Printing multiple pages on one side of a page
[available on any printer]:
To print 2 logical pages on one side of one physical sheet of paper,
use the "mpage" filter command
For example, to print the file joe.dvi with two pages on one side,
invoke as:
dvips -f joe.dvi | mpage -2 | lp -d printername
where printername is one of our department printers that
support double-sided (duplex) printing, such as, hp7132mx,
sprn5880c, etc. Recall, that with the lp command
"-d" refers to destination. To print 4 logical pages
on one physical sheet of paper, use "mpage -4", etc.
With the lp command "-d" refers to destination, "-o"
refers to option. On a Solaris 2.5.x (actually any 2.x) system
the actual print command is "lp", lpr is really only
a compatibility structure to allow BSD users to feel comfortable.
You can also combine this with the commands from step 1.
Suppose you wanted to print a large dvi file, two pages per side
on both sides.
dvips -f joe.dvi | mpage -2 | lp -d hp7132mx -o duplex
This can come in quite handy when reviewing large documents.
Please report any problems to mathhelp@math.ucsd.edu
or call x44591.
|