## 36.3 Understanding runfm command-line syntax

The syntax for runfm is as follows:

runfm [ -progid FrameMaker.M2G ]

[ -remote systemname ]

[ -book [ path\to\yourbook.book ] ]

[ -doc [ path\to\yourdoc.fm ] ]

[ -project "your Mif2Go project name" ]

[ -client OmniBookExport ]

[ -print ( book | doc ) [ path\to\printfile.prn ]

[ -reverse ( yes | no ) ] ]

| [ -pdf ( book | doc ) [ path\to\pdffile.pdf ] ]

[ -printer "name of printer to set via SetPrint" ]

[ -close ( book | doc | all ) ]

[ -diag ]

[ -log mif2go.log ]

Type the runfm command and options all on one line, at a command prompt. You can use either “/” or “-” as the switch indicator for runfm command-line options. If you specify no options at all, or if you specify -help (or /help) or -? (or /?), you get a message about usage, then runfm exits.

To use the -print, -printer, and -pdf options, you must have the SetPrint plug-in for FrameMaker installed. You can download SetPrint from Sundorne Communications:

http://www.sundorne.com/FrameMaker/Freeware/setPrint.htm

Table 36-1 describes runfm command-line options and their arguments; see §36.4 Using runfm for Mif2Go conversions for additional information.

Table 36-1 Command-line options for runfm

Option | Description | Ref.
-progid | Names whatever identifier you used when you set up FrameMaker (see Setting up FrameMaker for unattended operation); the default is FrameMaker.M2G;. | 36.4.1.1
-remote | Names a different system (in the same domain), where FrameMaker is to be run; the same user must be logged into, and FrameMaker must already be open on, the specified system. | 36.4.1.3
-book | Optionally specifies the full absolute path to a book to be converted, or to a book that contains a chapter specified by the -doc option (otherwise, the book currently active in FrameMaker); quote the path name if it contains any spaces. | 36.4.1.2
-doc | Optionally specifies the full absolute path to a document to be converted (otherwise, the document currently active in FrameMaker); quote the path name if it contains any spaces. | 36.4.1.2
-project | Names a Mif2Go project (not the name of a .prj file); this name must be listed in the .prj file for the specified book or document; quote the name if it contains any spaces. (For plug-ins other than Mif2Go, specifies the text the plug-in expects; see §36.8 Using runfm for other FrameMaker plug-ins.) | 36.4.2
-client | Specifies the ClientName of a FrameMaker plug-in to run; the default is OmniBookExport; you do not need this option for Mif2Go. | 36.8
-print | Optionally specifies the full absolute path to a file to which the active book (-print book) or document (-print doc) will be printed, using the printer specified by the -printer option or the default FrameMaker printer; quote the path name if it contains any spaces; cannot be used in the same run as -pdf.; requires SetPrint. | 36.4.3.1
-reverse | When used with -print, specifies the print order: -reverse yes causes output to be printed last sheet first -reverse no causes output to be printed first sheet first | 36.4.3.1
-pdf | Optionally specifies the full absolute path to a PDF file to which the active book (-print book) or document (-print doc) will be moved, after printing via Adobe PDF; quote the path name if it contains any spaces; cannot be used in the same run as -print; requires SetPrint. | 36.4.3.2
-printer | Names the printer to use when you specify the -print option; works only if you have installed SetPrint. | 36.4.3.3
-close | Causes FrameMaker (or just the book, or the just document) to close after the conversion: -close book closes the book file -close doc closes the active document -close all closes all open documents and FrameMaker. | 36.4.4
-diag | Causes runfm to write more diagnostic messages to the FrameMaker console window; intended primarily for Mif2Go developers. | 36.5.2
-log | Names a text file to which the contents of the FrameMaker console window are appended when you also specify a -close option; the default log file name is mif2go.log. | 36.5.2

| 36.2 Setting up FrameMaker for unattended operation |  | 36.4 Using runfm for Mif2Go conversions |