To print multiple pages on one piece of paper on a unix
system, the mpage command is used.
The Basic Command
An example of the basic use of this command is:
mpage -2 filename.txt
This example would print the contents of the file
filename.txt, reduced in size so that two pages fit on
each sheet of paper, on your default printer.
You can use -2, -4, or
-8 to print a different number of pages per sheet of
paper.
Printing multiple files on one piece of paper
The mpage command will accept more than one
filename on the command line, and print all of them. However,
by default, it will print each file on a separate sheet of
paper. If you want multiple files printed on one sheet of
paper, use the concatenation option. An example of this is:
mpage -4 -c filename1.txt filename2.txt
This example would print all the pages of
filename1.txt, followed immediately by all the pages
of filename2.txt, reduced in such a way that 4
pages would fit on one piece of paper. If
filename1.txt were 1 page long, and
filename2.txt were 2 pages long, one sheet of paper
would be output, containing 3 pages and one blank rectangle.
Printing a postscript file
If you give mpage the filename of a postscript
file, it may not work. The symptom is that no output will
appear on the printer, and you'll receive an e-mail message
explaining that there was an error printing the document.
If this happens, force mpage to interpret the
file as a postscript file. To do this, use the following
command:
mpage -4 -dp filename.ps
This would print the file filename.ps 4 pages
per sheet of paper.
Setting the default printer
The mpage command will print using your default
print command. To change the default print command
temporarily, the syntax is:
setenv PRINT "<print command>"
An example of an appropriate print command is:
qpr -q pg2
This command would print in the PG2 WAM lab. The whole
command to reset the default print command to print in PG2
is:
setenv PRINT "qpr -q pg2"
If you always, or almost always, print to the same printer,
you might prefer to reset the default printer permanently. To
do this on WAM or GLUE, edit your .environment
file. Add the following line at the bottom:
setenv PRINTER <printername>
Consult the our print queue web page for a list of
printer queues in public computer labs.
On WAM or GLUE, the value of the PRINT environment variable
is automatically set on login, based on the value of the
PRINTER environment variable. Therefore, you only need to
change the value of the PRINT environment variable in your
.environment file.
You can determine what the values of the PRINT and PRINTER
environment variables are with the following commands:
echo $PRINT
echo $PRINTER
|