Options and configuration

The img2afp behavior is controlled by the internal defaults, configuration files, and command line options in the order of increasing priority. The internal defaults are loaded first. The command line is then parsed for the -C options, indicating configuration file names. The configuration files are processed in turn. Finally, the remaining command line options are processed. If an option is specified multiple times, later specifications override earlier specifications. The -rot option is an exception to this rule; it is cumulative.

The configuration file syntax is attribute = value. A '#' indicates a comment to the end of the line. The attribute names are the same as the command line options, so “-option value” becomes “option = value” in the configuration file. For options that do not take values, “yes” must be used in the configuration file. The case of the option is significant, but the case of the value is not, unless the value is a filename. An example of a configuration file follows:

#sample configuration file
v = yes # equivalent to -v
a = fs10 # bilevel output

All options except -C can appear in a configuration file. Spaces between the option and value on the command line and around the equal sign are optional, so “-afs10”, “-a fs10”, “-a=fs10”, and “a = fs10” are all valid.