Accusoft.Forms1 - Updated
Component Management and Configuration
Forms API - User Guide > Concepts > Implementing a Forms Processing Application > Component Management and Configuration

The Forms API encapsulates creation and destruction of Accusoft's component objects in the Processor class. These component classes include SmartZone OCR, SmartZone ICR, ScanFix, FormFix, and optionally, Barcode Xpress. Use of Barcode Xpress may be conditionally compiled into the Forms API. (See Set Build Configurations and Preprocessor Directives.) The component class list may also include FormDirector, as noted below.

The Use of FormDirector

Calling code may pass the name of a form set file to one of the following:

More information about loading FormSets and FormDefinitions can be found in the Accusoft FormDirector SDK help file.

Lazy Loading of Components

The Processor class does not create all required component classes during initialization of a Processor object; instead, these objects are created lazily on a needs basis. The maximum number of component instances that can be created depends on whether the Processor was built to support multithreading or not.

Runtime Licensing

The licensing model used by each of the Accusoft components requires that each instance of a component be unlocked at runtime through one or more method calls, accepting a variety of numeric or string values. Since unlocking occurs for each instance of the component that is created, the Forms API provides classes for calling code to provide unlocks to a Processor. A LicenseKeychain must be passed to the constructor of each Processor object. The LicenseKeychain contains several properties that get ComponentLicense or LegacyComponentLicense objects; one property is exposed for each of the components that can be unlocked. The ComponentLicense and LegacyComponentLicense objects track if the unlock codes, keys, or strings have been set; unlocks for a particular component will not be used if they are in an unset state. When unlocks are unset and therefore the component instance is never unlocked, the component will end up running in evaluation or developer mode if the appropriate license is installed, otherwise the component may be unlicensed.

There are two classes to hold licenses:

Evaluation Licensing Behavior

All FormSuite components support setting the evaluation behavior through runtime method calls, however, the Forms API does not support setting the evaluation behavior at runtime. Instead, the API will automatically set all components to a timeout evaluation behavior. This permits use of the API in the maximum number of scenarios for evaluation usage. After 1 minute of processing images, the FormFix license will timeout and the Processor will begin to throw exceptions when calls are made to FormFix.

The source code can be edited to change the evaluation licensing behavior.

Debug Configuration

Debug configuration of components is specified through properties of the components. Like with runtime unlocks, the Forms API provides a class where the caller can specify a debug configuration to use for each component that is created.

The processor class has a property called DebugOptions that gets an object of type DebugOptions. The DebugOptions class exposes properties that get or set a value indicating whether debugging is enabled for all components, the debug log file that will be used for all components, and an ErrorLevel value that indicates the amount of information to write to the debug log for each component.

The ErrorLevel is set separately for each component and can be set to one of four different levels: