file command (with additional
magic) to determine what type a file is.
Then it checks a database to find the right print command for this type (e.g.
dvi files are printed using dvips)
[here is the currently used prncap database].
Print can print a wide variety of files, including text,
PostScript, DVI files, TeX files (experimental)
and some graphics formats. Others can be added on request.
If print cannot determine the file type, it will ask whether it
is OK to print it as text. If no user input is possible (e.g. printing from
standard input) it will try to print text anyway (with a short delay, allowing
you to press Control-C to abort it.
Print recognizes the -Pprinter command and the
$PRINTER environment variable. Note that there is no space
between -P and the printer name. Also note that this also works
for printing commands which themselves do not support the -P
option (as long as they send output to $PRINTER
or $LPDEST).
The print command has an option -verbose that
will cause it to output some more text about what it is trying, e.g.
a trace through the prncap entries.
There is also a -debug option, that will cause the command
to echo the commands it would normally execute. In this case, no actual
printing will take place.
For some file types (especially text), the options -landscape
and -portrait are supported. Both these options produce
a single-column output for text (so essentially, -landscape
could have been called -wide or so, but it isn't).
It is possible to specify the type of a file using the -type
option (e.g. -type ascii or -type text).
Abbreviations -txt (equals -type text) and
-ps (equals -type ps) are also available
All other options are passed on to the program that does the actual printing.
For text files, print invokes a2ps by default,
so that manual page will provide more information.