Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ prf — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

PRFD

PRINTER

PRSVR

9.04;prf (print_file), revision 9.04, 85/05/30
PRF (PRINT_FILE) -- Queue a file for printing.
usage:  PRF pathname... [-INTER] [-COP n] [-PR name] [-SITE entry_dir]
                                        [-USER name] [-SIG ALARM|OFF]
                                        [-BAN [ON|OFF]]
                                        [-CONFIG [pathname]|-NDB]
                                        [-TEXT|-PLOT|-TRANSPARENT] [-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]] [-RES n] [-WHITE n]
                                        [-BW [ON|OFF]] [-MAGN {-1..16}] {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 prepended hyphens (-).    See  Example  3
  below.

  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.

  -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.

  -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 prepended 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.

  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.   The  default  is
                     'ON'.  If neither ON nor OFF is specified, ON is assumed.

  -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.
                     The  default  is specified in the PRSVR configuration file.
                     If neither ON nor OFF is specified, ON is assumed.

  -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]
                     Force  use  of  FORTRAN  carriage control.  The -FTN option
                     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.  If
                     neither ON nor OFF  is  specified,  ON  is  assumed.    The
                     default state 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 neither ON nor OFF is specified, ON
                     is assumed.

  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

  -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) as opposed  to  'draft'  (OFF)  mode.    This
                     option  is  only valid for the GE printer type.  If neither
                     ON nor OFF is specified, ON is assumed.  The default  state
                     is OFF.

  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
                     neither ON nor OFF  is  specified,  ON  is  assumed.    The
                     default state 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.

  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] [queuedfilename]
                      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.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026