10.3;prf (print_file), revision 3.0, 90/05/30
prf (print_file) - queue a file for printing.
usage: prf pathname... [-dia] [-inter] [-sea {on|off}]
[-cop n]
[-pr name]
[-spool[_node] entry_dir]
[-c|-nc]
[-d|-nd]
[-user username]
[-sig {alarm|off}]
[-ban [on|off]]
[-config [pathname]|-ndb]
[-trans [on|off]]
[-filter string]
[-paper_size {a|b|legal|a3|a4|a5|b4|b5}]
[-orient {port|land}]
---
[-margins [on|off]]
[-top n]
[-bot n]
[-right n]
[-left n]
[-headers [on|off]]
[-npag]
[-head l-string/c-string/r-string]
[-foot l-string/c-string/r-string]
[-ftn [on|off]]
[-wrap [on|off]]
[-col {1|2}]
[-lpi n]
---
[-pitch n]
[-point n]
[-weight value]
[-lq [on|off]]
---
[-res n]
[-white n]
[-bw [on|off]]
[-magn {-1..16}]
---
[-check [-pr name]]
[-list_pr [print_manager_name]]
[-list_site ]
[-list_printers ] [-sig_printer name sig]
[-pre10]
[-read [printer]]
[-pr printer -can job_id]
DESCRIPTION
The prf command queues a file for printing. After successfully queuing a
file, prf displays a message containing the full pathname of the file
that you queued.
You can execute prf once for each file that you want to print (specifying
all the necessary options every time), or you can enter prf's interactive
mode and hand files to the program continuously. See the examples for a
sample interactive session.
Files queued by prf are physically printed by prsvr, the print server,
running as a background task under control of prmgr, the print manager.
When you invoke prf, it first sets all options to their default states.
Next, it looks for the print options file called user_data/startup.prf
unless you invoke prf with the -ndb option. If prf locates the option
file, it executes the options contained in the file to configure the
current session. Finally, it processes all options on the command line.
pathname (optional)
Specify the file to be printed. Multiple pathnames and
pathname wildcarding are permitted.
Default if omitted: read standard input
OPTIONS
The following options can appear on the shell command line or in prf
interactive mode. In addition, you can place one or more options in a prf
option file so that they are executed automatically whenever you invoke
prf.
Many of the options have default values that are specified in the prsvr
configuration file established for each printer in the network by the
system administrator. If you omit these options, your file is printed
using the values specified in the prsvr configuration file. For example,
omission of the -banner option could cause your file to be printed with a
banner page if the prsvr configuration file specifies one.
Not all options apply to all printers. Refer to Appendix A of Printing in
the Aegis Environment for a printer option matrix.
Options Applying to All File Types
-dia[logue] Invokes the menu-based version of the prf command. This
interactive version runs a graphics interface inside the
process window in which prf -dia was invoked. You control
the operation of prf -dia by pointing the cursor at a
desired menu item and pressing M1 (if you have a mouse) or
F1 or the space bar if you do not have a mouse. Internal
help is available by pointing at a menu item and pressing
the M3 (if you have a mouse) or the <HELP> key R6S if you
do not have a mouse.
prf -dia requires no arguments or options on the shell
command line. To exit prf -dia and return to the shell,
select the "quit" menu item.
prf -dia performs exactly the same functions as the
command-line based prf.
-inter[active] Enter interactive mode.
-sea[rch_dir] [on|off]
Searches through all the directories of all the active
processes on your node for the file(s) to be printed. This
option is most useful in interactive mode, when the
working directory of the prf process may be different from
the working directory of the file to be printed. If this
option is specified without on or off, on is assumed.
If the option is not specified, the default is off.
-cop[ies] n Prints multiple copies of the file, where n is the
requested number of copies. If -cop[ies] is specified, n
is required. The default is one copy.
-pr[inter]name Specifies the name of the printer that should print the
file. This option is useful only if more than one printer
is in use on the network, or if a printer has been
assigned a nonstandard name with the printer_name
configuration directive in the prsvr command. If you omit
this option, prf uses the default printer name, p. Note
that p is also the default printer name used by the print
server.
-spool[_node] spool_node_name
Use this option only if you are queuing jobs to a pre-SR10
print server connected to a spool directory (/sys/print)
that is different from the one specified by your node. By
default, SR10 printers find the spool node for you.
-nc[opy] Prints the specified file from its location in the user-
specified directory, bypassing /sys/print/spooler. If you
select this option, prf defaults to the no-delete (-nd)
option. If you specify the delete (-d) option, the file is
deleted at the completion of the print request. If you use
this option (with or without the delete option), do not
open and alter the print file before the print job is
completed.
-d[elete] (default)
Deletes the print file at the completion of the print job.
-nd[elete] Does not delete the print file when the print server is
finished printing it. This becomes default if -nc is
specified.
-user[username]
Specifies the user name that appears on the banner page of
the printed file. The alarm facility of prf also uses this
name to determine who should be notified when printing is
complete (see -sig below). This means that this name must
be a valid log-in name (unless you don't care about
sending an alarm).
The default is the current log-in name.
-sig[nal] {alarm|off}
Requests an alarm server signal when the file has finished
printing.
The default is off.
-ban[ner] [on|off]
Enables/disables banner page. If this option is specified
without on or off, on is assumed. However, if the banner
setting in the prsvr configuration file is off, no banner
is printed.
If the option is not specified, the default is on.
-config[_file] [pathname]
Specifies a file containing further prf options, one per
line. Do not use prefixed hyphens (-) with the option
names in the configuration file. If pathname is omitted,
prf executes the prf option file ~/user_data/startup.prf.
-ndb Suppresses processing of the prf option file.
-trans[parent] [on|off]
Specifies that the file being printed is passed directly
to the printer driver routine with no processing by the
print server.
If this option is specified without on or off, on is
assumed. If the option is not specified, the default is
off.
-filter string Specifies a filter string that will be used by the print
server to process the job. This option overrides the
default processing done by the print server. It is most
often used to invoke filters that have been added to the
print server. The format of the string is "filter1 :
filter2", where filter1 and filter2 are composed of
strings of the form "type1$type2" and "type2$type3". Note
that the output type of filter n must equal the input type
of filter n+1 .
-paper_size {a|b|legal|a3|a4|a5|b4|b5}
Selects the paper size. You must specify one of the
following size codes:
Code Size in inches (mm)
a 8.50 x 11.00
b 11.00 x 17.00
legal 8.50 x 14.00
a3 11.69 x 16.54 (297mm x 420mm)
a4 8.27 x 11.69 (210mm x 297mm)
a5 5.38 x 8.27 (137mm x 210mm)
b4 9.84 x 13.90 (257mm x 364mm)
b5 5.93 x 9.89 (182mm x 257mm)
This option is available only for printers that have
multiple print trays. Because prf assumes that the
correct paper is in the printer's paper tray, you should
check the paper tray before printing. The default paper
size is specified in the prsvr configuration file.
-orient[ation] {port[rait]|land[scape]}
Selects the page orientation. portrait specifies that the
text or x-axis of the bitmap is printed parallel to the
short edge of the paper. landscape specifies that the text
or x-axis of the bitmap is printed parallel to the long
edge of the paper and perpendicular to the short leading
edge.
The default is portrait.
Options Applying to Text Files Only
-margins [on|off]
Enables/disables margins. If this option is specified
without on or off, on is assumed.
If the option is not specified, the default is on.
-top n Specifies top page margin, in inches. The default is a
value specified in the prsvr configuration file.
-bot[tom] n Specifies bottom page margin, in inches. The default is a
value specified in the prsvr configuration file.
-right n Specifies right margin, in inches. The default is 0
inches.
-left n Specifies left margin, in inches. The default is 0 inches.
-headers [on|off]
Enables/disables page headers and footers. If this option
is specified without on or off, on is assumed.
If the option is not specified, the default is off.
-npag Equivalent of stating: -headers off -margins off
-head[_string] l-string/c-string/r-string
Specifies contents of left, center, and right components
of the page header generated by prf. Components can be
empty strings. The following special characters return the
values indicated when they appear in the header strings:
Character Return Value
@ Escape character
# Current Page number
% Current date
! Filename
& Filename's last time, date modified
Example: -head !/Page#/% produces a header with the
filename in the left component, the string "Page" followed
by the current page number in the center component, and
the current date in the right component. The default
header is a string specified in the prsvr configuration
file.
-foot[_string] l-string/c-string/r-string
Specifies contents of page footers. The format is the same
as for -head above.
-ftn [on|off] Enables/disables FORTRAN carriage control. -ftn on causes
the print server to use FORTRAN forms control even if the
file does not have the FORTRAN carriage-control flag. Use
of this option causes prf to interpret the first character
of each line as a FORTRAN carriage control character (and
not print it). This can be unfortunate if the file has
ASCII carriage control, so be careful. -ftn off causes the
print server to print the contents of column one rather
than trying to interpret it as FORTRAN forms control. If
this option is specified without on or off, on is assumed.
If the option is not specified, the default is off.
-wrap [on|off] Enables/disables automatic line wrapping. When enabled,
prf wraps lines that exceed the right margin. When
disabled, prf truncates lines that exceed the right
margin. If this option is specified without on or off, on
is assumed.
If the option is not specified, the default is off.
-col[umns] {1|2}
Specifies single-or double-column printing.
The default state is single column.
-lpi n Specifies the line-spacing factor. n is an integer
indicating the number of lines per inch.
The default value is dependant on the point size of the
font.
Options for Variable Font and Pitch
-pitch n Sets the printer pitch (characters/inch).
-point n Sets the point size for the font to be used. This is a
real number that specifies size in points. A point equals
1/72 inch.
-weight {light|medium|bold}
Sets the weight of the font to be used.
The default is medium.
-lq [on|off] Specifies that the document is to be printed in letter
quality (on) or in draft (off) mode. If this option is
specified without on or off, on is assumed.
If the option is not specified, the default is off (draft
mode).
Options Applying to Plot Files
-res[olution] n
Specifies output plot resolution in dots per inch. If you
specify a resolution not available on the particular
printer, prsvr prints the file at the closest available
resolution.
The default resolution is specified in the prsvr
configuration file.
-white[_space] n
Specifies the amount of white space (in inches) to appear
between multiple plots in one file.
The default is three inches.
-bw[_rev] [on|off]
Enables/disables black and white reversal for bitmaps. If
this option is specified without on or off, on is assumed.
If the option is not specified, the default is off.
-magn[ification] n
Specifies bitmap magnification value. n is an integer in
the range -1 to 16. The values have the following
meanings:
-1 Selects auto-scaling to magnify the bitmap to fill
the available page space.
0 Selects one-to-one scaling between the display and
the printer for GMF bitmaps. (For GPR bitmaps, this
translates to magnification 1.)
1-16 Selects the magnification indicated by value. Where
1 equals 1-to-1, 2 equals 2x, etc.
Default if omitted: n is 0
Information Request Options
-check [-pr printer_name]
Checks for the existence of the specified printer. If the
printer does not exist or is unavailable, an error message
is returned.
-list_pr[inters] [print_manager_name]
Lists the names and status of all printers currently
attached to the network or to the specified print manager.
-list_s[ites] Lists the names of all print managers currently in the
network.
-sig_pr[inter] printer_name {-abort|-sus[pend]|cont[inue]|check}
Signals the printer to abort, suspend, or continue an
active print job. check tests for the existence of an
active print server and forces the server to re-register
with the print manager. If the print server does not
exist or is unavailable, an error message is returned.
-pre10 Allows you to queue print requests to a pre-SR10 print
server.
-r[ead] [printer]
List queue entries for the specified printer. If printer
is omitted, the contents of the queue (determined by the
current setting of -pr) are listed.
-pr [printer] -can[cel] job_id
Cancel printing of the specified file. job_id is the job
ID assigned by prmgr when the file is queued. Use the
read command to display the names and job IDs of currently
queued files. This command affects jobs in the print
queue; it does not cancel a job being printed. To halt a
job being printed, use -sig_pr with abort specified.
COMMANDS
Once prf has been invoked in interactive mode (see -inter above), it
accepts the following interactive commands at the "prf> " prompt (in
addition to the options already discussed).
p[rint] [print_file_pathname] [options]
Queue the specified file for printing.
q[uit] Quit interactive mode and return to the shell.
sh[ell] Create a shell command line. This command allows you to
issue shell commands without leaving prf interactive mode.
When you finish entering shell commands, type CTRL/Z. This
returns you to prf interactive mode. Your previous prf
option settings remain undisturbed by the intervening
shell commands.
init[ialize] Reset prf parameters to their default values.
wd [pathname] Execute the shell command wd (working_directory) to set or
display the working directory.
get option Display the value of the prf option specified. Use this
command to show the settings of the various prf
parameters.
EXAMPLES
The following example, queues the file named mary for printing and forces
FORTRAN carriage returns:
$ prf mary -ftn -pr my_printer
"//node1/my_dir/mary" queued to printer my_printer.
$
This example shows the types of commands that might appear in the default
prf configuration file ~/user_data/startup.prf:
pr ge
foot %/my_file/&
sig alarm
left 0.25
The following example shows a sample interactive session:
$ prf -inter
prf> get pr
pr = p
prf> -pr cx
prf> get pr
pr = cx
prf> -pitch 20
prf> print test_file.pas
"//node1/my_dir/test_file.pas" queued for printing.
prf> q
$
To run prf interactively in a process devoted to it, insert the following
command in the start-up file that you use to start the DM:
cp -i -c 'P' /com/prf -inter -n print_file
The above command creates a prf process and turns its window into an icon
using the print icon character in (/sys/dm/fonts/icons). Issue the DM
command icon to change the icon window into its full-size format.
SEE ALSO
More information is available. Type
help printer For general information about printers supported in a
Domain/OS network
help prsvr For details about the print server
help prsvr/config
For an explanation of the prsvr configuration file and its
directives, including their default values
help prmgr For details about the print manager