SGI Techpubs Library

The new home for SGI documentation is the SGI Customer Portal, This site will be redirected to the new location later this month.

IRIX 6.5  »  Man Pages
find in page



     routeprint, fileconvert - convert file to printer or to specified


     routeprint [-c filetypeDatabasePath ] [-g]  [ [-p printer] | [-d
     destination-type] ] [-t source-type] files


     routeprint is a utility  accessible from the IRIX command line to request
     a Bourne Shell command line which will convert the given file to the
     requested format.  routeprint may also be used to convert files of
     various types to print on one of a set of desired printers. routeprint
     uses file types specified on the command line to look up print conversion
     rules for each file to be printed. The conversion rules are located in
     compiled .otr files in /usr/lib/filetype.  The older ftr(1) database
     format, .ctr files are not supported anymore.  The source .ftr files can
     be found in the local, install, system, and default subdirectories under
     /usr/lib/filetype.  If no file types are specified on the command line,
     routeprint looks up the appropriate type for each file.  routeprint uses
     the print conversion rules to process the files into the form requested
     or a form printable by the target printer.

     printer is the name of a printer to which the output may be sent.

     destination-type is the name of a destination filetype to which the
     output should be converted.

     source-type is a file-type name.

     files is one or more file names, separated by spaces.

     -g      The -g option should be used when routeprint is defined as part
             of a file typing rule.  This option puts error messages in a
             notifier window (instead of sending them to stdout) and
             suppresses warnings.

     -c      filetypeDatabasePath The -c option allows users to specify an
             alternate file typing rules database, .otr file to use.  This
             option should be used to override the default FTR database search
             path, which is /usr/lib/filetype/desktop.otr. In older versions,
             routeprint used to also search in the user's HOME directory,
             before looking under, /usr/lib/filetype directory. This is not
             supported anymore, but the users can still give their own FTR
             database using the -c flag.  Also, note that the old FTR database
             file format, .ctr, is not supported anymore, it is replaced by
             the new .otr file format.  By default, if an invalid database is
             given, routeprint automatically rejects that database, and loads
             the default desktop.otr database.

     -d      destination-type is specified as the target filetype for the
             conversion. Routeprint will determine whether a conversion path
             exists between the input file's type and the specified
             destination-type. If no conversion path exists, routeprint will
             return an exit code other than 0 and an empty string.  If a
             conversion path exists, routeprint will return an exit code of 0
             and a string representing the commands necessary to execute in
             order to convert the file from the source type to the destination
             type.  This string may in turn be executed as a Bourne Shell
             program or as the argument to system to produce the destination
             filetype on stdout.

     The -p and -d options are mutually exclusive, and the -d option may
     appear only once on the command line.  The -p or -t options may appear
     multiple times on the command line, and are used in the following way:

     -p      printer is added to the collection of printers on which the
             output may appear.  Each instance of the -p option on the command
             line adds one printer to this collection.  If more than one
             printer is specified, routeprint uses the print conversion rules
             to determine the best printer to use.  If no printer names are
             given via the -p flag, the destination printer is the system
             default printer.  Using the -p option overrules the system
             default printer.

     -t      source-type sets the filetype for the files that follow it on the
             command line until another type is specified.  If no type is
             given via the -t flag, or files appear on the command line before
             the first -t, the files are typed by routeprint. routeprint
             examines all of the specified files' types.  If they are
             identical, a single print job will be initiated.  If the types
             are varied, routeprint generates an error message.

     The system default printer is the printer or printer class on which a
     print job appears if no printer is specified with the -p option. The
     system default printer is normally specified using the Printer Manager in
     the System menu on the toolchest(1).


     A typical call from the command line might look like the following:

          routeprint -p myprinter file1 file2 file3

     A typical call requesting a file conversion command line might look like
     the following:

          routeprint -d PostScriptFile file1


     The ordering of files specified on routeprint's command line determines
     the ordering of files within the resultant print job.


     The .ftr file used by routeprint contains both file type rules and print
     conversion rules.

     The following is a typical set of print conversion rules:

          CONVERT TroffFile PostScriptFile
              COST 50
              FILTER psroff -t $file

          CONVERT PostScriptFile myLaserPrinterType
              COST 50
              FILTER lp -d $CURRENTPRINTER

     The CONVERT item specifies the file type of the input file followed by
     the file type of the converted file.

     The COST item specifies an arbitrary number between 0 and 1000
     (inclusive) that represents the image degradation and processing cost
     inherent in the conversion.  The higher the COST value, the more
     routeprint will try to avoid printing by that specific conversion method,
     if it is given a choice.

     The conventions for determining what COST to assign a given conversion
     are as follows:

          COST REASON
          0    Equivalent filetypes, or a SETVAR rule.
          50   Default conversion cost.
          125  Trivial data loss, or conversion is expensive.
          200  Minor data loss AND conversion is not expensive.
          300  Noticeable data loss AND conversion is expensive.
          500  Obvious data loss.  (E.g., Color to Monochrome.)

     The FILTER item contains the shell command that performs the conversion.

     Given the conversion rules above, the command:

            routeprint -p myLaserPrinterType -t TroffFile myfile.troff

     would cause the file mytroff.t to be printed on the printer named
     ``mylaserprinter'' via the psroff and lp commands.  Note that more than
     one conversion rule may be used to actually get the files into a
     printable form.




     The maximum length of strings returned are currently harcoded.  The
     command string returned by routeprint cannot exceed 4096 characters,
     including terminating NULL, or routeprint's behavior will be undefined.

     routeprint does not currently support the use of multiple filetypes.


     IRIX Interactive Desktop Integration Guide , routeprint(1), ftr(1), sh(1)

Home    •     What's New    •     Help    •     Terms of Use    •     Privacy Policy    •

© 2009 - 2015 Silicon Graphics International Corp. All Rights Reserved.