About Rule Files

Top  Previous  Next

Rule files are text files that contain descriptions of form enhancements. There can be any number of these enhancements, called rule sets, in a rule file. A header line composed of a unique name enclosed in square brackets indicates a new rule set. For example, an invoice form rule set would begin with the line "[Invoice]", followed by several lines indicating enhancements to the invoice output sent by the application. Without a rule set to work with, UnForm will not perform any enhancements. UnForm determines which rule set to work with based on either a command line option (-r), or detect commands contained in the rule set.

 

The enhancements that follow the [form-name] line are made up of commands and (usually) a list of parameters separated by commas. Commands instruct UnForm how to process the job. Here are some of the most commonly used commands:

 

detect

Used to detect which print stream is being handled by UnForm. For example, an invoice rule set might detect the word Invoice at a certain position.

cols

Scales output to fit a set number of columns.

rows

Scales output to fit a set number of rows.

text

Adds text to the output.

box

Adds a box or line to the output.

image

Adds an image to the output

barcode

Adds a barcode to the output

micr

Adds a MICR font line to the output

font

Changes the font of a region of input stream text.

 

 

UnForm includes many sample rule files, including simple.rul, advanced.rul, arcdemo.rul, and others, all found in the samples directory.