9.7;prf (print_file), revision 9.7, 87/08/07
PRF (PRINT_FILE) -- Queue a file for printing.
usage:
PRF pathname... [-INTER] [-SEA {ON|OFF}]
[-COP n]
[-PR name]
[-SITE entry_dir]
[-C|-NC]
[-D|-ND]
[-USER name]
[-SIG {ALARM|OFF}]
[-BAN [ON|OFF]]
[-CONFIG [pathname]|-NDB]
[-TEXT|-PLOT|-TRANSPARENT]
[-PAPER_SIZE {A|B|LEGAL|A3|A4|A5|B4|B5}]
---
[-NPAG]
[-MARGINS [ON|OFF]]
[-TOP n]
[-BOT n]
[-RIGHT n]
[-LEFT n]
[-HEADERS [ON|OFF]]
[-HEAD l-string/c-string/r-string]
[-FOOT l-string/c-string/r-string]
[-FTN [ON|OFF]]
[-WRAP [ON|OFF]]
---
[-PITCH n]
[-POINT n]
[-WEIGHT value]
[-LQ [ON|OFF]]
[-FONT A|B|C|D|E|G|H]
---
[-RES n]
[-WHITE n]
[-BW [ON|OFF]]
[-MAGN {-1..16}]
---
[-POST [ON|OFF]]
[-LPI n]
[-COL {1|2}]
[-ORIENT {PORT|LAND}]
---
{CL}
FORMAT
PRF [pathname...] [options]
PRF queues a file for printing. The file must be an ASCII stream (i.e., text)
file, a graphics metafile (GMF), or a GPR bitmap object. After successfully
queueing 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 below.
Files queued by PRF are physically printed using PRSVR (PRINT_SERVER).
When you invoke PRF, it first sets all options to their default states (as
described below). Next, it looks for a PRF configuration file called
~USER_DATA/PRF.DB unless you have invoked PRF with the -NDB option (described
below). If PRF locates a configuration file, it executes the options
contained in the file to configure the current session. Finally, it proceeds
to process any options on the command line or in the interactive session.
A menu-based version of the PRF command is also available. Type HELP PRFD for
more information.
ARGUMENTS
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 may appear on the Shell command line or in PRF
interactive mode as noted below. In addition, you may place one or more
options in a configuration file (see -CONFIG). In that case, create the file
with one option per line without the prefixed hyphens (-). See Example 3
below.
Many options described below have default values that are "specified in the
PRSVR configuration file." This is a file established by your System
Administrator for each printer in the network. If you omit one of these
options, your file will be printed using the value found in that configuration
file. For example, omission of the -BANNER option may cause your file to be
printed with a banner page, or without it, depending on the default
established for the printer in question by its configuration file. For
complete details about the contents of the print server configuration file,
including default settings, see HELP PRSVR CONFIG .
If no options are specified, the file(s) are printed using ASCII carriage
control, with pagination enabled, on the default printer (as established by
PRSVR).
The following options apply to all file types.
-INTER[ACTIVE]
Enter interactive mode.
-SEA[RCH_DIR] {ON|OFF}
Search 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. This option is
OFF by default.
-COP[IES] n Print multiple copies of the file, where 'n' is the
requested number of copies. If -COP[IES] is specified, 'n'
is required. If this option is omitted, one copy is
printed by default.
-PR[INTER] name
Specify the printer 'name' for printing 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.
-S[ITE] entry_dir
Specify print queue (/SYS/PRINT) on alternate node by
giving that node's entry directory name. This option allows
you to maintain more than one printer queue directory. You
may want to maintain separate queues for different
organizations, or you may want two queues to provide
redundancy in case of node failure.
-C[OPY] (D) Place a copy of the print file in the /SYS/PRINT/SPOOLER
directory.
-NC[OPY] Do not copy the print file into the /SYS/PRINT/SPOOLER
directory. In this case, the print server uses the file
itself rather than a duplicate. This option is only
available with print servers running under SR9.5. If this
option is specified, then -ND becomes default, and the file
is NOT deleted unless -D is explicitly specified as well.
-D[ELETE] (D) Specify that the print file is deleted when the print
server is finished printing it.
-ND[ELETE] Do not delete the print file when the print server is
finished printing it. This becomes default if -NC is
specified.
-USER[_NAME] name
Specify user name that will appear 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 login name (unless you don't care about sending
an alarm). If this option is omitted, the current login
name is used.
-SIG[NAL] {ALARM|OFF}
Request an alarm server signal when the file has finished
printing. The default is OFF.
-BAN[NER] [ON|OFF]
Enable/disable banner page. The default is specified in
the PRSVR configuration file. If neither ON nor OFF is
specified, ON is assumed.
-CONFIG[_FILE] [pathname]
Specify 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 will execute the configuration file ~USER_DATA/PRF.DB.
-NDB Suppress processing of the configuration file.
-TEXT Specify text mode for printing ASCII files. This is the
default print mode.
-PLOT Specify plot mode. Include this option to print bitmap
files created by a graphics metafile (GMF) manager or GPR,
or the CPSCR (COPY_SCREEN) command.
-TRANSPARENT Specify that when the file is printed, the records of the
file are to be passed directly to the printer driver
routine with no processing by the print server.
-PAPER_SIZE {A|B|LEGAL|A3|A4|A5|B4|B5}
Select 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 only available for the DOMAIN/LASER26 and
APPLE LASERWRITER printers. PRF assumes that the correct
size of paper is in the printer's paper tray. Therefore,
you must check the paper tray before printing. The default
paper size is specified in the PRSVR configuration file.
The following options apply to text files only.
-NPAG Disable the headers and margins generated by PRF.
-MARGINS [ON|OFF]
Enable/disable margins generated by PRF. If this option is
specified without ON nor OFF, ON is assumed. The default
is 'ON'.
-TOP n Specify page top margin, in inches. The default is a value
specified in the PRSVR configuration file.
-BOT[TOM] n Specify page bottom margin, in inches. The default is a
value specified in the PRSVR configuration file.
-RIGHT n Specify page right margin, in inches. The default is 0
inches.
-LEFT n Specify page left margin, in inches. The default is 0
inches.
-HEADERS [ON|OFF]
Enable/disable page headers and footers generated by PRF.
If this option is specified without ON nor OFF, ON is
assumed. The default is specified in the PRSVR
configuration file.
-HEAD[_STRING] l-string/c-string/r-string
Specify contents of left, center, and right components of
the page header generated by PRF. Components may be empty
strings. The following special characters return the
values indicated when they appear in the header strings.
@ = escape character
# = current page number with 1 leading and
1 trailing space
% = current date
! = filename
& = filename's last time,date modified
* = insert a space in text string (literal spaces
are not allowed)
Example: -HEAD !/Page#/% will produce 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
Specify contents of page footers. The format is the same
as for -HEAD above. There is no default footer.
-FTN [ON|OFF]
Enable/disable 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 will cause 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 nor OFF,
ON is assumed. The default is 'OFF'.
-WRAP [ON|OFF]
Enable/disable automatic line wrapping. When enabled, PRF
will wrap any lines that exceed the right margin onto the
next line. When disabled, PRF truncates lines that exceed
the right margin. If this option is specified without ON
nor OFF, ON is assumed. The default is 'OFF'.
The following options are for use with printers supporting variable font and
pitch sizes.
-PITCH n Set the pitch (characters/inch) at which you wish the
document to be printed. The following pitch settings are
available on the printers indicated.
Printronix 10
Spinwriter 12
Imagen 8.5, 10, 12, 15, 17.1
GE 10, 12, 13.1, 16.7
Versatec 12
LaserWriter 1 to 100
Laser26 1 to 100
-POINT n Set the point size for the font to be used. This is a real
number in units of a point which is 1/72 inch.
-WEIGHT value
Set the weight of the font to be used. This option is only
valid for the GE printer type. Possible values are
'light', 'medium', and 'bold'. The default is 'medium'.
-LQ [ON|OFF] Specify that the document is to be printed in 'letter
quality' (ON) or in 'draft' (OFF) mode. This option is
only valid for the GE printer type. If this option is
specified without ON nor OFF, ON is assumed. The default
is 'OFF'.
-FONT [A|B|C|D|E|G|H]
Supports one of the character sets specified in the Domain
keyboard manual (#10416). The value a,b,c,d,e, or g is
used to specify the national character set as outlined in
the above manual. In addition, you must specify h to
switch back to the standard charcter set (This is useful if
you run prf in interactive mode). You can also add "font
x" to your prf.db startup file .
The default is h, the standard character set.
The following options apply to plot files.
-RES[OLUTION] n
Specify resolution of output plot in dots per inch. If you
specify a resolution not available on the particular
printer, the file is printed at the closest available
resolution. The default resolution is specified in the
PRSVR configuration file.
-WHITE[_SPACE] n
Specify amount of white space (in inches) to appear between
multiple plots in one file. The default is three inches.
-BW[_REV] [ON|OFF]
Enable/disable black and white reversal for bitmaps. If
this option is specified without ON nor OFF, ON is assumed.
The default is 'OFF'.
-MAGN[IFICATION] n
Specify bitmap magnification value. 'n' is an integer in
the range -1 to 16.
-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 magnification by that amount.
Portions of the magnified bitmap that
exceed the printer page boundaries are
clipped.
The default is 0.
The following options apply only for files sent to printers that contain the
PostScript interpreter, such as the DOMAIN/LASER26 and APPLE LASERWRITER
printers.
-POST[SCRIPT] [ON|OFF]
Enable/disable PostScript interpretation. When enabled,
the data is passed through the PostScript interpreter.
When disabled, the data is printed as text, plot, or
transparent data. If this option is specified without ON
nor OFF, ON is assumed. The default is 'OFF'.
-COL[UMNS] {1|2}
Specify single or double column printing. The default
state is single column.
-LPI n Specify the line spacing factor. 'n' is an integer
indicating the number of lines per inch. The default state
is six lines per inch.
-ORIENT[ATION] {PORT[RAIT]|LAND[SCAPE]}
Select 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 state is PORTRAIT.
This command uses the command line parser, and so also accepts the standard
command options listed in HELP CL.
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] pathname 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 have finished entering Shell commands, type
CTRL/Z. This will return 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.
R[EAD] [printer] List entries in the queue for the specified printer at the
current site (as specified by -S). If 'printer' is
omitted, then the contents of the queue (determined by the
current setting of -PR) are listed.
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.
CAN[CEL] [queued_filename]
Cancel printing of the specified file at the current site
(as specified by -S). Note that you must specify the
pathname which PRF assigns when the file is queued (which
may differ from the name of your original file). Use the
READ command to display the names of currently queued
files. If the filename is omitted, the last file to be
queued by this process is cancelled. This command is only
effective for files which have not yet physically begun to
print.
EXAMPLES
1. $ prf mary -npag -ftn Queue "mary"; suppress
"//NODE1/MY_DIR/MARY" queued for printing. pagination; force
$ FORTRAN carriage
2. $ prf filex -s //tape
"//NODE1/MY_DIR/TEST_FILE.PAS" queued for printing at site //TAPE.
$ Queue "filex" to the
printer queue on the
node called //tape.
3. Configuration File: the following commands might appear in the default
PRF configuration file ~USER_DATA/PRF.DB.
PR ge
SITE //rye
FOOT %/my_file/&
4. 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
$
5. Running PRF from an icon:
If you would like to run PRF interactively in a process devoted to it,
you might place the following command in your ~USER_DATA/STARTUP_DM
file:
cp -i -c 'P' /com/prf -inter -n print_file
This will create a PRF process and turn 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.
RELATED TOPICS
More information is available. Type:
- HELP PRFD
for information on the menu-based version of this command.
- HELP PRINTER
for general information about printers supported in a DOMAIN 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.