- Introducing ABBYY FlexiCapture
- Installing and running the program
- ABBYY FlexiCapture architecture
-
Program settings
- ABBYY FlexiCapture Setup
- Multitenancy
- Creating a project
-
Document Definitions
- Creating fixed Document Definitions
- Creating Document Definitions for semi-structured documents
- Document Definitions without automatic fields extraction
- Document sets
-
Document Definition fields
- Text entry fields
- Checkmarks
- Checkmark groups
- Barcodes
- Pictures
- Tables
- Field group
- Service fields
- Index fields
- Link to an existing field
- Fields without a region
- Creating a field with a non-rectangular region
- Fields with several instances
- Fields with several regions
- How to change a field name
- Copying, moving, deleting fields
- Exclusion of a region from recognition
- Document Definition Wizard
- Editing and publishing a Document Definition
- Creating Document Definitions
- Document Definition properties
- Properties of a Document Definition section
- Rule validation
- Export settings
- Configuring data presentation in the document window
- Testing Document Definitions
- Localizing a Document Definition
- Classification
- Field extraction training
- Operating a configured project
-
ABBYY FlexiCapture for Invoices
- Features of ABBYY FlexiCapture for Invoices
- How to capture invoices
-
How to set up an invoice capture project
- Country and language settings
- Connecting vendor and business unit databases
- Data export settings
- The status of documents in ABBYY FlexiCapture for Invoices projects
- Training ABBYY FlexiCapture for Invoices
- Rules
- Capturing additional invoice fields
- Purchase Order Matching
- Enabling additional program features for operators
- Using multiple Document Definitions
- Editing invoice processing settings in XML files
- Updating the Document Definition for invoices
- Tax systems
- Specifications
- Capturing receipts
- Capturing purchase orders
- Using NLP to process unstructured documents
- ABBYY FlexiCapture interface
-
Appendix
-
Using scripts in ABBYY FlexiCapture
- Specifics of scripts written in .Net languages
- External assemblies
- Object model
-
Scripts for customizing processing stages
-
Types of scripts
- Script rule
- Autocorrection script
- Export script
- User script (custom action)
- Document assembly script
- Custom recognition script
- Stage rule
- Processing scripts
- Data set update script
- Data set validation scripts
- Document classification script
-
Event handlers
- Batch created
- Batch deleted
- Batch parameter change
- Batch structure change (page added/page deleted/document added/document deleted)
- Pages moved
- Batch opened/closed
- Batch integrity check
- Document parameter changed
- Document state changed
- Export completed
- Script that is run after rule checks
- Before matching
- Field verification request
-
Objects
- IActionResult
- IAssemblingError
- IAssemblingErrors
- IBatch
- IBatchCheckResults
- IBatchItem
- IBatchItems
- IBatchTypeClassifier
- IBatchTypeClassifierResult
- IBinarizationParams
- IBoxedBoolean
- ICharacterParams
- ICharactersParams
- ICheckmarkGroupValue
- ICheckmarkValue
- IDataSet
- IDataSetQuery
- IDataSetRecord
- IDocument
- IDocuments
- IDocumentExportResults
- IDocumentsExportResults
- IDocumentDefinitionInfo
- IDocumentDefinitionInfoArray
- IEditablePictureObject
- IExportFieldsToRedact
- IExportImageSavingOptions
- IField
- IFieldRegion
- IFieldRegions
- IFields
- IFlexiCaptureTools
- ILocalContrastParams
- IMatchedSectionInfo
- IMatchingInfo
- IPage
- IPageClassificationResult
- IPages
- IPictureObject
- IPictureObjectsInfo
- IPrincipal
- IPrincipals
- IProcessingCallback
- IProject
- IProperties
- IProperty
- IPropertyModificationInfo
- IRecordCheckResult
- IRecordset
- IRect
- IRects
- IRoutingRuleResult
- IRuleContext
- IRuleError
- IRuleErrors
- IRuleTag
- IRuleTags
- IScriptBinaryAttributes
- IScriptDefinitionContext
- ISectionDefinitionInfo
- ISectionDefinitionInfoArray
- IShadowsHighlightsParams
- IStageInfo
- IUserAttachment
- IUserAttachments
- IUserSessionInfo
- IValue
- IVARIANTArray
- TAssemlingErrorType
- TBatchItemType
- TColorToFilter
- TExportFieldType
- TExportType
- TImageCompressionType
- TPageClassificationType
- TPdfAVersion
- TPdfDocumentInfoType
- TPdfTextSearchAreaType
- TPrincipalType
- TProcessingPriority
- TPropertyType
- TRuleErrorType
- TStateType
- Sample scripts
- Internal names of recognition languages
-
Types of scripts
-
Scripts for processing interface events
-
Event handlers
- On Document Closed
- On Project Closed
- On Activate Document
- On Field Control Activate
- On Return From Task
- On User Command
- On Field Control Deactivate
- On Closing Document
- On Task Close
- On Closing Project
- On Region Change
- On Task Window Mode Changed
- On Open Document
- On Task Window Create
- On Task Reject
- On Region Control Draw
- On Task Send To Stage
- On Text Field Validating
-
Objects
- IBoolean
- IBoxedFieldControl
- IDocumentEditor
- IDocumentItem
- IDocumentItems
- IDocumentsCollection
- IDocumentsWindow
- IDrawContext
- IErrorControl
- IErrorControls
- IErrorsWindow
- IFieldControl
- IFieldRegionControl
- IFieldRegionControls
- IFormWindow
- IImageWindow
- IMainMenu
- IMainWindow
- IMenu
- IMenuItem
- IPageControl
- IPageItem
- IPageItems
- IPagesCollection
- IPoint
- ISelection
- IShellRational
- IShellRect
- IShellRects
- ITaskWindow
- ITextEditor
- IToolbar
- IToolbarButton
- IToolbars
- TCommandBarType
- TCommandID
- TDockingType
- TDocumentState
- TErrorType
- TSelectionType
- TTaskWindowMode
- TTextSize
- TUserRole
- TWorkWindowType
-
Event handlers
- User scripts for the Web Verification Station
- Creating a machine-readable form
- Hot keys
- Additional options
- Description of Processing Server commands
- ABBYY FlexiCapture sample projects
- Supported recognition languages
- Supported classifier languages
- Fonts for correct characters rendering
- Supported text types
- Supported barcode types
- Supported input formats
- Processing PDF files
- Export file formats
- Date formats
- Alphabet used in regular expressions
- Patents
- Third-party technologies
- Glossary
- Technical support
- How to buy ABBYY FlexiCapture
- End-User License Agreement (EULA)
-
Using scripts in ABBYY FlexiCapture
Objects
Below is a list of functions that are available for creating custom scripts. To access object instances, use the commandArgs variable.
All variables in this section are global and are visible across the entire program.
Functions for working with fields
Function | Description |
getCurrentField() | Returns a link to the field object that uses the current custom script. |
getFieldByName(namesPath) (*) |
Returns a link to the field for which the custom script has been opened. Example:
|
getFieldValue(namesPath) (*) |
Returns:
namesPath | fieldObject:
|
setCurrentFieldValue(value, forced, onSaved) |
Modifies the field value for which the custom script has been opened. Parameters:
|
setFieldValue(namesPath | field, value, forced, onSaved) (*) |
Modifies the field value. Parameters:
|
save() | Closes the window where the custom script is executed and saves the changes. |
cancel() | Closes the window where the custom script is executed without saving the changes. |
(*) For some functions listed above, the path to the field is specified as an input parameter. It comprises the field name and the names of the parent elements (field group, section). For tables, repeating tables, and repeating groups, you need to specify the instance number starting at 0 (zero). Example: where [10] is the number of the instance of the repeating group. |
Functions for working with data sets
Function | Description |
addEntity(entityInfo: {cacheName, columns, values}, onResult(newId)) |
Adds an entry to the data set. Parameters:
|
editEntity(entityInfo: {cacheName, columns, values}, onResult()) |
Edits an entry in the database. Parameters:
|
getDict({cacheName, filters: [{FieldName, FieldValue}], cursorPos, allowMultipleColumnResults}, onResult (param: { FieldName, FieldValue, BoldMask}[][]) ) |
Carries out a data set search for a specified value or for a part of it. Returns the matching strings in the following format: [{FieldName Parameters:
If, for example, the following is present in a data set: CompanyName: ABBYY Let's assume that a search is carried out for the symbols "AB". Then, the following will be returned: [ [ { FieldName: ‘CompanyName’, FieldValue: ‘ABBYY’, BoldMask: ‘11000’ }, ] ] |
getDictAll({cacheName, filters: {FieldName, FieldValue}}, }, onResult (param: { FieldName, FieldValue, BoldMask}[][])) |
Carries out a database search for the entire value specified. Returns the values of all fields that have been found. Parameters:
[ [ { FieldName: ‘CompanyName’, FieldValue: ‘ABBYY’, BoldMask: ‘11000’ }, ] ] |
Sample database search script |
Functions for working with the document form
Function | Description |
selectRow(tablePath, rowNumber) (*) |
Marks a table row as selected.
|
deselectRow(tablePath, rowNumber?) (*) |
Removes selection from a table row.
|
scrollFormToField(namesPath) (*) |
Scrolls the form editor to get the field into view.
|
getDomElementPosition(domId, onResult: (result?: {width, height, top, left, right, bottom})) |
Gets the position of an element in the form editor window and returns the result of a callback function.
|
setStyles(styles, callback) |
Adds CSS styles to the custom action frame window.
|
(*) For some functions listed above, the path to the field is specified as an input parameter. It comprises the field name and the names of the parent elements (field group, section). For tables, repeating tables, and repeating groups, you need to specify the instance number starting at zero. Example: where [10] is the number of the instance of the repeating group. |
Properties of the commandArgs object
Variables
Variable | Type | Description |
commandArgs.params.document | Document | Stores an object copy of an open document. This can be used to get access to any error, field, or region for the current document. |
commandArgs.params.currentField | (Picture | Checkmark | Checkmark Groups | FieldsGroup | Table | TextField) |
Returns a link to a field object that reflects the state of the field at the time when the script is called. Part of the document specified above.
|
commandArgs.params.appPath | String | The server's domain name. |
commandArgs.params.coordinates | Object [{X1,X2,Y1,Y2}] |
The coordinates of the DOM element that called the custom script. |
commandArgs.params.currentElementDomId | String | The ID of the DOM element that called the custom script. |
Functions
Function | Description |
commandArgs.events.addEventHandler | Adds an event handler in the global context of the custom script. |
commandArgs.events.triggerHandlers | Triggers an event in the global context of the custom script. |
commandArgs.events.removeEventHandler | Deletes an event handler in the global context of the custom script. |
Field Group field
Name | Type | Rights | Description |
Fields | (Picture | Checkmark | Checkmark Groups | FieldsGroup | Table | TextField)[] | Read-only | Array of fields |
HasTableLayout | Boolean | Read-only | Specifies if the field region is a table. |
Caption | String | Read-only | Custom field name, caption |
FieldType | Number | Read-only |
Field type. Possible value: 4 – field group |
Id | Number | Read-only | Field ID |
IsReadOnly | Boolean | Read-only | Specifies whether editing of fields is disallowed. |
IsVisible | Boolean | Read-only | Specifies whether the field is visible on the data form. |
MaxRegions | Number | Read-only | Maximum number of field regions. If the value is -1, any number of regions is allowed. |
Name | String | Read-only | Service name for the field. |
NamePath | String[] | Read-only | Array of field and group names that form the path to the field. |
NeedRecognize | Boolean | Read/write | Specifies whether to retrieve the field value from the region when the rules are checked again. |
Regions | { Id: number; Status: number; PageId: Number; IsNew : Boolean; Coordinates: Object [{X1,X2,Y1,Y2}]; }[] |
Read-only |
Array of regions.
|
Section field
Name | Type | Rights | Description |
Fields | (Picture | Checkmark | Checkmark Groups | FieldsGroup | Table | TextField)[] | Read-only | Array of fields |
Pageids | Number[] | Read-only | Identifiers of the pages on which the section is located. |
IsFlexible | Boolean | Read-only | Specifies whether the section is flexible. |
Caption | String | Read-only | Custom field name, caption |
FieldType | Number | Read-only |
Field type. Possible value: 6 – section |
Id | Number | Read-only | Field ID |
IsReadOnly | Boolean | Read-only | Specifies whether field editing is disallowed |
IsVisible | Boolean | Read-only | Specifies whether the field is visible on the data form. |
MaxRegions | Number | Read-only | Maximum number of field regions. If the value is -1, any number of regions is allowed. |
Name | String | Read-only | Service name of the field |
NamePath | String[] | Read-only | Array of field and group names that form the path to the field. |
NeedRecognize | Boolean | Read/write | Specifies whether to retrieve the field value from the region when the rules are checked again. |
Regions | { Id: number; Status: number; PageId: Number; IsNew : Boolean; Coordinates: Object [{X1,X2,Y1,Y2}]; }[] |
Read-only |
Array of regions.
|
Table field
Name | Type | Rights | Description |
Rows | { Id: number; RowNumber: number; HasColorImage: boolean; TableBlockID: number[]; Cells: (Picture | Checkmark | CheckmarkGroup | TextField)[]; }[] |
Read-only |
List of table rows. The parameters of the object line in the table:
|
Caption | String | Read-only | Custom field name, caption |
FieldType | Number | Read-only |
Field type. Possible value: 7 – table |
Id | Number | Read-only | Field ID |
IsReadOnly | Boolean | Read-only | Specifies whether field editing is disallowed. |
IsVisible | Boolean | Read-only | Specifies whether the field is visible on the data form. |
MaxRegions | Number | Read-only | Specifies whether the field is visible on the data form -1, any number of regions is allowed. |
Name | String | Read-only | Service name of the field. |
NamePath | String[] | Read-only | Array of field and group names that form the path to the field. |
NeedRecognize | Boolean | Read/write | Specifies whether to retrieve the field value from the region when the rules are checked again. |
Regions | { Id: number; Status: number; PageId: Number; IsNew : Boolean; Coordinates: Object [{X1,X2,Y1,Y2}]; }[] |
Read-only |
Array of regions.
|
Text entry field
Name | Type | Rights | Description |
Flags | Number[] | Read/write |
array of the same length as the field Value. Consists of 0 and 1. 0 – a character that is in Value in the same position as 0 in Flags, requires verification. |
Suggests | String[] | Read-only | List of suggested field values |
Value | String | Read/write | Field value |
TextType | Number | Read-only |
Type of text field. Possible value:
|
Caption | String | Read-only | Custom field name, caption |
FieldType | Number | Read-only |
Field type. Possible value: 0 – text field |
Id | Number | Read-only | Field ID |
IsReadOnly | Boolean | Read-only | Specifies whether field editing is disallowed. |
IsVisible | Boolean | Read-only | Specifies whether the field is visible on the data form. |
MaxRegions | Number | Read-only | Maximum number of field regions. If the value is -1, any number of regions is allowed. |
Name | String | Read-only | Service name of the field. |
NamePath | String[] | Read-only | Array of field and group names that form the path to the field. |
NeedRecognize | Boolean | Read/write | Specifies whether to retrieve the field value from the region when the rules are checked again. |
Regions | { Id: number; Status: number; PageId: Number; IsNew : Boolean; Coordinates: Object [{X1,X2,Y1,Y2}]; }[] |
Read-only |
Array of regions.
|
IsVerified | Boolean | Read/write | Specifies whether the field has been verified. |
NeedVerification | Boolean | Read-only | Specifies whether the field requires verification. |
NeedDoubleVerification | Boolean | Read-only | Specifies whether the field requires double verification |
IsSummary | Boolean | Read-only | Specifies whether the field is used in the formation of data summary on the data form. |
Checkmark field
Name | Type | Rights | Description |
Value | Boolean | Read/write | Field value |
Caption | String | Read-only | Custom field name, caption |
FieldType | Number | Read-only |
Field type. Possible value: 2 – checkmark |
Id | Number | Read-only | Field ID |
IsReadOnly | Boolean | Read-only | Specifies whether field editing is disallowed. |
IsVisible | Boolean | Read-only | Specifies whether the field is visible on the data form. |
MaxRegions | Number | Read-only | Maximum number of field regions. If the value is -1, any number of regions is allowed. |
Name | String | Read-only | Service name of the field. |
NamePath | String[] | Read-only | Array of field and group names that form the path to the field. |
NeedRecognize | Boolean | Read/write | Specifies whether to retrieve the field value from the region when the rules are checked again. |
Regions | { Id: number; Status: number; PageId: Number; IsNew : Boolean; Coordinates: Object [{X1,X2,Y1,Y2}]; }[] |
Read-only |
Array of regions.
|
IsVerified | Boolean | Read/write | Specifies whether the field has been verified. |
NeedVerification | Boolean | Read-only | Specifies whether the field requires verification. |
NeedDoubleVerification | Boolean | Read-only | Specifies whether the field requires double verification. |
IsSummary | Boolean | Read-only | Specifies whether the field is used in the formation of data summary on the data form. |
Checkmark Group field
Name | Type | Rights | Description |
MaxSelectedCount | Number | Read-only | Maximum number of selected field values. |
MinSelectedCount | Number | Read-only | Minimum number of selected field values. |
Values | Number[] | Read/write | Field value. An array of record IDs that make up the list of possible field values (Variants). |
Variants | {Id:number, Name:string}[] | Read-only |
List of possible field values:
|
Caption | String | Read-only | Custom field name, caption |
FieldType | Number | Read-only |
Field type. Possible value: 3 – checkmark group |
Id | Number | Read-only | Field ID. |
IsReadOnly | Boolean | Read-only | Specifies whether field editing is disallowed. |
IsVisible | Boolean | Read-only | Specifies whether the field is visible on the data form. |
MaxRegions | Number | Read-only | Maximum number of field regions. If the value is -1, any number of regions is allowed. |
Name | String | Read-only | Service name of the field. |
NamePath | String[] | Read-only | Array of field and group names that form the path to the field. |
NeedRecognize | Boolean | Read/write | Specifies whether to retrieve the field value from the region when the rules are checked again. |
Regions | { Id: number; Status: number; PageId: Number; IsNew : Boolean; Coordinates: Object [{X1,X2,Y1,Y2}]; }[] |
Read-only |
Array of regions.
|
IsVerified | Boolean | Read/write | Specifies whether the field has been verified. |
NeedVerification | Boolean | Read-only | Specifies whether the field requires verification. |
NeedDoubleVerification | Boolean | Read-only | Specifies whether the field requires double verification. |
IsSummary | Boolean | Read-only | Specifies whether the field is used in the formation of data summary on the data form. |
Picture field
Name | Type | Rights | Description |
Caption | String | Read-only | Custom field name, caption |
FieldType | Number | Read-only |
Field type. Possible value: 1 – picture |
Id | Number | Read-only | Field ID. |
IsReadOnly | Boolean | Read-only | Specifies whether field editing is disallowed. |
IsVisible | Boolean | Read-only | Specifies whether the field is visible on the data form. |
MaxRegions | Number | Read-only | Maximum number of field regions. If the value is -1, any number of regions is allowed. |
Name | String | Read-only | Service name of the field. |
NamePath | String[] | Read-only | Array of field and group names that form the path to the field. |
Regions | { Id: number; Status: number; PageId: Number; IsNew : Boolean; Coordinates: Object [{X1,X2,Y1,Y2}]; }[] |
Read-only |
Array of regions.
|
Repeating Group of Sections field
Name | Type | Rights | Description |
Id | Number | Read-only | Field ID |
Name | String | Read-only | Field name |
Sections | Section[] | Read-only | Array of fields of Section type |
FieldType | Number | Read-only |
Field type. Possible value: 8 – recurring section group. |
Properties of the document object
Name | Type | Rights | Description |
AssemblingErrors | { DocumentNodeRef: number[][]; Description: string; SectionName: string[] }[] |
Read-only |
Build errors in the document where:
|
BatchId | Number | Read-only | The package ID |
Errors | { DocumentNodeRef: number[][]; Severity: number; Message: string; RuleName: string; }[] |
Read-only |
Errors in the document where:
|
Fields | (Section | SectionsGroup)[] | Read-only | List of sections/duplicate sections |
Id | Number | Read-only | Document identifier |
Index | Number | Read-only | Index of the document in the package |
Pages | { Id: number; Modification: number; HasColorImage: boolean; ImageResolution: number; KeyValue: string; SectionTemplateId: number; SectionTemplateName: string; FlexibleInstanceId: number; SectionTemplatePageNumber: number; Comment: string; ImageWidth: number; ImageHeight: number; }[] |
Read-only |
List of document pages containing the following:
|
ProjectId | Number | Read-only | Project identifier |
TaskId | Number | Read-only | Task ID |
TemplateId | Number | Read-only | Definition ID of the document |
TemplateName | String | Read-only | The name of the definitions document |
TemplateVersion | Number | Read-only | Definition version of the document |
Version | Number | Read-only | Document version |
02.03.2021 8:10:42