> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IFlexiCaptureTools

> IFlexiCaptureTools (FCTools) global object in FlexiCapture scripts: classify pages, load images, show messages, and create image saving options.

## 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" );
```

<a id="webverificationavailableinterface" />

<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 (\*).
</Note>

## Methods

<table width="100%"><thead><tr><th style={{textAlign: 'left'}}><p><strong>Definition</strong></p></th><th style={{textAlign: 'left'}}><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p>ClassifyPage( page : <a href="/flexi-capture/appendix/scripts/ipage">IPage</a>, \[optional] callback : <a href="/flexi-capture/appendix/scripts/iprocessingcallback">IProcessingCallback</a>, \[optional] detectClassesWithoutLayout : bool ) : <a href="/flexi-capture/appendix/scripts/iclassresult">IPageClassificationResult</a> <a href="#webverificationavailableinterface">\*</a></p></td><td><p>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.</p><p>This method can be used in the following cases:</p><ul><li>Pages must be classified and exported as <a href="/flexi-capture/appendix/work-with-pdf">searchable PDF</a>searchable PDF to different folders according to classification results; no recognition or matching of Document Definitions is required;</li><li>Depending on the classification results, some actions should be performed on the document prior to recognition (e.g., correction of page orientation).</li></ul><p><strong>Note: </strong> If the <strong>detectClassesWithoutLayout</strong> parameter is not specified, its value is set to <strong>false</strong>. If the value is <strong>true</strong>, classification is based only on classes from a classifier and the available Document Definitions are not used for classification.</p><p><strong>Note: </strong> You can either use the <a href="/flexi-capture/appendix/scripts/iprocessingcallback">IProcessingCallback</a> interface, or implement your own interface.</p></td></tr><tr><td><p>IsModuleAllowedByLicense( authorId : string, moduleName : string ) : bool <a href="#webverificationavailableinterface">\*</a></p></td><td><p>Checks whether the use of a module is allowed by the license.</p></td></tr><tr><td><p>LoadImage( filePath : string, \[optional] pageNumber : int ) : <a href="/flexi-capture/appendix/scripts/ieditablepictureobject">IEditablePictureObject</a> <a href="#webverificationavailableinterface">\*</a></p></td><td><p>Loads an image from a file. The loaded image will be available for editing. If the <strong>pageNumber</strong> parameter is not specified, its value is set to "1."</p></td></tr><tr><td><p>NewImageSavingOptions() : <a href="/flexi-capture/appendix/scripts/iexportimagesavingoptions">IExportImageSavingOptions</a> <a href="#webverificationavailableinterface">\*</a></p></td><td><p>Creates a new object of the <a href="/flexi-capture/appendix/scripts/iexportimagesavingoptions">IExportImageSavingOptions</a> class.</p></td></tr><tr><td><p>PictureFromHBitmap( \[optional] resolution : int, bitmap : HBITMAP ) : <a href="/flexi-capture/appendix/scripts/ieditablepictureobject">IEditablePictureObject</a> <a href="#webverificationavailableinterface">\*</a></p></td><td><p>Generates an image from an HBITMAP object with specified resolution. If the <strong>resolution</strong> parameter is not specified, image resolution is detected automatically. The generated image will be available for editing.</p><details><summary>Sample code</summary><pre><code>System.Drawing.Bitmap bitmap = System.Drawing.Image.FromHbitmap( handle );
\<do something>
IPictureObject FinalPicture = FCTools.PictureFromHBitmap( 300, bitmap.GetHbitmap().ToInt32() );</code></pre></details><p><strong>Note: </strong> As an HBITMAP object is taken into ownership, there is no need to call the CloseHandle method for it after generating the image.</p></td></tr><tr><td><p>Rect( left : int, top : int, right : int, bottom : int ) : string</p></td><td><p>Generates a string in the form of a rectangle with specified coordinates.</p></td></tr><tr><td><p>ShowMessage( text : string, \[optional] isError : bool )</p></td><td><p>Shows a message to the user. If the <strong>isError</strong> flag is not specified, its value is set to <strong>false</strong>. If the <strong>isError</strong> flag is set to <strong>true</strong>, 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.</p></td></tr></tbody></table>

<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.
</Note>

## Properties

| **Name**                                                    | **Type**                                                                                | **Access** | **Description**                                                                                                                                                                                                                 |
| ----------------------------------------------------------- | --------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| CurrentUserSession [\*](#webverificationavailableinterface) | [IUserSessionInfo](/flexi-capture/appendix/scripts/i-user-session-info)                 | 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 [\*](#webverificationavailableinterface)      | [IScriptDefinitionContext](/flexi-capture/appendix/scripts/i-script-definition-context) | 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.                                                              |
