IFlexiCaptureTools

What it does

The IFlexiCaptureTools interface is implemented with a FCTools global object which is available in scripts. All methods of the FCTools global object can be called as static methods, for example:

FCTools.ShowMessage( "Test" );

Note. Some methods and properties of this object are not available on the Web Verification Station for checking rules locally. The methods and properties that are not supported are marked with an asterisk (*).

Methods

Definition Description
ClassifyPage( page : IPage, [optional] callback : IProcessingCallback, [optional] detectClassesWithoutLayout : bool ) : IPageClassificationResult *

Classifies the page and, in the event of successful classification, returns the classification result. The classification result can be the name of a class from a batch type classifier or null.

This method can be used in the following cases:

  • Pages must be classified and exported as searchable PDF to different folders according to classification results; no recognition or matching of Document Definitions is required;
  • Depending on the classification results, some actions should be performed on the document prior to recognition (e.g., correction of page orientation).

Note: If the detectClassesWithoutLayout parameter is not specified, its value is set to false. If the value is true, classification is based only on classes from a classifier and the available Document Definitions are not used for classification.

Note: You can either use the IProcessingCallback interface, or implement your own interface.

IsModuleAllowedByLicense( authorId : string, moduleName : string ) : bool * Checks whether the use of a module is allowed by the license.
LoadImage( filePath : string, [optional] pageNumber : int ) : IEditablePictureObject * Loads an image from a file. The loaded image will be available for editing. If the pageNumber parameter is not specified, its value is set to "1."
NewImageSavingOptions() : IExportImageSavingOptions * Creates a new object of the IExportImageSavingOptions class.
PictureFromHBitmap( [optional] resolution : int, bitmap : HBITMAP ) : IEditablePictureObject *

Generates an image from an HBITMAP object with specified resolution. If the resolution parameter is not specified, image resolution is detected automatically. The generated image will be available for editing.

Sample code

Note: As an HBITMAP object is taken into ownership, there is no need to call the CloseHandle method for it after generating the image.

Rect( left : int, top : int, right : int, bottom : int ) : string Generates a string in the form of a rectangle with specified coordinates.
ShowMessage( text : string, [optional] isError : bool ) Shows a message to the user. If the isError flag is not specified, its value is set to false. If the isError flag is set to true, an error message will be displayed; otherwise, a notification message will be displayed. If the script is executed within a handling process, the message will be written to the processing log.

Note: Unlike a classifier, the ClassifyPage method is used to analyze the page class, but the classification result is not matched. For example, if a classifier does not contain the Banking_eng Document Definition, the ClassifyPage method applied to the page can return a section of this Document Definition.

Properties

Name Type Access Description
CurrentUserSession * IUserSessionInfo Read-only Returns information about the session of the user currently using the Processing Station. During verification, it returns information about the session of the user currently performing verification (including remote users).
ScriptContext * IScriptDefinitionContext Read-only Provides access to the object in which the script was created. This property allows you to access the project regardless of the parameters received by the script.

25.05.2023 7:55:02

Please leave your feedback about this article

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.