Introducing ABBYY FlexiCapture

ABBYY FlexiCapture is a highly scalable platform for intelligent data and document capture which can be successfully used to extract data from unstructured as well as structured paper documents, scans, e-mail messages, and other sources for subsequent use in document management systems. The four basic data extraction operations in ABBYY FlexiCapture include classification, optical recognition, verification, and export to ERP, ECM or BPM systems.

ABBYY FlexiCapture is capable of handling the full range of data processing needs, from small-scale projects to distributed industrial capture of large volumes of data, providing high levels of security and reliability expected from enterprise-grade software solutions.

The basic document processing scenario is as follows:

1.Documents are placed in the automatic scanner feeder and scanning begins. Images can also be imported from email or a mobile device, etc.

2.Scanned document images are submitted for recognition, at which point the software automatically identifies documents, including multipage documents, locates meaningful fields, extracts data and loads check rules.

3.After the recognition has been completed the extracted data undergoes an automatic check rules. If necessary, the process of visual check for data and rule errors is launched.

4.Recognized and verified data along with electronic copies of documents are saved to a database, an information system, or a file.


What types of documents can be processed with ABBYY FlexiCapture

Show/Hide Hidden Text

ABBYY FlexiCapture is software solution for single-flow data capture from documents of various types.

Various documents can be processed in a single flow. You can also set up the program to process documents of mixed type, e.g. documents that contain both structured and semi-structured sections. The type of documents affects system configuration only, namely the method of creating Document Definitions. The nature of the Operator's work is not affected by the type of documents processed.

ABBYY FlexiCapture can be configured for automated input of the following documents, including in a single flow:

Structured fixed forms;

Structured forms are documents containing a set of marked information fields whose formatting, number and layout does not change from one document instance to the next. Such documents are called fixed forms. For example, most questionnaires and application forms are fixed forms. Such forms are usually distributed as blank forms and filled out by hand.

To identify a fixed form in a document flow and to extract data from it, you need to create a single fixed layout that will tell the program the location of the fields containing data to be extracted.

Fixed forms created to meet the requirements of automatic input can be processed most effectively. Such forms are called machine-readable forms.

The program includes a convenient tool for designing machine-readable forms ABBYY FormDesigner (supplied together with ABBYY FlexiCapture). You can read about designing forms with the help of ABBYY FormDesigner in the User Guide and help topics.

note Note: Fixed forms received by fax can be distorted: their size and the relative positions of their fields may be altered. Due to this, we recommend using a FlexiLayout to increase recognition quality when processing such forms.
Semi-structured flexible forms and documents;

These are documents containing a set of information fields whose design, number and layout may vary significantly in different instances of the document. These documents are called flexible. For example, bills are semi-structured documents, since they often vary both in terms of the number of items and their formatting, due to the fact that they are received from different companies. All bills have a bill number and an amount due for payment, but are located in different places.

To identify flexible forms and to extract data from them, ABBYY FlexiCapture uses a flexible layout (FlexiLayout). A flexible layout is created with the help of a special module called ABBYY FlexiLayout Studio. Details of this module are available in the User Guide and help topics.

The processing of semi-structured documents differs from the processing of fixed forms only at the stage of creating and loading a layout.
Unstructured documents with free-style design.

ABBYY FlexiCapture can be used to process unstructured documents containing information presented in a free style, for example contracts, letters, orders, and graphs. The program can automatically identify unstructured documents as annexes to fixed or flexible forms, or it can identify them with the help of a flexible layout and then export them as PDF searchable files or as graphic files. You can extract index fields from unstructured documents both automatically with the help of a flexible layout and by way of manual input.

NLP can be used to process unstructured documents. This technology uses NLP models to extract information from text.

A typical scenario for the processing of unstructured documents is when a hardcopy archive needs to be converted into electronic form and there is a requirement to extract two or three index fields in order to organize a quick attribute-based search.


ABBYY FlexiCapture architecture

ABBYY FlexiCapture is a set of applications that comprises document processing stations and servers.

Server components:

1.Application Server is a web service in Internet Information Services (IIS) which functions as the main gateway for all HTTP/HTTPS traffic in the system . This component provides user authentication and authorization functionality and enables communication between the server and client components.

2.License Server is a service that stores information about the current license and allowed uses of the system.

3.Processing Server is service that manages the Processing Stations. This component enables distributed processing.

4.Database stores the processing settings, information about the users, information about the documents that are being processed, and statistics for the documents that have been processed.

5.File Storage stores the images of the documents that are being processed and the data captured from these documents.

Each server component can be installed on a separate computer, allowing variable scalability and individual reliability and security settings.

Client components:

1.Administration and Monitoring Console is a web application that is used for setting up ABBYY FlexiCapture and monitoring its operation.

2.Project Setup Station is used for setting up document processing.

3.Processing Stations:

oAutomated Processing Stations import and process images, perform optical recognition, run user scripts, export extracted data to the user's storage system, and perform a number of service operations.

oManual Processing Stations (Scanning Station and Verification Station) is a set of applications for obtaining document images, feeding them to ABBYY FlexiCapture, and verifying extracted data. They can be installed as separate PC applications, as thin browser-based clients, or as mobile apps.

Component interaction

The flow chart below illustrates interaction among the ABBYY FlexiCapture components.

For details, see: Overview of interactions between ABBYY FlexiCapture components.


System requirements

Show/Hide Hidden Text

Servers

CPU

Application Server: 2 GHz or faster with 2 cores

Other servers: 2 GHz or faster

Operating system

·Windows Server 2008 R2 SP1

·Windows Server 2012

·Windows Server 2012 R2

·Windows Server 2016

·Windows Server 2019

note Note: To use a localized version of ABBYY FlexiCapture, make sure your operating system supports the corresponding GUI language.

RAM

At least 2 GB for each component

note Note: An additional 4 GB RAM is required if Database Server is installed.

Disk space

1.Application Server: 500 MB for installation

2.Processing Server: 400 MB for installation

3.Licensing Server: 100 MB for installation

4.2 GB for SQL Server database

5.Additional space is required for the file storage

Browser

(to open Administration and Monitoring Console)

·Google Chrome 55 or later (32-bit)

·Mozilla Firefox 50 or later (32-bit)

·Microsoft Edge 41 or later

note Note: ABBYY FlexiCapture works best with Google Chrome and other Chromium-based browsers.

·Internet Explorer 11

note Note: To ensure that Internet Explorer 11 works correctly, install .NET Framework 4.7.2 on the computer with the Application Server or add the address of an application server to the list of websites that are opened in compatibility mode.

warning Important! Disclaimer for Internet Explorer users/Known Issue

Due to the known limitations of Internet Explorer 11, you may observe the issues while processing more than 100 pages or having numerous verification tasks with ABBYY FlexiCapture. Using Internet Explorer browser for an extended period of time can cause the browser to consume a lot of the machine's memory and slow down the client performance and eventually crash the browser.

To avoid the unwanted interruptions of ABBYY FlexiCapture processing tasks ABBYY recommends you to use Microsoft Edge, Google Chrome or other browsers for the professional verification tasks. Nevertheless, ABBYY FlexiCapture web-stations are fully functioning in Internet Explorer 11, thus they should be used for ad-hoc processing preferably.

Important notes for users of Internet Explorer

1.In the event of a verification malfunction, the operator will not be able to resume the task immediately after the session is restored. This task will become available only after the inactive sessions have been purged. By default, inactive sessions are purged every 4 hours. You can change this setting in the web.config file on the Processing Server. We do not recommend purging inactive sessions too often. The recommended minimum setting is 10 minutes.

2.Starting from FlexiCapture R3 Update 1, each new task is opened in a new tab to optimize memory use. However, this also means that operators will not be able to receive new tasks automatically. To revert to the old behavior, open the web.config file for the web station and set the IEVerificationNewWindow key to false.

3.In Internet Explorer 11, users will not be able to enter Japanese text using the corresponding Microsoft IME.

Other requirements

1.The computer where the server is installed must be connected to your domain

2.Video card and display with a resolution of 1024×768

3.Internet Information Services 7 or higher

4.Microsoft .NET Framework 4.7.2 or higher

5.Microsoft SQL Server 2012 SP4, 2014 SP2, 2016 SP2, 2017, 2019;
Microsoft Azure;

note Note: Additionally, Microsoft SQL Server Native Client 2012 or later is required for creating databases.
Oracle Database 12c, 18c, 19c.

6.Visual C++ 2015 Redistributable

Stations

CPU | 2 GHz or faster
Operating System | ·Windows 7 SP1 ·Windows 8.1 ·Windows 10 ·Windows Server 2008 R2 SP1 + Desktop Experience ·Windows Server 2012 + Desktop Experience ·Windows Server 2012 R2 + Desktop Experience ·Windows Server 2016 + Desktop Experience ·Windows Server 2019 + Desktop Experience note Note: To use a localized version of ABBYY FlexiCapture, make sure your operating system supports the corresponding GUI language.
RAM | Project Setup Station, Verification Station, Data Verification Station: 2 GB Processing Station: at least 2.5 GB for each CPU core Scanning Station: 1 GB
Disk space | Scanning Station: 1 GB (including 200 MB for installation and sufficient disk space for scanned images) Other stations: 4 GB (including 2 GB for installation)
Other requirements | 1.A scanner with TWAIN, WIA or ISIS support 2.Video card and display with a resolution of 1024×768 3.The computer where the station is installed must be connected to your domain 4.Microsoft .NET Framework 4.7.2 or later 5.Microsoft Office (version 2007 or later) or LibreOffice (version 4.0 or later)

HTML 5 Web Stations

CPU

1.6 GHz or faster

Operating System

·Windows 7 SP1

·Windows 8/8.1

·Windows 10

·Windows Server 2008 R2 SP1 + Desktop Experience

·Windows Server 2012 + Desktop Experience

·Windows Server 2012 R2 + Desktop Experience

·Windows Server 2016 + Desktop Experience

·Windows Server 2019 + Desktop Experience

note Note: To use a localized version of ABBYY FlexiCapture, make sure your operating system supports the corresponding GUI language.

RAM

1 GB

Disk space

·Sufficient space to install a browser

·At least 100 MB for program operation

·An additional 60 MB is required to install the ABBYY Scanning Plugin for the Web Scanning Station.

Browser

·Google Chrome 55 or later (32-bit)
Security settings for Google Chrome:

1.JavaScript = Allow all sites

2.plugins = Run automatically

note Note: All plugins are disabled by default. To enable a plugin, open chrome://plugins/ in the browser and select the Always allowed option for the desired plugin.

·Mozilla Firefox 50 or later (32-bit)
Security settings for Mozilla Firefox:

1.Java scripting = Enable

2.Firefox will remember history (Options → Privacy)

·Microsoft Edge 41 or later
Security settings for Microsoft Edge:

1.JavaScript = Allow all sites

2.plugins = Run automatically

note Note: ABBYY FlexiCapture works best with Google Chrome and other Chromium-based browsers.

·Microsoft Internet Explorer 11
Browser security settings: Internet Explorer medium-high protection level. Detailed required settings for Internet Explorer:

1.Run ActiveX controls and plugins = Enable

2.Script ActiveX controls marked safe for scripting = Enable

3.Active scripting = Enable

note Note: To ensure that Internet Explorer 11 works correctly, install .NET Framework 4.7.2 on the computer with the Application Server or add the address of an application server to the list of websites that are opened in compatibility mode.

note Note: The Metro-style version of Internet Explorer 10 that comes with Windows 8 is not supported.

warning Important! Disclaimer for Internet Explorer users/Known Issue

Due to the known limitations of Internet Explorer 11, you may observe the issues while processing more than 100 pages or having numerous verification tasks with ABBYY FlexiCapture. Using Internet Explorer browser for an extended period of time can cause the browser to consume a lot of the machine's memory and slow down the client performance and eventually crash the browser.

To avoid the unwanted interruptions of ABBYY FlexiCapture processing tasks ABBYY recommends you to use Microsoft Edge, Google Chrome or other browsers for the professional verification tasks. Nevertheless, ABBYY FlexiCapture web-stations are fully functioning in Internet Explorer 11, thus they should be used for ad-hoc processing preferably.

Important notes for users of Internet Explorer

1.In the event of a verification malfunction, the operator will not be able to resume the task immediately after the session is restored. This task will become available only after the inactive sessions have been purged. By default, inactive sessions are purged every 4 hours. You can change this setting in the web.config file on the Processing Server. We do not recommend purging inactive sessions too often. The recommended minimum setting is 10 minutes.

2.Starting from FlexiCapture R3 Update 1, each new task is opened in a new tab to optimize memory use. However, this also means that operators will not be able to receive new tasks automatically. To revert to the old behavior, open the web.config file for the web station and set the IEVerificationNewWindow key to false.

3.In Internet Explorer 11, users will not be able to enter Japanese text using the corresponding Microsoft IME.

Other requirements

1.Video card and display with a resolution of 1024×768

2.For Web Scanning Station:

a.A scanner supporting the TWAIN interface. WIA scanners can be accessed from the station but they may not operate properly

b.ABBYY Scanning Plugin (see below)

ABBYY Scanning Plug-In

You can install one of the two versions of ABBYY Scanning Plugin:

·The Scanning Plugin that supports PDF (selected by default). Requires ~70 MB of free space.

·The Scanning Plugin without the PDF support. Requires ~17 MB of free space.

The table below lists the operating systems on which the ABBYY Scanning Plugin can be installed with various permissions:

ABBYY Scanning Plugin
OS | Permissions | UAC | EXE
Windows 7 SP1 | Administrator | Recommended |
 |  | No |
 | User | Recommended |
 |  | No |
Windows Server 2008 R2 SP1 | Administrator | Recommended |
 |  | No |
 | User | Recommended |
 |  | No |
Windows 8.1 | Administrator | Recommended |
 |  | No |
 | User | Recommended |
 |  | No |
Windows Server 2012* | Administrator | Recommended |
 |  | No |
 | User | Recommended |
 |  | No |
Windows Server 2012 R2 | Administrator | Recommended |
 |  | No |
 | User | Recommended |
 |  | No |
Windows 10 | Administrator | Recommended |
 |  | No |
 | User | Recommended |
 |  | No |

note Note: To allow the ABBYY Scanning Plugin to be installed on Windows Server 2012, run the executable file Setup.exe as Administrator or change the security policy by setting the value of the registry key HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer DisableMSI to “0”.

Remote Verification Station

CPU | 2 GHz or faster
Operating System | ·Windows 7 SP1 ·Windows 8.1 ·Windows 10 ·Windows Server 2008 R2 SP1 + Desktop Experience ·Windows Server 2012 + Desktop Experience ·Windows Server 2012 R2 + Desktop Experience ·Windows Server 2016 + Desktop Experience ·Windows Server 2019 + Desktop Experience note Note: To use a localized version of ABBYY FlexiCapture, make sure your operating system supports the corresponding GUI language.
RAM | 1 GB
Disk space | 400 MB
Other requirements | 1.Video card and display with a resolution of 1024×768 2.Microsoft .NET Framework 4.7.2 or later

ClickOnce Scanning Station

CPU

2 GHz or faster

Operating System

·Windows 7 SP1

·Windows 8.1

·Windows 10

·Windows Server 2008 R2 SP1 + Desktop Experience

·Windows Server 2012 + Desktop Experience

·Windows Server 2012 R2 + Desktop Experience

·Windows Server 2016 + Desktop Experience

·Windows Server 2019 + Desktop Experience

note Note: To use a localized version of ABBYY FlexiCapture, make sure your operating system supports the corresponding GUI language.

RAM

1 GB

Disk space

1.5 GB (including 550 MB for installation and sufficient space for scanned images). The size of downloadable file is 270 MB

Browser

For ClickOnce deployment:

·Internet Explorer 11

note Note: To ensure that Internet Explorer 11 works correctly, install .NET Framework 4.7.2 on the computer with the Application Server or add the address of an application server to the list of websites that are opened in compatibility mode.

warning Important! Disclaimer for Internet Explorer users/Known Issue

Due to the known limitations of Internet Explorer 11, you may observe the issues while processing more than 100 pages or having numerous verification tasks with ABBYY FlexiCapture. Using Internet Explorer browser for an extended period of time can cause the browser to consume a lot of the machine's memory and slow down the client performance and eventually crash the browser.

To avoid the unwanted interruptions of ABBYY FlexiCapture processing tasks ABBYY recommends you to use Microsoft Edge, Google Chrome or other browsers for the professional verification tasks. Nevertheless, ABBYY FlexiCapture web-stations are fully functioning in Internet Explorer 11, thus they should be used for ad-hoc processing preferably.

Important notes for users of Internet Explorer

1.In the event of a verification malfunction, the operator will not be able to resume the task immediately after the session is restored. This task will become available only after the inactive sessions have been purged. By default, inactive sessions are purged every 4 hours. You can change this setting in the web.config file on the Processing Server. We do not recommend purging inactive sessions too often. The recommended minimum setting is 10 minutes.

2.Starting from FlexiCapture R3 Update 1, each new task is opened in a new tab to optimize memory use. However, this also means that operators will not be able to receive new tasks automatically. To revert to the old behavior, open the web.config file for the web station and set the IEVerificationNewWindow key to false.

3.In Internet Explorer 11, users will not be able to enter Japanese text using the corresponding Microsoft IME.

Other requirements

1.A scanner with TWAIN, WIA or ISIS support

2.Video card and display with a resolution of 1024×768

3.Microsoft .NET Framework 4.7.2 or later

Virtual Environments

The system has been tested on the following virtual machines:

1.Virtual platforms that imitate physical machines:

oVMWare Workstation (any version)

oHyper-V (any version)

note Note: Hyper-V version corresponds to the version of the operating system.

note Note: Hyper-V virtual machines do not work with USB devices.

oOracle VirtualBox (any version)

oVMWare ESXi (server included with VMWare vSphere, any version)

2.Virtual platforms imitating workplaces / applications:

oVMWare Horizon 5.2.0

oCitrix XenApp 7.13

3.Cloud services:

oMicrosoft Azure

oAmazon Cloud


ABBYY FlexiCapture servers

ABBYY FlexiCapture (Distributed Installation) includes stations and servers. The stations are responsible for document processing routines whereas the servers ensure the operation of the entire complex. The complex includes the following servers:

·Application Server

·Database Server

·Processing Server

·Licensing Server

It is also recommended to create a File Storage folder to store your project files.

note Note: For Database Server and File Storage, it is possible to make a backup.


Application Server

The Application Server ensures the correct operation of the entire ABBYY FlexiCapture system. The stations communicate among themselves via the Application Server.

We recommend installing the Application Server before you install the stations. Before installing the Application Server, make sure that the necessary components are installed.

note Note: If the components are not installed on your computer, all of them (with the exception of Internet Information Services) can be installed from the ABBYY FlexiCapture disk. Internet Information Services is a Windows component and is distributed together with the Windows operating system.

warning Important!

1.If you use a firewall, be sure to allow the World Wide Web Publishing Service.

2.To authenticate the Scanning Station by a log-in and password rather than by using Windows authentication, you need to set up the Internet Information Services: enable Basic Authentication at the level FlexiCapture/Server.

Once the Application Server is installed, the Administration and Monitoring Console will start automatically (the console is installed together with the server), where you can set up a database connection and grant access permissions to the Operators.


Database Server

The Database server stores information about the Operators, batches, operations, task statuses, processing progress, and captured data.

From the ABBYY FlexiCapture disk, you can install Microsoft SQL Server Express Edition, which allows processing up to 100,000 pages per day and use up to 50 Verification Stations. For larger processing volumes we recommend using the full version of Microsoft SQL Server.

note Note: If a dedicated File Storage Folder is not used, the project files are stored in the database.


Processing Server

Show/Hide Hidden Text

The Processing Server distributes the workload among the Processing Stations. Together with the Processing Server, a Processing Server Monitor is installed, which is used for monitoring the server. Document processing proper is done on the Processing Station.

Once the Processing Server is installed, you should configure it: start the server, add, set up and start the Processing Stations.

note Note: Before starting the Processing Server, make sure that the Processing Server access permissions have been granted to the account under which the server is running ($).

A description of the setup process is provided below.

Starting the Processing Server

To start the Processing Server:

1.Launch the Processing Server Monitor by selecting Start → All Programs → ABBYY FlexiCapture 12 Servers → Processing Server.

2.On the server tree, select ABBYY FlexiCapture Servers, right-click, and select Add Server...

3.In the Add Processing Server dialog box, specify the server location (Network host or Local host).

4.Select Actions → Properties and provide the path to the Application Server (http://<ApplicationServer> where <ApplicationServer> is the name of the computer on which the Application Server is installed). If the Processing Server and the Application Server are installed on the same computer, specify its name directly, as the use of the IP address 127.0.0.1 or the localhost expression will render the Processing Stations inoperable.

note Note: On the Application Server, start the Administration and Monitoring Console and assign the corresponding role to the computer on which the Processing Server is installed.

5.Click StartServer to start the Application Server.

note Note: The Processing Server can be stopped by using hard or "soft" stop. If you need to stop the Processing Server, for example, for upgrade purposes or for moving a database, you can use the "soft" stop. For this, select Actions → Stop. In this case, all current tasks are completed and afterward the Processing Server is stopped. New tasks are not taken into processing.
To do a hard stop of the Processing Server, select Actions → Stop Immediately. In this case all current tasks will fail.

Starting the Processing Stations

To set up the Processing Stations:

1.In the server tree, select Stations and click AddStation. The Add Stations dialog box appears. Select the desired stations from the overall list. You can also specify the name of the computer or its IP address. You can specify the name of the computer even if dynamic IP addresses are used. Use IP addresses if you experience problems accessing the DNS network.

2.Select Actions → Properties and in the Station Properties dialog box, specify the parameters of the station:

oName - the displayed name of the station;

oStart automatically - this flag means that the station is started automatically by the Processing Server; by default this option is selected;

note Note: Frequent attempts to start too many stations may considerably slow down the Processing Server

oRequired disk space - the minimum disk space required for the operation of the Processing Stations; if there is not enough free disk space, the station will be stopped. The space specified in the field should be three times as large as the maximum size of an image that can be in processing. The optimal value of the minimum disk space is the doubled maximum size of a batch that can be in processing;

oMaximum number of processes - the maximum number of CPU cores that can be used for task processing;

oAllowed number of processes - the allowed number of CPU cores for task processing; this parameter is computed automatically based on your hardware and license parameters and cannot be changed;

oProcess priority - the priority of the process;

oAcceptable task types - the task types that the station can handle:

oImport images - import tasks;

oRecognize pages - recognition and export preprocessing tasks;

oVerification support - merging results of double verification as well as pre- and postprocessing tasks for the Web Verification Station;

oCustom processing - processing batch and document processing scripts;

oExport documents - document export tasks.

3.Click [image] to start the station manually or wait for the station to start automatically (if the Start automatically option is selected, the station starts automatically within a minute).

note Note: The Processing Station can be stopped by using hard or "soft" stop. If you need to stop the Processing Station, for example, for upgrade purposes, you can use the "soft" stop. For this, select Actions → Stop. In this case, all current tasks are completed and afterward the Processing Station is stopped. New tasks are not taken into processing.
To do a hard stop of the Processing Station, select Actions → Stop Immediately. In this case all current tasks will fail.

The stations receive the permissions to process documents from the Processing Server when they connect to the server.

Setting up the Processing Server log

To set up the Processing Server log:

1.Open the Processing Server Monitor Settings dialog box by selecting File → Settings....

2.Specify which messages should be logged (Errors, Warnings, Information messages).

3.Specify whether information about completed tasks should be deleted (Remove completed tasks from the list).

4.Specify which messages will trigger logging information about the task.

note Note: We do not recommend disabling the Remove completed tasks from the list option during normal operation of the system, as this may cause a pile-up of data and slow down the Processing Server Monitor. Disable this option only when setting up and tuning the system.

5.Click [image] to view the task log. To save a task log as *.txt file, in the dialog box that opens click the Export Log... button.

Viewing task info

To view task details, select Tasks in the Processing Server tree. For each task, the following parameters are displayed: task name, start-up time, progress, status, priority and the station name. Failed tasks are marked with failed. If besides error message, the task log also contains informational messages, the task is marked with [image].

Service log

Besides the regular task processing log, the Processing Server and the Processing Station can keep a service log. ABBYY technical support staff may need information from this log when handing your support requests. Service logging will not slow down your Processing Server or Processing Station, but information contained in this log is only useful to ABBYY's technical support engineers, so we do not recommend that you have service logging permanently enabled. If a technical support engineer asks you for a service log, please follow these steps:

1.Depending on which log is required, open the Processing Server Properties dialog box (select Properties on the shortcut menu of the Processing Server) or the Station Properties dialog box (select Properties on the shortcut menu of the Processing Station).

2.Select the Write processing log option and click OK.

3.Once the log files are created, you can find them in %programdata%\ABBYY\FlexiCapture\12.0\FlexiBrSvc\Logs. Send copies of these files to the ABBYY technical support service.

4.Disable service logging by clearing the Write processing log option and clicking OK.

Managing the Processing Server using command line

Processing Server can be operated via the command line. For command line operation, do the following:

·In the Start → Run Windows menu, type 'cmd' and click OK. A command line prompt window will appear;

·Type the path to the FlexiBRSvc.exe file (by default, "C:\Program Files\ABBYY FlexiCapture 12 Servers");

·Type "FlexiBRSvc Please obey" to enter the command mode. The commands are entered in the form of 'FlexiBRSvc Please '. The commands allow you to start or stop a station, display the stations list, start or stop the Processing Server, add or remove stations, view information about a station as well as to set server and station parameters;

·To show the list of allowed commands and other help information, type 'FlexiBRSvc.exe /?'.

For a more detailed description of all commands, see Description of Processing Server commands.


Licensing Server

The system requires a valid protection key which must be activated on the ABBYY activation server.

ABBYY FlexiCapture supports two types of protection key:

·hardware protection key

·software protection key

Hardware protection key

A hardware protection key is a "dongle" you plug into a USB port on your computer.

The hardware protection key must be plugged into a USB port on the computer on which you installed the Licensing Server. The hardware protection key can only be activated automatically via the Internet.

The parameters of your license are stored in the protection key. If you received your license on a USB dongle, you don't have to activate your license. Simply connect the USB dongle to the computer.

warning Important! To ensure the normal operation of the hardware protection key, make certain that the standard SmartCard is running.

Software protection key

A software protection key is a computer file ("license file").

The software protection key must be activated on the ABBYY activation server. Activation is performed in the ABBYY FlexiCapture License Manager, which starts automatically once the Licensing Server has been installed.

The data required for activation is sent to the server in the form of a Product ID which is generated based on the information about the computer on which ABBYY FlexiCapture is installed. No personal information is used to generate the Product ID and this code cannot be used to identify the user.

Activation methods:

·Automatically via Internet (recommended)
Activation over the Internet takes seconds to complete and requires an active Internet connection.

·By e-mail
An e-mail message is automatically generated on the computer where you installed the Licensing Server. This e-mail message contains the data required to activate your license file. To ensure a quick response form the activation server, please do not alter the text of this message.

·By e-mail from another computer
To send an activation e-mail message from a different computer, you must first generate an e-mail message on the computer where the Licensing Server is installed. Then paste the body text of this e-mail message into an e-mail on your other computer and sent it to the ABBYY activation server. To ensure a quick response form the activation server, please do not alter the text or subject of this message.

Repeat activation

You can re-install the Licensing Server on one and the same computer any number of times without activating it anew. However, if you make major changes to the hardware, format the hard drive, or re-install the operating system, you may need to activate the license file again.

For each serial number, the number of activations is monitored. If you exceed the maximum number of activations, you will no longer be able to activate your license file. You can release an activated license by initiating a deactivation procedure. This will decrement the activation counter.

Managing your licenses

Licenses can be added, activated, selected, deactivated and information about each license can be viewed in the ABBYY FlexiCapture License Manager, which is installed together with the Licensing Server.

To launch the ABBYY FlexiCapture License Manager select Start → All Programs → ABBYY FlexiCapture 12 Servers → FlexiCapture 12 License Manager.

Adding a new license

To add a license:

1.In the ABBYY FlexiCapture License Manager main window, click Activate....

2.Enter your new serial number, click Next and follow the instructions of the ABBYY FlexiCapture Activation Wizard.

note Note: If no licenses have been added, when you launch the ABBYY FlexiCapture License Manager, the ABBYY FlexiCapture Activation Wizard is launched automatically and the program prompts you to enter your serial number.

Updating a license

You can update your license by loading the up-to-date license information from the ABBYY registration server:

1.In the ABBYY FlexiCapture License Manager window, select the license to update and click Update....

2.Select an update method and update your license.

Selecting a working license

To select a license to be used:

1.In the ABBYY FlexiCapture License Manager window, select the license you wish to use.

2.Click the Select button or choose Select from the shortcut menu of the license.

For information about managing tenant licenses, see Administration and Monitoring Console Help.

License parameters

In the License Parameters field, you can view the following parameters for a selected license: serial number, license type, restrictions on the number of stations and development tools, time and performance restrictions, etc.

note Note: Depending on the license type, restrictions on the number of stations can be specified either separately for rich and Web-stations or together for both types of stations.

Deactivating a license

To deactivate a license, in the ABBYY FlexiCapture License Manager window, right-click the license to deactivate and select Deactivate from the local menu.


Authentication using SAML identity providers in ABBYY FlexiCapture 12

Navigation: ABBYY FlexiCapture architecture > ABBYY FlexiCapture servers >

Return to chapter overview

Authentication using SAML 2.0 identity providers in ABBYY FlexiCapture 12

Show/Hide Hidden Text

Overview of the authentication process

SAML authentication lets ABBYY FlexiCapture 12 users avoid sending identity data (such as a user name and a password) to the Application Server component of FlexiCapture by authenticating on a third-party identity provider (e.g. Google or Facebook) and then passing data about successful authentication by a trusted third party to the Application Server.

The SAML authentication process on a user application consists of the following steps:

o Authenticate on the third-party identity provider

o Get the user’s SAML authentication data from the third-party identity provider

o Send the SAML authentication data to the Application Server

o Receive an authenticated ticket from the Application Server

This ticket can then be used in requests to the Application Server.

note Note: The user account must exist in the FlexiCapture database and must have all of the required permissions.

Implementation

Getting SAML data

SAML data from the third-party identity provider is formatted as follows (this example is from OneLogin):

<?xml version="1.0" encoding="UTF-8" ?>
<samlp:Response xmlns:saml = "urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:samlp = "urn:oasis:names:tc:SAML:2.0:protocol" ID = "R85bc5e644b6749bf20939c99cacf35945d74bf48" Version = "2.0"
IssueInstant = "2016-09-15T09:56:20Z" Destination = "{recipient}" InResponseTo = "_1ba6250c-3c4e-49e1-9bff-fc82bc266b34">
<saml:Issuer>https://app.onelogin.com/saml/metadata/585198</saml:Issuer>
<samlp:Status><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/></samlp:Status>
<saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.0" ID="pfx5b0edaf1-7296-f635-b387-a964c92e4d5f" IssueInstant="2016-09-15T09:56:20Z">
<saml:Issuer>https://app.onelogin.com/saml/metadata/585198</saml:Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#pfx5b0edaf1-7296-f635-b387-a964c92e4d5f">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>udRgHOqBktJRsEzF5xkmJMOuwIk=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>LfHQBqg+S72CtSefOA8KMNxTUpOJcFCdemZ2BlCU/FR1n6pnLqZT6+m90729ciy7CNzT/w40GCcuVDggcgDKFqDb47Wzc6vs7ejC8W9OAdbJKXBK5jwYeYcJO4utN15k4e18Bv8zv96Bx/C8mBxcflSSP5C/tDAtbzvPBsyd25qADNTsKxwppZxAh4frdmSFQ4rYCOO1PnBFrS3zzguGXB9ZM0V9AAPYEJ5nU046NIVt3FTwZFoycZW2PxG+/o/JSXWS6loPnQZkWkTwrIuAcRh1dPlOSDvllGELD4Z7BN4wEVXOFBJtaU+ILlBgncNwQvFIGLF5a6YhG0hGYLaPsA==</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>MIIEDjCCAvagAwIBAgIUQWL60N8pdoL8VJeC0v2eJV6OL4AwDQYJKoZIhvcNAQEFBQAwVTELMAkGA1UEBhMCVVMxDjAMBgNVBAoMBUFCQllZMRUwEwYDVQQLDAxPbmVMb2dpbiBJZFAxHzAdBgNVBAMMFk9uZUxvZ2luIEFjY291bnQgOTE1MTcwHhcNMTYwOTA4MDkyNzA3WhcNMjEwOTA5MDkyNzA3WjBVMQswCQYDVQQGEwJVUzEOMAwGA1UECgwFQUJCWVkxFTATBgNVBAsMDE9uZUxvZ2luIElkUDEfMB0GA1UEAwwWT25lTG9naW4gQWNjb3VudCA5MTUxNzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK3vEVaTlbLjzwJPDpGCKC4TnCbnYMsxwInvKABFF4S21PYHG6M47zkO1MylP89BUXySk8TdeHb1Sd3upSoqGaM3uGd+/kv7KW71QQQG9AtczWom8VfPxju9L9t1bSsMVYjXGROv40H1Q99dGsFraiSvKAKUj5ABY6WdVNaKAU50y7XzbnwCGm65ErLwH4hW+t0wJew/hOWSb9grtKkBWNJN3BUGBOVG9YJD5U4OYGJJaeha/dvh+LpaKG2wT2EZUo/o6789bovh4VaTRqeuVruIyafxzljpOuyHSHu0JarsFqYR45NoMqMEJIbYcA62IeenAANpqwAWIb8+LPGr7YcCAwEAAaOB1TCB0jAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBS+6YWUYqLJeYXS8djijIaLxZlL+TCBkgYDVR0jBIGKMIGHgBS+6YWUYqLJeYXS8djijIaLxZlL+aFZpFcwVTELMAkGA1UEBhMCVVMxDjAMBgNVBAoMBUFCQllZMRUwEwYDVQQLDAxPbmVMb2dpbiBJZFAxHzAdBgNVBAMMFk9uZUxvZ2luIEFjY291bnQgOTE1MTeCFEFi+tDfKXaC/FSXgtL9niVeji+AMA4GA1UdDwEB/wQEAwIHgDANBgkqhkiG9w0BAQUFAAOCAQEAbSP3ubKUVG/Jg6jOGKQ46Rr6nSgP7Sf9zWF6a08eBHXbt3YalPR/ORp9aE+hL82S8QybNxM9fLUcEpRYzZRKysMr1rJ9slCulydCNNlopQN5j+Htfd1tbqINQNNgnnRJnwIHyitREufHQ3Zb9OWWktmyfKjHbtQe+lthCxaIfac6gcPqTIZKgLiTVdnkw/15LvBNkOnjdh6cK1cZF5MF6WdxozgQwvlVQlvh7Bm5UYZ9yQfvtUmOCq+o51cF/gm+VCKCdkeavXL9YZmh6Jk5AcVaF2od29b5rtJSlDbWUnVBFHppVJ2iaWXDHcU0Ms6+hp/LpQG18o4iO9oYw25fXA==</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</ds:Signature>
<saml:Subject>
<saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">maksim_p@abbyy.com</saml:NameID>
<saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<saml:SubjectConfirmationData NotOnOrAfter="2016-09-15T09:59:20Z" Recipient="{recipient}" InResponseTo="_1ba6250c-3c4e-49e1-9bff-fc82bc266b34"/>
</saml:SubjectConfirmation>
</saml:Subject>
<saml:Conditions NotBefore="2016-09-15T09:53:20Z" NotOnOrAfter="2016-09-15T09:59:20Z">
<saml:AudienceRestriction>
<saml:Audience>{audience}</saml:Audience>
</saml:AudienceRestriction>
</saml:Conditions>
<saml:AuthnStatement AuthnInstant="2016-09-15T09:56:19Z" SessionNotOnOrAfter="2016-09-16T09:56:20Z" SessionIndex="_e5832a70-5d47-0134-7b4f-026cc9f4032d">
<saml:AuthnContext>
<saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef>
</saml:AuthnContext>
</saml:AuthnStatement>
</saml:Assertion>
</samlp:Response>

For details on how to get authentication data from a third-party identity provider, see the identity provider’s documentation. For instance, OneLogin offers ready-to-use toolkits for enabling SAML authentication in several programming languages.

Sending SAML data to FlexiCapture 12 Application Server

Encode the SAML data in Base64 and send it to the Application Server by making a POST request to http://<Application Server>/Flexicapture12/Server/Saml. The name of the field containing the SAML data should be SAMLResponse.

public static async Task sendSamlToServer( string samlData )
{
string serviceUrl = "http://<ApplicationServer>/Flexicapture12/Server/SAML";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create( serviceUrl );
request.Method = "POST";

var fields = new Dictionary<string, string>();
fields.Add( "SAMLResponse", Convert.ToBase64String( Encoding.Default.GetBytes( samlData ) ) );
HttpClient client = new HttpClient();
FormUrlEncodedContent content = new FormUrlEncodedContent( fields );
HttpResponseMessage response = await client.PostAsync( serviceUrl, content );
if( response.StatusCode == HttpStatusCode.OK ) {
processServerResponse( response.Content.ToString() );
} else {
processServerError( response.StatusCode, response.Content.ToString() );
}
}

If you are using a tenant, add the tenant’s identifier to the server URL, e.g. http://<ApplicationServer>/Flexicapture12/Server/Saml?Tenant=MyTenantName

In order for authentication to work, a user with a login matching the identifier in the SAML data must be registered on the Application Server. The value of the /samlp:Response/saml:Assertion/saml:Subject/saml:NameID field will be used as the login.

The Application Server will return a response like the one below:

<authTicket>
<userName>maksim_p@abbyy.com</userName>
<ticket>82BD00C6601EB7F8EF4265450F934D4103C5CA2F010DE1C5FAB4CC830A82300C743D09E5477279733F283D0B6E1C93ACC30FE353D4D9396649965432AAA7994078C3CC63567A95A35E03DA6FDE020F57</ticket>
</authTicket>

The value in the <ticket> tag is the authenticated FlexiCapture 12 ticket. You can use this ticket to make calls to all Application Server interfaces that require authentication. Requests to FlexiCapture web services must be made using FlexiCapture authentication (addresses starting with http://<ApplicationServer>/flexicapture12/Server/FCAuth/ or http://<ApplicationServer>/flexicapture12/Server/MobileApp/).

Using the authenticated FC 12 ticket

You can pass the ticket to the server using a cookie file (the file must be named FlexiCaptureTmpPrn) or an Authorization: Bearer header. Example:

Authorization: Bearer 82BD00C6601EB7F8EF4265450F934D4103C5CA2F010DE1C5FAB4CC830A82300C743D09E5477279733F283D0B6E1C93ACC30FE353D4D9396649965432AAA7994078C3CC63567A95A35E03DA6FDE020F57

We recommend using the header. Cookies are supported for compatibility with older solutions.

If authentication succeeds, the server’s response will contain an updated ticket value both in a cookie file with the same login (FlexiCaptureTmpPrn) and in the AuthTicket header. The next request must be made using the updated ticket (tickets will expire after a certain amount of time).

Setting up a trusted certificate on the Application Server

The Application Server will check the data received from the identity provider. In order for the Application Server to trust this data, it should be signed with a custom certificate issued by an authority from the Application Server database of trusted authorities.

Import the certificate to the ABBYY FlexiCapture database. Now data will be checked using this certificate. For more information, see Setting up Single Sign-On.

If the check fails, the Application Server will refer to the AllowMixedModeCertificateValidation parameter in the <appSettings> settings in the Web.config file. If this parameter is set to true, the check will be carried out using the certificate added into the Trusted Root Certification Authorities folder in the Local Computer certificate store on the computer that is running the Application Server.

If no certificates are added to the database, the check will be carried out using the certificate located in the Trusted Root Certification Authorities folder, and the AllowMixedModeCertificateValidation parameter will be ignored.

Download the project and the accompanying materials: http://help.abbyy.com


File Storage Folder

Navigation: ABBYY FlexiCapture architecture > ABBYY FlexiCapture servers >

Return to chapter overview

File Storage

Project files (i.e. documents, Document Definitions, etc.) should be stored in a dedicated File Storage folder. The File Storage folder should be specified in the Administration and Monitoring Console. The File Storage folder should be located on the same computer that hosts the Application Server. Be sure to specify the local (i.e. c:\\...) and not the network (i.e. \\server\...) path to the File Storage folder. If no File Storage folder is specified, project files are stored in a database.

note Note: Storing files in a database can load SQL Server significantly, as images being processed usually occupy a lot of space. For this reason it is best to avoid storing project files in a database (however, you can store demonstration project files in a database).

The size of the File Storage folder depends on images being processed. The required size can be roughly estimated as follows: average size of image to be processed * number of images in set * 2.

note Note: The formula above does not apply to formats that use vector graphics, specifically PDF. Images in vector formats will be converted to a raster format during processing, which will significantly increase their size.


ABBYY FlexiCapture stations

The complex includes the following stations:

·Project Setup Station

·Scanning Station

·Processing Station

·Data Verification Station

·Verification Station

·Remote Verification Station

·Web Scanning Station

·Web Verification Station

·Web Capture Station

The complex also includes an Administration and Monitoring Console.

Differences between different types of stations are listed in the comparison tables.


Project Setup Station

The Project Setup Station is the station where projects are created, set up, and debugged. A project specifies Document Definitions, batch types, image import, document export, and processing options.

To create and set up a project:

1.Create a project and upload it to the Application Server.

2.Open the project on the server and set its properties.

3.Create Document Definitions.

4.Create Batch Types.

5.Create Image Import Profiles.

warning Important! Only the Administrator may create new projects. A Project Setup Operator can only set up already created projects.

Creating a new project

Once the Administrator has established a database connection, the Administrator should:

1.Launch the Project Setup Station (Start → All Programs → ABBYY FlexiCapture 12 Stations → Project Setup Station).

2.Create a project.

3.Upload the project to the Application Server.

After the project is uploaded to the Application Server, the Administrator may grant setup permissions for the project to a project setup Operator.

Project properties

To set project properties, the Project Setup Operator should:

1.Launch the Project Setup Station.

2.Select File → Open Project from Server... and specify the path to the Application Server. A Open Existing Project from Application Server dialog box appears.

3.Select the project from the list of all available projects.

4.Select Project → Project Properties... and specify the project properties: image pre-processing options, document recognition options, event handlers, export settings, and processing options.

Creating Document Definitions

To determine how document types are to be identified and processed, the Project Setup Operator should create Document Definitions. A Document Definition includes information about the structure of the document, the positions of its fields, export and document processing options, etc. Document Definitions are created in a Document Definition Wizard and properties are specified in a Document Definition Editor.

Creating Batch Types

ABBYY FlexiCapture can process documents in batches: prior to processing, a batch is created and the document images are placed in this batch, which then goes through the various processing stages. Typically, a batch contains all the documents processed at one go or all the documents imported from a particular folder. The settings to be used for processing the documents, are specified in the batch type. You can create several batch types for the most commonly used sets of processing options. In this case, each time an Operator creates a new batch, they can specify its type and the batch will be processed in accordance with the settings specified for this batch type.

note Note:

1.If no batch types are created, all batches are processed with the <default> settings specified for the entire project.

2.Documents can be verified or exported either in batches or individually. This is also specified in the batch type settings.

Creating Image Import Profiles

To automate the process of adding images, image import profiles can be created on the Project Setup Station. Two types of profile are available: one involving the use of a scanner and one involving the use of a Hot Folder. A scanner profile may be used to debug the project. A Hot Folder profile imports images automatically on the Processing Station.

note Note:

1.A scanner profile is only available on the Project Setup Station.

2.To import images from Hot Folders, you must enable Hot Folders for your project in the Administration and Monitoring Console (click Settings → Projects).


Administration and Monitoring Console

warning Important! For the correct operation of the Administration and Monitoring Console, make sure that your browser allows the use of JavaScript and pop-up windows.

The Administration and Monitoring Console is used to set up the entire complex and to monitor its operation.

The Administration and Monitoring Console is a Web interface available to the user of the Application Server and provides access to the server via an Internet browser. The console can be opened on any computer that can access the Application Server by typing http://<ApplicationServer>/FlexiCapture12/Monitoring in the browser, where <ApplicationServer> is the name of the computer on which the Application Server is installed.

The Administration and Monitoring Console is launched immediately after the Application Server is installed, enabling the Operator to establish a database connection.

Besides connecting to a database, the Administrator must set up user access permissions and distribute the Operator roles.

warning Important! The permissions granted to the Administrator, Monitoring Operator, and Processing Server roles apply to all the projects. Therefore, they can be set up immediately after the database connection is established. Permissions to all other Operators are granted for individual projects. Therefore, before granting permissions to other Operators, the Administrator must create projects and upload them to the Application Server. Unless there are projects on the Application Server, the Administrator will not be able to add Operators and grant them access permissions.

Access permissions granted to a Monitoring Operator have the following restrictions:

·Deleting sessions on the Monitoring → Sessions page is not allowed. Viewing the page is allowed.

·Deleting batches on the Monitoring → Batches page is not allowed. Viewing the page is allowed.

·Viewing all pages on the Settings tab (Application Server, Cleanup, Out-of-Processing Documents, Event logging mode, Users, Groups, Requests) is not allowed.

Once the complex is set up, the Administration and Monitoring Station can be used to monitor the operation of the complex (i.e. to track the current status of the complex and generate reports). Based on the information about the current status of the complex, the Administrator makes changes in the configuration or re-allocates resources.

The Administrator may review the statuses of Batches, Tasks, Sessions, Current processing status, Event log and Error log.

To review the statuses, select a project and then select the appropriate item from the Monitoring menu. The resulting list can be viewed on-screen, printed out, or saved in CSV format.

The Monitoring Operator can not only obtain information about the current status of the complex, but also generate reports about the operation of the complex.

The following reports can be created:

·Productivity report allows you to assess the productivity of ABBYY FlexiCapture or individual tenants.

·Processing report allows you to calculate the average processing productivity and the processing productivity for a specific time period and compare it against a larger time period.

·Operators report allows you to evaluate the productivity of each Operator involved in the manual processing stages.

For detailed information about the Administration and Monitoring Console, see Administration and Monitoring Console Help.


Scanning Station

warning Important! For detailed information about the station, see Scanning Station Help.

The purpose of the Scanning Station is to facilitate scanning large amounts of documents. The Scanning Station can work both in a local and a remote network (via the Internet). Authorization is carried out using a login and a password.

The Scanning Station may be the first station into which a document arrives. The station is operated by a Scanning Operator, who can add images using one of the following two methods:

·create and use scanning profiles and/or add images manually;

·add the images of already scanned documents from a folder.

Profiles automate the process of acquiring images, enabling the Operator to add images using the previously made settings with only one click of the mouse.

Besides adding images, the Scanning Operator may edit added images (see Scanning Station Help for details).

The typical sequence of actions performed by the Scanning Operator would be as follows:

1.Launch the Scanning Station and receive batch types from the server if the corresponding option is specified in project setting or Scanning Station settings. If batch types are not loaded automatically, you can load them manually after the Scanning Station is launched.

2.If there is an unfinished batch left on the station, continue processing this batch. Otherwise, create a new batch.

3.If import profiles have already been created, select the appropriate profile and start the scanning process. If there are no ready-made profiles, create the necessary profiles and use them to scan the documents.

4.When adding the images, the Operator may visually control their property and edit them if required. If mere will not solve the problem, the Operator may change the scanning options and rescan the faulty pages.

5.Control the quality of document assembly and correct any assembly errors.

6.Once the batch is ready, specify its registration parameters and send it to the server.

7.Repeat the above steps for the next batch of images or shut down the Scanning Station.


Data Verification Station

The purpose of the Data Verification Station is to verify unreliably recognized characters. The Data Verification Operator reviews uncertain characters first in group verification mode and then in field verification mode. The Data Verification Station can work both in a local and a remote network (via the Internet). Authorization is carried out using a login and a password.

In group verification, the Operator is displayed groups of similar characters. The Operator should spot any incorrectly recognized characters and correct them, comparing them against the image of the corresponding field if required. If, for any reason, a character cannot be corrected, the Operator marks it as uncertain.

In field verification, the Operator is displayed fields whose value ranges are known in advance. The Operator should verify the uncertain character by examining them in their context. Two views are available in field verification: single-field display with extracted characters and multiple-field display, which shows all identical fields in the same screen.

note Note: Besides the Data Verification Operator, the Data Verification Station may be accessed by the Verification Operator and Senior Verification Operator. Whichever Operator is working on the station, they can only access the data verification queue.

To start data verification:

1.Launch the Data Verification Station by selecting Start → All Programs → ABBYY FlexiCapture 12 Stations → Data Verification Station.

2.Select the appropriate project.

3.Click GetTask to start verification.

note Note: First comes group verification, followed by field verification. If a Document Definition has no fields included in group or field verification, the document is not queued for verification.

You can enable the automatic mode of getting tasks by clicking [image] or Task → Automatic Task Receive.

Once the data verification is over, the batch or set of documents is sent to the next processing stage which is defined by workflow settings.

If the Data Verification Operator encounters problems processing the documents, they can send the batch or documents into the Exceptions stage by clicking [image].


Verification Station

The Verification Station allows more complex checks than the Data Verification Station. Besides verifying the data, the station allows its Operator to process problem batches or documents, correct assembly errors, apply data rules, and check batches for integrity. The Verification Station can work both in a local and a remote network (via the Internet). Authorization is carried out using a login and a password. For more details, please see Remote Verification Station.

The Verification Station can be operated by the following Operators: Data Verification Operators, Verification Operators, and Senior Verification Operators. Depending on which role the Operator selected when logging onto the station, they see and can process tasks from different queues:

·A Data Verification Operator can process only tasks from the Data Verification queue

·A Verification Operator can process tasks from any stage except the Exceptions stage and the Export Confirmation stage

·A Senior Verification Operator can process tasks from any queue. Besides the list of queues, the Senior Verification Operator can also access the list of certain batches (for details, see the description below) and the view mode for each stage where a particular task from the queue can be selected.

note Note: The Administrator can create additional processing stages and the corresponding queues. Whether an Operator can access these queues depends on the Operator's role and on the required permissions for these queues (these permissions are defined by the Administrator).

note Note: The list of available roles depends on the Operator's access permissions. If only one role is available to the Operator, the list of roles is not displayed.

The following queues are available on the Verification Station:

·<Any>
This queue includes tasks created in any of the other queues. The list of queues available to an Operator depends on the role selected by the Operator when logging onto the station. The tasks are taken in the order of their priority.

·Data Verification
The data verification process starts with group verification followed by field verification. If a Document Definition has no fields included into group or field verification, the document is not placed in the data verification queue.

·Document Assembly Check
For multi-page documents, document assembly errors may have to be corrected. Document assembly rules are created together with Document Definitions and define the order of pages and the number of page repeats. Additionally, document assembly may be checked based on key field values, in which case the values of the key fields must be the same on all the pages of a document. If the values differ, an error message is displayed and the values are highlighted in red. Assembly errors are best corrected in the page thumbnail view, as it provides a clear general view of the pages and it becomes immediately clear to which document they belong.

·Verification
If no special queues are specified by the processing parameters, the Verification queue contains all tasks with document assembly errors, data verification errors, and rule errors.

·Batch Integrity Check
The rules used for data integrity checks establish links among the data in the documents of a batch.

·Export Confirmation
Data export can be initiated manually or automatically. If the processing parameters do not define a separate Export Confirmation queue, the documents are exported automatically. If the processing parameters include a separate Export Confirmation queue, the Senior Verification Operator must first check documents of the task after which the task is sent to the Export queue. If an error occurs in the Export stage, the documents are automatically sent to the Exceptions queue.

·Exceptions
Problem batches or documents, which the Operators or stations failed to process, are sent to the Exceptions queue.

note Note: The document processing parameters (i.e. separate queues) are specified for batch types or for the entire project if no batch types are used.

To perform a task, select the desired queue in the list of queues and click GetTask.

You can enable the automatic mode of getting tasks by clicking [image] or Task → Automatic Task Receive.

On the Verification Station task documents preview is available in Details and Thumbnails view modes. In Details view, only the documents of the active task are displayed.

In addition to the list of task queues, the Senior Verification Operator also has access to a list of batches from the project that he has permissions for. These permissions and other Operator permissions can be assigned from the Administration and Monitoring Console. To view the list of batch, click Batches on the View menu or click the batch button on the toolbar.

In the batches view mode the Operator can get access to information about the batch confidence level, the number of pages and documents, the batch type, etc. With a mouse selection of a batch in the list you can send the selected batch to any processing stage, specify the batch priority, select a particular user to verify the batch and add comment. Thus you can collect documents, which belong to one batch, from different processing queues, and send them to one stage.

With a double-click you can open the batch to look through the list of documents, verify data, correct possible rule and assembly errors, etc. With a mouse selection of one or several documents, you can send the selected documents to a processing stage and create a separate task for them.

To mark selected documents for sending to Exceptions, Rescanning or any processing stage, select the corresponding item from the Task menu or in the document local menu. In the dialog box that opens, you can enter your comment or choose a comment from the Recent Comments list. You can choose from 10 latest comments to the sent tasks. If you want to edit text of a comment from the list, choose the desired comment, click OK and edit the text of the comment in the input field. If there is a rarely used comment in the list, you may delete it.

The list of comments is stored in the registry branch

[HKСU\Software\ABBYY\FlexiCapture\12.0\Shell\Stages\RecentStageCommentList]

Comments in the string are separated by a comma. If the comment text contains a comma, the comma is written as "/,". The symbol of a new line "/" is written as "//". A multiline comment is displayed as a single line divided by spaces. In comment text, any characters can be used.

Thus, different FlexiCapture users working in the local Verification station within a single Windows user session, use the same list.

For documents sent to Rescanning, you can also specify the Operator, the task will be assigned to. By default the Operator who scanned the document is selected. If this Operator does not have necessary permissions or images were imported from a Hot Folder, the user 'Any' is specified as a Scanning Operator.

Once the task is closed, documents marked for sending will be sent to the corresponding processing stages.

note Note: When sending batches to stages, make sure that the documents of the batch do not belong to already created tasks, otherwise empty tasks will be created. You can check whether the document belongs to a task in the Task ID column.


Remote Verification Station

Like the regular Verification Station, the Remote Verification Station is used for verifying data, processing problem batches or documents, correcting assembly errors, applying data rules, and checking batches for integrity.

The Remote Verification Station is intended for remote users who do not have access to the local area network where the ABBYY FlexiCapture servers and other components are installed. For more information about differences between the Remote Verification Station and the regular Verification Station installed locally, see Differences between stations.

Applying Document Definitions on the Remote Verification Station

The Remote Verification Station allows you to match Document Definitions to documents and pages. To change a Document Definition for a document, right-click the document or one of its pages and then click the Match Document Definition item on the shortcut menu. The document will be automatically re-recognized.

If you need to mark a page as an annex page, right-click the page and then click the Set Page as Annex item on the shortcut menu.

To clear the recognition results for a document or page, right-click the document or page and then click the Clear Analysis Results item on the shortcut menu.

note Note: On the Remote Verification Station, the Rerecognize, Reanalyze, and Recheck Rules commands are only available for documents that have already been recognized on the server. If the Remote Verification Station receives a document that has not been recognized, the document must be sent to the recognition stage before you can use these commands. You will still be able to match a Document Definition to a non-recognized document, but the document will not be automatically re-recognized. Instead, the document will be marked as "for processing" and sent to the server for recognition. The name of the Document Definition will appear in the Sending Note column.


Web Scanning Station

Web Scanning Station is used to scan paper documents and then send them to ABBYY FlexiCapture server for further processing. The Operator scans images or loads them from files, corrects them (if necessary) and then sends them to the server.

The Web Scanning Station works via the Internet. For connection to the station, either Basic authentication or authentication by means of FlexiCapture Authentication Module can be used. For login to the station, use the following link:

http://<ApplicationServer>/FlexiCapture12/Scanning - for login to the Web Station that uses HTML5

, where <ApplicationServer> is the name of the computer on which the Application Server is installed.

For more details on the Web Scanning Station, please refer to the Web Scanning Station help pages.

See also:

Tables of differences


Web Verification Station

Web Verification Station is used to verify the data, process problem batches or documents, correct assembly errors, apply data rules, and check batches for integrity. Web Verification Station can be operated by Operators with the following role types: Data Verification Operators, Verification Operators, and Senior Verification Operators. Depending on which role the Operator selected when logging onto the station, they see and can process tasks from different queues.

The Web Verification Station works via the Internet. For connection to the station, either Basic authentication or authentication by means of FlexiCapture Authentication Module can be used. For login to the station, use the following link:

http://<ApplicationServer>/FlexiCapture12/Verification - for login to the Web Station that uses HTML5

, where <ApplicationServer> is the name of the computer on which the Application Server is installed.

note Note: Configuring access to operations on data and access to operations on tasks is not supported for the Web Verification Station custom role. Only the standard operator role configuration is available (Data Verification Operator, Verification Operator, Senior Verification Operator).

For more details on the Web Verification Station, please refer to Web Verification Station Help.

See also:

Tables of differences


Web Capture Station

The Web Capture Station is used to contribute information from paper documents to the system. The Operator scans paper documents, corrects scanned images (if necessary), verifies and corrects the recognized data, and then exports the corrected data.

The Web Capture Station works over the Internet. To connect to the station, either Basic authentication or authentication by means of the FlexiCapture Authentication Module can be used. To log in to the station, use the link http://<ApplicationServer>/FlexiCapture12/CaptureLegacy, where <ApplicationServer> is the name of the computer on which the Application Server is installed.

note Note: Some features of the rich stations are unavailable when working via the Web interface, for example:

·automatic checking of some rules (the check is performed when the user clicks the Check rules button or accepts a document or a batch)

·document analysis and re-recognition (for non-matched or incorrectly matched fields, the values must be entered manually; for FlexiLayouts, you can also use fast input of recognized data from the cache). Documents with fixed layout can be sent to the server where fields are re-recognized. Besides, for documents with both fixed and flexible layouts, you can mark Document Definitions to be matched and then send the documents to the Recognition stage for matching.

Once a batch has been processed, the processing results can be downloaded to the Operator's computer. To enable the Operator to download results, the project properties and the Document Definition should be set up as follows:

·in the Project Properties dialog box, the Export root path field must be left empty

·in the Document Definition, the export type must be set to Export to image files or Export to data files and a relative, not an absolute, path to the export files must be specified (e.g. Export\Results).

In this case, export results will be stored in the ABBYY FlexiCapture database (or in the File Storage Folder) and will be available for download by the Operator who exported them until the corresponding batch is removed from the server.

note Note: The Document Definition may include other export profiles, e.g. export to SharePoint. In this case, the Operator will be able to download export results for all the profiles that have been set up as described above.

note Note: It is strongly recommended to set up automatic cleanup to prevent storage overflow.

note Note: Configuring access to operations on data and access to operations on tasks is not supported for the Web Capture Station custom role. Only the standard operator role configuration is available (Data Verification Operator, Verification Operator, Senior Verification Operator).

For detailed information about using the Web Capture Station, please refer to the Web Capture Station Help system.


Processing Station

Processing Stations run in unattended mode and handle the following tasks: loading images from Hot Folders, applying Document Definitions and recognizing documents, exporting data to predefined storage locations. The Processing Stations receive tasks from the Processing Server.

To view the current tasks:

1.Launch the Processing Station Monitor by selecting Start → All Programs → ABBYY FlexiCapture 12 Stations → Processing Station. A Connect to Station dialog box opens.

note Note: To start the Processing Station, in the Processing Server Monitor, select a station and start it by selecting Start from the Actions menu or from the local menu of the station or by clicking the corresponding button on the toolbar. The station will run as a service.

2.Locate the Processing Server.

oNetwork host and the name of the computer on which the Processing Server is installed (if the Processing Server and the Processing Station are installed on different computers)
or

oLocal host (if the Processing Server and the Processing Station are installed on the same computer)

All the active tasks are displayed in the Tasks column. The following information is available for each task: start time, progress, status, priority, station, and creator. The tasks can be sorted by clicking on the name of the desired column.


Differences between stations (sorted by deployment type)

Show/Hide Hidden Text

ABBYY FlexiCapture Distributed stations can be deployed in a variety of different ways, with their architecture set up according to a customer’s specific needs. Stations can be deployed on a server or on a local machine. They can also be configured to be remotely accessed through a browser without the need to install the software locally. The stations are designed to be deployed and used without the need to always be connected to the server via the Internet, meaning that the software can be set up to be accessed remotely. This section describes the functional differences between the different stations, sorted by deployment type.

Scanning Station

Rich | Web HTML5 | Remote | ClickOnce
Installation
Windows Installer Package (usual, silent or advertise installation) | Installation of ABBYY Scanning Plugin required during the first launch | Windows Installer Package (usual, silent or advertise installation) | ClickOnce installation (single click on a link in a web browser)
Authentication
Windows, Basic, FC | Windows, Basic, FC, Single Sign-On | Windows, Basic, FC | Basic, FC
Interacts with (protocol)
Application Server (http, https) | Application Server (http, https) | Application Server (http, https) | Application Server (http, https)
Scanning interface
ISIS, TWAIN, WIA | TWAIN | ISIS, TWAIN, WIA | TWAIN
Barcodes recognition
Automatic during images adding, manual by user command | Automatic during images adding | Automatic during images adding, manual by user command | Automatic during images adding, manual by user command
Empty Page Detection
Automatic during images adding, manual by user command | Automatic during images adding | Automatic during images adding, manual by user command | Automatic during images adding, manual by user command
PDF opening and exporting
yes | yes (scanning plugin with PDF support) | yes | no
Export destinations
FC, ftp, files, script | FC | FC, ftp, files, script | FC, ftp, files, script
Working with attachments
yes | no | yes | yes
Documents assembly (automatic and manual)
yes | yes | yes | yes
Centralized Batch Type Management
yes | no | yes | yes
Sending batches according to schedule
yes | yes | yes | yes
Image Editing
Setup and configuration of image enhancement profiles | Rotate, Flip, Invert, Convert to bw, Deskew, Despeckle | Setup and configuration of image enhancement profiles | Setup and configuration of image enhancement profiles
Rescanning
yes | yes | yes | yes
Document set support
yes | no | yes | yes
Custom scripts
yes | no | yes | yes
Manual scanning of multiple batches
yes | no | yes | yes

Data Verification Station

Rich | Remote
Installation
Windows Installer Package (usual, quite or advertise installation) | Windows Installer Package (usual, quite or advertise installation)
Authentication
Windows, Basic, FC | Windows, Basic, FC
Interacts with (protocol)
Application Server (http, https) | Application Server (http, https)
Format checks
yes | yes
Rules
yes | yes
Results saving
yes | yes
Distributed data verification (verification of different document fields by different Operators)
yes | yes

Verification Station

Rich | Web HTML5 | Remote
Installation
Windows Installer Package (usual, quite or advertise installation) | No installation required | Windows Installer Package (usual, quite or advertise installation)
Authentication
Windows, Basic, FC | Windows, Basic, FC, Single Sign-On | Basic, FC
Interacts with (protocol)
Application Server (http, https), Protection Server (TCP/IP) | Application Server (http, https) | Application Server (http, https)
Data Verification
yes | no | yes
Rules check
Yes (local) | Yes (format errors and some rules checked locally, the rest is done on server) | Yes (local)
Fields re-recognition
Local | On server | Local
Manual Document Definition matching
Yes, with local re-recognition | Yes, with server re-recognition | Yes, with local re-recognition
Distributed data verification (verification of different document fields by different Operators)
yes | no | yes
Double data verification
yes | no | yes
Assembly errors correction
yes | yes | yes
Image Editing
Application of image enhancement profiles | Rotate | Application of image enhancement profiles
Adding new images in a batch
yes | no | no
Work under different roles
yes | yes (except the data verification operator role) | yes
Document set support
yes | no | yes
Permission support
yes | no | yes
Custom scripts
yes | no | yes
Thumbnails view
yes | yes | yes
Working with data sets
yes | yes | yes
Editing data sets (Invoice project only)
yes | yes | no

Web Capture Station

Web HTML5
Installation | No installation required
Authentication | Windows, Basic, FC, Single Sign-On
Interacts with (protocol) | Application Server (http, https)
Scanning interface | TWAIN
Barcodes recognition | Automatic during images adding
Empty Page Detection | Automatic during images adding
PDF opening and exporting | yes (scanning plugin with PDF support)
Scripts | no
Export destinations | FC
Working with attachments | no
Documents assembly (automatic and manual) | yes
Centralized Batch Type Management | yes
Sending batches according to schedule | yes
Exceptions queue | no
Image Editing at Scanning stage | Rotate, Flip, Crop, Invert,Convert to bw, Deskew, Despeckle
Rules check | Yes (format errors and some rules checked locally, the rest is done on server)
Fields re-recognition | On server
Manual Document Definition matching | Yes, with server re-recognition
Assembly errors correction | yes
Image editing at Verification stage | Rotate
Thumbnails view | yes
Working with data sets | yes


Processing stages and queues

Documents are processed in several stages, with certain routines performed at each stage, either automatically or assisted by the Operator. The stages have a specific order and to go through a particular stage the documents must first go through the previous stages. On the whole, the following stages are required: adding images, recognition, verification, export.

At each stage, a processing queue is formed (see Task creation for details). A queue represents a set of tasks in the corresponding stage. As the processing progresses, the documents are moved from the first queue (Scanning) towards the last queue (Processed).

In the case of large processing volumes, the verification stage can be subdivided into smaller stages, each processed by its own Operator. In other words, you can create separate stages for data verification, verification, document assembly checks, and export confirmation.

Some of the processing stages are required, while the other are optional. Whether the stage is required or not depends on the selected workflow scheme.

Stages

1.Scanning
Tasks from this stage are processed on the Scanning Station. In the Simple mode, the entire batches are processed.

2.Rescanning
Tasks from this stage are processed on the Scanning Station. The task is always sent to the Operator who did the scanning.

3.Recognition
Recognition is done automatically on the Processing Station. In the Simple mode, the entire batches are processed.

4.Document assembly check
The tasks from this stage are processed on the Verification Station. If no separate document assembly stage is specified in the settings, batches or documents with errors are processed in the verification stage.

5.Data verification
The tasks from this stage can be processed on the Data Verification Station or on the Verification Station.

6.Verification
If no separate stages are specified, all tasks with document assembly errors, data errors, and rule errors are sent to the verification stage. The tasks from this stage are processed on the Verification Station.

7.Batch integrity check
Batches with integrity errors are sent to this stage. Integrity check options are specified by scripts when setting up a batch type. The tasks from this stage are processed on the Verification Station.

8.Export confirmation
A stage which ensures greater accuracy of the captured data. A batch or document is exported only after the Operator confirms that it is suitable for export. The tasks from this stage are processed on the Verification Station.

9.Export
The tasks from this queue are processed on the Processing Station.

10.Processed
Processed documents are sent to this stage.

11.Exceptions
Documents with errors are sent to this stage after automated processing. Besides, Operators may also send documents to this stage if for some reason these documents cannot be processed.

If some of the batch documents are sent to Exceptions, the whole batch is excluded from processing and is not exported.

Task creation

To achieve the maximum efficiency during processing large amounts of documents, batches can be splitted into separate tasks.

Tasks are created from documents on the Application Server when documents arrive in the stage and become available for processing. Tasks are formed depending on the specified workflow settings.

In the Advanced mode, the number of documents in the task can be specified in the stage properties.

If the Wait for all documents of a batch option is selected, documents will be sent to the next stage only when all of them are processed in the current stage.

In the batch integrity check stage, access to all documents of the batch is required, so in this stage the Operator always receives the whole batch.

It is also possible to send to the stage the tasks that were created earlier, e.g. when sending documents to a stage from the Verification Station provided that the Create task option was selected in the Send To... dialog box.

note Note: For tasks created in earlier versions of ABBYY FlexiCapture or tasks that dropped out of processing, new tasks must be formed in the Administration and Monitoring Console.

The workflow mode is specified in the Batch type settings.

See also:

details Workflow


Workflow

Both pre-configured and custom schemes can be used for processing documents. Pre-configured processing schemes can be either unattended (the Unattended mode) or involve human Operators (the Simple mode). A custom processing scheme is configured in the Advanced mode. There is also a special mode for Web Capture station.

Specifics of the Simple, Advanced, Unattended and for Web Capture station modes

·In the Simple mode, human Operators are involved. In this mode, separate stages can be used for rescanning, data verification, document assembly check, verification, batch integrity check and export confirmation. For data verification, document assembly check, verification, batch integrity check and export confirmation stages, it is also possible to use web-stations. Documents (or entire batches) can go through these stages automatically (if there no processing errors) or after they are checked and corrected by an Operator. If an error occurs, the document is sent to the exceptions stage. Likewise, an Operator may send a document to the exceptions stage.

·In the Advanced mode, complex workflow schemas can be configured. In this mode, it is possible to modify settings of base stages as well as create custom stages and include them in the processing schema. You can also enable double verification, thereby documents will be verified by two different Operators in the Data Verification Station. In this mode you can also use scripts to process documents or entire batches.

·In the Unattended mode, no Operator involvement is required to process and export documents. In the event of an error, the unrecognized image may be saved to a dedicated folder, which can be selected on the Export tab, while the successfully processed documents are automatically exported. In the Unattended mode, batches are processed in their entirety.

·In the for Web Capture station, you can specify the condition under which documents are sent to verification. This mode applies to document processed in the Web Capture station.

The order of processing is specified for each batch type. When a new batch is created, it is assigned a type, which predetermines the order of processing.

If no batch types are created, all batches are processed with the <default> settings specified for the entire project.


Using scripts in ABBYY FlexiCapture

This section describes how to use scripts for customizing processing stages and the stations interface in ABBYY FlexiCapture.

Supported scripting languages

ABBYY FlexiCapture supports the following scripting languages: C#.Net, VisualBasic.Net, JScript.Net, JScript®, JScript.Compact and VBScript.

listPicture Specifics of scripts written in .Net languages

Specifics of usage

In VBScript it is mandatory to use the keyword "Me" when passing a NULL value (the alternative of "this" in JScript), while in .Net languages the NULL value is passed as an ordinary parameter.

For each script, access permissions for all its parameters are originally known. Access permissions determine the subset of methods that are available from scripts. When addressing the object methods, permissions for returned objects are always inherited from the source object (exceptions from this rule are described in comments to the corresponding methods).

note Note: Script objects cannot be used after completion of the script because of indeterminate object behavior.

note Note: For debugging scripts written in ABBYY FlexiCapture script editor, the MessageBox method can be used.

Custom functions

The script editor allows users to create their own functions and procedures and then to call them from the code of scripts.

Custom functions and procedures should be written to the global module, which can be accessed from the Script Editor. For this, from the drop-down list on the toolbar of the script editor, select an available global module: Rule Global Script Module, Export Global Script Module, Events or NonInteractiveProcessor.

All functions within one module must be written in the same language. The core code of a script can be written in a language different from that used in the corresponding global module.

Global functions written in JScript®, JScript.Compact and VBScript scripting languages can be called from scripts also written in one of these languages. For example, from the code of a rule written in VBScript you can call a function contained in the global module that is written in JScript.

Global functions written in .Net languages can be called from scripts which are written in one of .Net languages (C#.Net, VisualBasic.Net or JScript.Net).

To call a function from its global module, a corresponding prefix (Rules, Export, Events or NonInteractiveProcessor) must be used. For example, the function DoSomething from the Rule Global Script Module module must be called as follows: Rules.DoSomething ().

note Note: For scripts written in .Net languages, functions from global modules are called by their names without using prefixes.

note Note: You cannot use RTL languages for text constants in the script editor. If you need to add RTL text into your script, use one of the following workarounds:

1.Place your RTL text into a user script message or an environment variable.

2.Use an external assembly for your project or Document Definition (for more information, see External assemblies).

Script execution timeout

The default timeouts are 30 seconds for export and 10 seconds for other scripts.

To change the default timeouts, specify the following value in the registry:

HKEY_CURRENT_USER\Software\ABBYY\FlexiCapture\12.0\Controller\ScriptSupport\DefaultScriptTimeout

The value of a timeout in the registry is specified in milliseconds. If a script takes longer to execute than the specified timeout, it will be terminated and an error message will be returned "Script execution timeout". If the script is a part of import, recognition or export task, a similar error message will be recorded in the log.

warning Important! Script execution timeout applies for scripts written in JScript and VBScript only.

warning Important! To change timeouts for scripts executed under the NetworkService, you need to modify the registry branch for the corresponding user profile.

Object model

The object model is compatible with scripts created in earlier versions of ABBYY FlexiCapture.

Read more about the object model


Specifics of scripts written in .Net languages

This section describes specifics of scripts written in .Net languages.

·Additional keywords are not used to access object members. For example, in rules written in .Net languages the context of the rule is passed as a parameter with the name "Context".

·.Net assemblies should be compiled using Microsoft .Net Framework 4.0 and above. You can specify a desired .Net Framework version in the properties of your Visual Studio project.
It is possible to add an external assembly that can be used in scripts and global modules. Both standard and compiled user assemblies can be used. All classes of the added assemblies will be available in scripts and global modules. See External Assemblies for details.

·Once the script is compiled, a compiled script body is stored in the same location where the script is defined. Thus .Net script can occupy more space than other scripts.

·All FlexiCapture objects are defined as COM-objects, so functioning of .Net scripts can be slowed down when addressing object fields frequently because of managed-unmanaged transitions.

·FlexiCapture objects do not support multithreading.

·For debugging .Net scripts, the System.Diagnostics.Debugger.Break method is used.

·When debugging .Net scripts, you also need a *.pdb file with debugging information. This file can be very large and we do not recommend storing it in the project together with your scripts. However, when debugging a .Net script, you must specify that the script should be compiled using certain debugging information.
If you use Microsoft Visual Studio 2010, you can attach to the process where the .Net code is executed.

·FlexiCapture script objects are stored in the ControllerInterop.dll and ShellInterop.dll assemblies and belong to the ABBYY.FlexiCapture and ABBYY.FlexiCapture.ClientUI namespaces, accordingly. The assemblies are located in the root folder of the program.

·All ABBYY FlexiCapture script objects are accessible under their own names from the ABBYY.FlexiCapture and ABBYY.FlexiCapture.ClientUI namespaces. For example:

ABBYY.FlexiCapture.IDocument document = Batch.Documents[i];>
ABBYY.FlexiCapture.ClientUI.IToolbars toolbars = TaskWindow.MainWindow.Toolbars;

·The "Using" directives can be written in the beginning of the script body together with comments and empty strings. The same syntax as in the programming language is used (using for C#.Net, Import for JScript.Net and Imports for VisualBasic.Net). For example:

using System.Drawing;
Image img = Image.FromFile( @"D:\2.png" );
FCTools.ShowMessage( img.VerticalResolution.ToString(), false );

note Note: You can use the using directive in the script editor, provided that the keyword "using" occurs before the first line of the executable code. For example:

using ABBYY.FlexiCapture;
using ABBYY.FlexiCapture.ClientUI;

·In .Net scripts, functions from all global modules are called directly without using the name of the global module.

note Note: Classes defined in the Rule Global Script Module and in the Export Global Script Module must have different names. Otherwise, when creating an instance of class in the code of rule, an error will occur.

·If you do not want to specify the value of an optional parameter of the function (for functions with optional parameters), you must pass System.null or System.Type.Missing instead.

note Note: For scripts, that are executed noninteractively (that is by FlexiEx.exe process instead of FlexiCapture.exe), the Debug button is not displayed for the FlexiEx.exe process in the "Checking for solution" window by default (for scripts, that contain a breakpoint). For the button to be displayed, click on the Action Center icon on your task bar and select Change Action Center settings → Problem reporting settings → Never check for solutions.


External assemblies

It is possible to use external assemblies in scripts and global modules. Both standard and compiled user assemblies can be used.

Adding external assemblies

An assembly can be added on the .Net References tab of the batch type properties, project properties or Document Definition properties. All classes of the added assemblies are available in scripts and global modules.

Assemblies added in batch type properties and Document Definition properties are available to a particular batch type or Document Definition respectively. Assemblies added in project properties are shared assemblies which are available to all batch types and Document Definitions of the given project. So if you need to use the same assembly for different batch types and Document Definitions, you can use a shared assembly. If a shared assembly must be updated, you need to update it in project properties only.

To add an assembly in project properties, do the following:

1.On the .Net References of the project properties, click Add...

2.In the Add Assembly dialog box that opens select the type: Standard assembly name or Attached file.

3.Depending on the selected type either enter the standard assembly name or browse to an assembly file.

A shared assembly is added to newly created batch types automatically. To add a shared to Document Definitions and existing batch types, do the following:

1.On the .Net References of batch type or Document Definition properties, click Add...

2.In the Add Assembly dialog box that opens select Shared assembly.

3.Select the assembly name from the Reference list.

note Note: You cannot add a shared assembly with a name which is similar to the name of an existing standard assembly.

Below is a sample code of the user assembly that contains a namespace, a class and a method of this class:

namespace TestNameSpace
{
public class Test
{
public void Show(string text)
{
// will show text by standard FlexiCapture means static method void ShowMessage(string text, bool IsError) from static class FCTools ABBYY.FlexiCapture.FCTools.ShowMessage(text, false);
}
}
}

For classes and methods of an added assembly to be accessible to the event handler scripts, it must be added on the .Net References tab of the batch type properties (for a particular batch type) or project properties (for the Default batch type).

For the following scripts, external assemblies are added on the .Net References tab of the Document Definition properties:

·script rule

·autocorrection script

·export script

·user script

·document assembly script

·custom recognition script

The script using classes and methods from the external assembly must contain the following code:

TestNameSpace.Test test = new TestNameSpace.Test(); // creates an object of Test class
test.Show("hello world"); // calls void Show() method from Test class

Debugging external assemblies

When debugging external assemblies, both the assembly file and a .pdb-file with symbolic information are required. Only assemblies with loaded .pbd files can be debugged. As pbd-files are rather large, it is better to disable loading symbolic information in the working project.

Registry keys that control the loading of symbolic information

You can use the following registry keys to specify whether .pdb-files should be loaded:

·HKEY_CURRENT_USER\Software\ABBYY\FlexiCapture\12.0\Controller\ScriptSupport\ [LoadSymbolsFromOriginalPath] - specifies whether to load pdb-files from the original folders of the assembly files (set the key value to true to load .pdb-files);

·HKEY_CURRENT_USER\Software\ABBYY\FlexiCapture\12.0\Controller\ScriptSupport\ [PDBSearchLocations] = - sets the search paths for .pbd-files (paths must be listed separated by semicolons; the search result is a .pdb-file with symbolic information whose name coincides with an assembly name).

These keys are not created in the registry by default. If required, the Administrator may add these keys into the registry of the user's operating system.

For the changes in the registry to take effect, you need to restart the program.

For debugging an assembly, connection to managed code must be used.


Script editor window

The script editor allows you to write and edit scripts.

You can select any of the following scripting languages for your script: VBScript, JScript.Compact, JScript, C#.Net, VisualBasic.Net or JScript.Net.

The language you select will remain selected the next time you start the editor.

Checking scripts

To begin debugging a script, you can:

·Press F9.

·Click the Check button on the toolbar.

·Open the Tools menu and click Check Script.

If no errors are found, the Script is correct. message will be displayed.

If the script contains errors, they will be listed in the error pane. Double-click an error message in the error pane to jump to the fragment with the error in the script editor.

note Note: You can save scripts with errors and fix the errors later.

By default, the error pane is displayed at the bottom of the editor. You can change its size of this pane using the mouse. You can also change its location (see below for details).

Customizing the editor

You can use the View menu to customize the appearance of the script editor. The View menu contains the following items:

1.Errors Window
Changes the position of the error pane in the editor. You can choose to place it at the top, at the bottom (selected by default), on the right or on the left.

2.Toolbar
Shows or hides the toolbar.

3.Status Bar
Shows or hides the status bar.

Adding a custom function

To add a custom function, select one of the following global modules in the drop-down list on the toolbar: Script in <object_name\document_definition_name>, Rule Global Script Module or Export Global Script Module.

note Note: You cannot use RTL languages for text constants in the script editor. If you need to add RTL text into your script, use one of the following workarounds:

1.Place your RTL text into a user script message or an environment variable.

2.Use an external assembly for your project or Document Definition (for more information, see External assemblies).


Object model

Specifics of the used object model are described below.

Working with collections

All collections in the object model support the following methods:

Name | Type | Access | Description
Count | int | Read-only | The number of items in the collection
Item( index : int ) | ItemInterface | Read-only | Retrieves an item of the collection with the given index. Enumeration begins with "0".

note Note: Instead of using the method Item you can also address items of the collection using parentheses or square brackets depending on the selected language. In JScript, VBScript and Visual Basic.Net languages, parentheses are used. In C#.Net it is only possible to use square brackets. In JScript.Net both parentheses and square brackets can be used.

For example,

Items( 1 ).Text = "Hello" or Items[ 1 ].Text = "Hello"

All collections can be used in "for each" and similar constructs.

Working with recurring fields and tables

All document fields except tables can be recurring.

In the document structure recurring fields are represented with a special prototype field which has a nonempty Items collection.

A prototype field has neither child items nor value. It is used only for storing the set of the field iterations. Child fields and/or field values can be attributes of the field instances only, which are available through the Items method of the IField object.

Tables always have the Rows collection (Rows is the synonym of Items). The Rows collection contains only those rows of the table whose cells can be accessed through the method Children of the rows.

Composing paths to fields

Field, HasField and IndexedItemValue methods of the IDocument object use paths to the fields on the form as their parameters. The formal way to represent the path with a BNF (Backus-Naur Form) is as follows:

<Path> ::= <Path_component> | <Path> "\" <Path_component>

<Path_component> ::= <Field_name> | <Field_name> "["<Field_iteration_number>"]"

Where Field_name indicates the names of the document fields as they are defined in Document Definition and Field_iteration_number is the iteration number of the recurring field (the row number for tables) beginning from "0".

The path can be full or relative. Full paths are constructed beginning with the name of the document section, while relative paths are constructed beginning with the name of the child item in the group.

For example, to address the third row of the column "Total" in the table "Table", which is located in the section "Section" you should write the following:

"Section\Table[2]\Total"

Such a full name can be constructed by means of the FullName method of the IField object.


Scripts for customizing processing stages

This section describes how to use scripts to create custom rules, to run an export, and to create event handlers in ABBYY FlexiCapture.

listPicture Types of scripts

listPicture Objects

listPicture Sample scripts


Types of scripts

In FlexiCapture you can create scripts of the following types:

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

To view sample scripts of the above types, please refer to the Sample scripts section.


Script rule

What it does

Rules based on scripts enable you to create complex custom algorithms for document validation and normalization.

The script rule is configured on the Rules tab of the Document Definition properties.

Parameters

Name | Type | Access | Description
Context | IRuleContext | According to the rule settings | The context of the rule

Procedures that you wish to use in more than one rule should be written to the global rule module, which can be accessed from the script editor. From the drop-down list on the toolbar of the script editor, select Rule Global Script Module. The global rule module can also be accessed from the Document Definition editor (Document Definition → Script Modules → Rule Script...).

Script rules can be used to access records of a cached data set. This can be useful if you need to create validation rules manually. Complete the following steps to access records in a cached data set:

1.Connect to the data set using the IRuleContext.DataSet method.

2.Create a query using the IDataSet.CreateQuery method.

3.Add one or more conditions using the IDataSetQuery.AddValue method.

4.Use the IDataSet.GetRecords method to get data that satisfies the query. If you need to determine how many records satisfy the query, use the IDataSet.GetRecordsCount method.

5.You can get records with specific index numbers using the IRecordset.GetRecord method.

If classes and methods of an external assembly are used in the script or global module, the assembly file must be attached on the .Net References tab of the Document Definition properties.


Autocorrection script

What it does

This script allows you to convert field values and run context-independent format checks.

The script is configured on the Data tab of the field properties dialog box.

Parameters

Name | Type | Access | Description
Value | IValue | Read/write | Field value

note Note: If the Apply AutoCorrect only once after recognition option is selected, a format error message specified in IValue.ErrorMessage is not displayed because such errors can not be fixed.

Unless this option is selected, the script can run several times even within a stage.

note Note: The script is launched when confirming a field in the Data Verification station.

If classes and methods of an external assembly are used in the script, the assembly file must be attached on the .Net References tab of the Document Definition properties.


Export script

What it does

This script allows you to customize export.

The script rule is configured on the Export Destinations tab of the Document Definition properties.

Parameters

Name | Type | Access | Description
Document | IDocument | Read-only | The document to be exported
Processing | IProcessingCallback | Read-only | The object for logging the information about processing

note Note: Information on export results must be written to the Document.Action field.

Procedures that you wish to use in more than one export script be written to the global export module, which can be accessed from the script editor. From the drop-down list on the toolbar of the script editor, select Export Global Script Module. The global export module can also be accessed from the Document Definition editor (Document Definition → Script Modules → Export Script...).

If classes and methods of an external assembly are used in the script or global module, the assembly file must be attached on the .Net References tab of the Document Definition properties.


User script (custom action)

What it does

This is a custom scripting rule triggered by the user when viewing a field during field verification or in the document editor.

The script is configured on the Custom Action tab of the field properties dialog box.

Parameters

Name | Type | Access | Description
Context | IRuleContext | According to the rule settings | The context of the rule

If classes and methods of an external assembly are used in the script, the assembly file must be attached on the .Net References tab of the Document Definition properties.


Document assembly script

What it does

This script is used to determine whether the array of documents passed to the user can be merged into one document.

For this, assembly errors for the result document are generated. The condition of a successful assembly is as follows: two documents will be merged into one, if the result document contains no more assembly errors than any of the source documents.

The script is configured on the Assembly tab of the Document Definition properties. To open the script editor window, click the Edit Assembly Script... button under the Use custom assembly rules option.

This script is executed either automatically after recognition or it can be run manually to refresh the assembly (for this, select Tools → Refresh Assembly command). In the first case the script will contain a number of assembly errors generated during the standard check.

Parameters

Name | Type | Access | Description
AssemblingErrors | IAssemblingErrors | Read/write | Resultant assembly errors
BatchItems | IBatchItems | Read-only | A collection of child elements (i.e. documents and pages) of a document

note Note: Document assembly scripts created in ABBYY FlexiCapture 11 and earlier will remain operational in ABBYY FlexiCapture 12. However, if you choose to delete such a script, you will have to write a script with the new interface that will use a collection of child elements.

note Note: For better optimization of the assembly process, it is recommended to avoid addressing documents internal fields. When addressing documents internal fields, the whole document is loaded which can cause a slowdown of the assembly process. If you need to address the document fields, it is preferable to use index fields when possible.

note Note: The AssemblingErrors parameter of the script can contain different assembly errors depending on the way of getting this parameter:

1.AssemblingErrors can be passed to the script as one of input parameters. In this case it will contain the error of the current check.

2.One of input parameters of the script is a collection of documents for which the assembly script is launched. Each document has its own assembly errors, which can be retrieved the following way: document.AssemblingErrors. In this case the AssemblingErrors parameter will contain errors of the last check carried out for the given document.

Procedures that you wish to use in more than one rule should be written to the global rule module, which can be accessed from the script editor. From the drop-down list on the toolbar of the script editor, select Rule Global Script Module. The global rule module can also be accessed from the Document Definition editor (Document Definition → Script Modules → Rule Script...).

If classes and methods of an external assembly are used in the script or global module, the assembly file must be attached on the .Net References tab of the Document Definition properties.


Custom recognition script

What it does

With this script you can define a custom recognition (or initialization) algorithm for fields which have regions.

The custom recognition script is configured on the Recognition tab of the field properties dialog box.

The script is launched when a field value is initialized from the results of the recognizer. The image area being recognized is passed to the script as an input parameter. The document layout is not initialized at the moment, so access to the document fields is denied (however access to registration and other parameters is allowed).

With this script you can specify which symbols are suspicious and must be verified (IsSuspicious and NeedVerification properties).

Parameters

Name | Type | Access | Description
FieldRegion | IFieldRegion | Read-only. Internal* fields of batch documents and pages are unavailable. (Applies to all parents as well.) | The region to be recognized
Result | IValue /ICheckmarkValue /ICheckmarkGroupValue | Read/write. Access to the CharacterParams.NeedVerification flag is denied. CharacterParams.IsSuspicious flag is available with read/write permissions. | The resultant recognized value. Depending on the field type the received parameters can be of the following types: ·IValue - for text fields ·ICheckmarkValue - for checkmarks ·ICheckmarkGroupValue - for checkmark groups

* - The internal field requires loading the object into memory.

If classes and methods of an external assembly are used in the script, the assembly file must be attached on the .Net References tab of the Document Definition properties.


Stage rule

What it does

This script is used to determine whether the document can be routed to a certain stage. Applies in rule settings in the Advanced mode of the Workflow setup.

If an error occurs during the script execution, the document will be sent to the Exceptions stage.

Parameters

Name | Type | Access | Description
Document | IDocument | Read-only | The document for which the check is carried out
Result | IRoutingRuleResult | Read/write | The result of the rule execution

Procedures that you wish to use in more than one rule should be written to the global rule module, which can be accessed from the script editor. From the drop-down list on the toolbar of the script editor, select NonInteractiveProcessor.

If classes and methods of an external assembly are used in the script or global module, the assembly file must be attached on the .Net References tab of the batch type properties (for a particular batch type) or project properties (for the Default batch type).

When a task is completed at the current stage the system determines what will be the next stage for this task. For this purpose the system estimates input conditions for further stages, for example, input scripting rules.


Processing scripts

What it does

Document and batch processing scripts allow you to change the document or batch structure respectively, specify a custom order of sections in the document or order of documents in the batch. Processing scripts can be added when creating a custom stage in the in the Advanced mode of the Workflow setup.

Both scripts are used to process multiple documents and have the possibility to log the processing progress.

Document processing script

All documents to be processed are passed to this script in turn.

Parameters

Name | Type | Access | Description
Document | IDocument | Read/write | The document to be processed
Processing | IProcessingCallback | Read/write | The object for logging the information about processing

note Note: If the task is cancelled, the processing status will change to false (similar to using the method IProcessingCallback.ReportError).

Batch processing script

The input parameters of the script are a batch and a set of documents in it to be processed. The iteration over documents is implemented by the user.

The advantage of the batch processing script is that the methods, which can change the batch structure, are available in it. These methods make it possible to move or delete documents and pages.

Parameters

Name | Type | Access | Description
Batch | IBatch | Read-only. Internal* fields of batch documents and pages are unavailable. | The batch
Documents | IDocuments | Read/write. For these documents the batch structure can be modified. | Documents to be processed
Processing | IProcessingCallback | Read/write | The object for logging the information about processing

* - The internal field requires loading the object into memory.


Data set update script

What it does

Scripts of this type can be used to add records to a data set.

Scripts of this type can be added in the properties dialog box of a data set. Select Script from the Source drop-down list and click the Edit... button on the right to open the script editor.

Parameters

Name | Type | Access | Description
Dataset | IDataSet | Read-only | Data set


Data set validation scripts

What it does

This script checks and validates records in a data set. It is run individually for every record that needs to be checked. To enable checks that use scripts, enable the Check records using scripts in the properties dialog box of a data set and click Edit... to create a validation script.

Parameters

Name | Type | Access | Description
Record | IDataSetRecord | Read-only | Represents a record from the data set.
Result | IRecordCheckResult | Read/write | Represents the check result.

Script validation occurs when:

·A data set is updated

·A data set is checked manually in its properties dialog box

·When a record is manually added to the data set or an existing record is edited manually in the data set editing dialog box of the Document Definition Editor.


Document classification script

Show/Hide Hidden Text

An ABBYY FlexiCapture classifier processes submitted documents and determines their class. This lets you choose a document definition to be used for field extraction.

Each classifier corresponds to a specific classification training batch.

If you want to use several classifiers for a single batch, you need to set up a classification script. This can be useful when there are documents that need to undergo additional classification. In this case, the first classifier will be used to classify the documents according to their class, and then, an additional classifier will be selected from the script depending on the classification results. For example, documents can be first classified into "invoices" and "contracts", then the invoices can be further classified according to company name.

note Note: This script can only be set up for an already existing classification training batch and cannot be set up when creating a new batch.

To set up a classification script:

1.Open Project → Project Properties....

2.Go to the Recognition tab found in the project properties window.

3.Open the classification script Editor by clicking Set... to the right of Use script in the Classification section.

4.In the dialog box, select an appropriate classifier by clicking Add... and choosing a classification batch from the list.

5.Now, you can change a classifier's Alias Name. This allows you to not have to rewrite a script if a classifier's name has been changed during processing. The script will refer to the particular name specified in the Alias Name column.

6.Open the script editor window by clicking Edit Script....

Parameters

Name

Type

Access

Description

BatchTypeClassifier

IBatchTypeClassifier

Read-only

A classifier in the batch type.

IsConfident

bool

Read-only

Classification confidence. Unlike working with automatic classifiers, when working with the script this parameter must be manually specified in page properties.

Example

IClassificationResult result = Classifiers[0].ClassifyPage( Page );

Page.ResultClassName = result.ClassName;

Page.IsResultClassConfident = result.IsConfident;

Page

IPage

Read/write

Document page.

Processing

IProcessingCallback

Read/write

The object for logging the information about processing.

Sample scripts

This script classifies pages and adds the name of a class to their properties:

IBatchTypeClassifierResult classifierResult = BatchTypeClassifier.ClassifyPage( Page, null );

Page.ResultClassName = classifierResult.ClassName;

The sample script below allows you to get classification confidence levels:

IClassificationResult result = Classifiers[0].ClassifyPage( Page );

FCTools.ShowMessage( "Class: " + result.ClassName );

Page.ResultClassName = result.ClassName;

FCTools.ShowMessage( "IsConfident: " + result.IsConfident );

Page.IsResultClassConfident = result.IsConfident;

Sample script that combines multiple classifiers for cascade classification

var res0 = Classifiers.Get ( "Batch" ).ClassifyPage( Page );

IClassConfidences classVars = res0.Classes;

foreach( IClassConfidence c in classVars )

{

FCTools.ShowMessage( c.Name + " --> " + c.Confidence.ToString() );

}

FCTools.ShowMessage( "Class res0: " + res0.ClassName);

if (res0.ClassName == "Invoice")

{

var res1 = Classifiers.Get ( "Batch2" ).ClassifyPage( Page );

IClassConfidences classVars1 = res1.Classes;

foreach( IClassConfidence d in classVars1 )

{

FCTools.ShowMessage( d.Name + " --> " + d.Confidence.ToString() );

}

FCTools.ShowMessage( "Class res1: " + res1.ClassName);

Page.ResultClassName = res1.ClassName;

}

else

{

Page.ResultClassName = res0.ClassName;

}

FCTools.ShowMessage( "Page.ResultClassName: " +Page.ResultClassName);

Sample script that assigns the Unknown class to documents, whose classification confidence turns out to be lower than the specified value

The following script can be used if your scenario does not require documents with a low confidence level to be assigned a class (even if a class has already been specified for them). Such documents should be classified manually by an operator.

warning Important! For the script to work, a new class should be created beforehand — for example, “Unknown”. Then, it should be linked to the document definition in the Class Mapping... dialog. For more information, see Mapping classes to Document Definition sections.

using System;

IClassificationResult result = Classifiers.Get ( "ClassifierBatch" ).ClassifyPage(Page);
Page.ResultClassName = result.ClassName;
IClassConfidences classVars = result.Classes;
Page.Comment = "";

foreach( IClassConfidence c in classVars )
{
//FCTools.ShowMessage( c.Name + " -- " + c.Confidence.ToString() ); // records the classification confidence value in the event log
Page.Comment = Page.Comment + c.Name + "-" + c.Confidence.ToString() + "; "; // records the classification confidence value in the page comments
}

if (classVars.Count>0)
{
if (classVars[0].Confidence<80) Page.IsResultClassConfident=false; // confidence threshold below which a document will be classified as uncertainly classified
else Page.IsResultClassConfident=true;
if (classVars[0].Confidence<20) Page.ResultClassName="Unknown"; // confidence threshold below which a document will be assigned the "Unknown" class
if (classVars.Count>1) {
int classesToShow = Math.Min(classVars.Count, 3);
for(int i=0; i<classesToShow; i++)
{ Page.Comment = Page.Comment + classVars[i].Name + "-" + classVars[i].Confidence.ToString() + "; "; }
}
}
FCTools.ShowMessage( "Class: " + Page.ResultClassName );

note Note: The confidence threshold values in this script are only for demonstration purposes and can be modified by the user depending on a particular workflow.


Event handlers

Show/Hide Hidden Text

FlexiCapture lets you create handlers for events that affect batches, documents and fields.

Event handlers are stored in batch types and Document Definitions. You can find their settings on the Event Handlers tab of the Properties dialog of:

·Batch Types (for Document Definitions);

·Projects (for all batch types in the project except for those for which event handlers have been set up in batch type properties).

·Document Definitions (for documents of the current type).

Batch events

listPicture After batch created

listPicture Before batch delete

listPicture Before batch parameter change

listPicture After page added

listPicture Before page delete

listPicture After document created

listPicture Before document delete

listPicture Before pages move

listPicture After batch opened

listPicture Before batch close

listPicture Batch integrity check

Document events for batch types

These event handlers are set up in a batch's properties or in a batch type's properties.

listPicture Before document parameter change

listPicture After document state changed

listPicture After export completed

listPicture Before matching

Document event for the current batch type

These event handlers are set up in a Document Definition's properties.

listPicture Before document parameter change

listPicture After document state changed

listPicture After document rules are checked

Event handlers for fields can also be set up in a Document Definition's properties (see below).

Field events

listPicture Field verification request

note Note: If the same event handler is set up for batch types and the current document type, the event handler for the document will be executed first, followed by the event handler for batch types.

Storing procedures in global modules

We recommend adding procedures that you plan to use in sever event handlers to a global module. To do this, select Events from the drop-down list on the toolbar of the script editor.

note Note: Global modules are not available for event handlers in the Document Definition editor.
Adding external assemblies

If a script or a global module is using methods from an external assembly, you can add this external assembly on the .Net References tab of the properties dialog of an object (a batch type, a project or a Document Definition).


Batch created

What it does

The handler of this event is used when you need to do some manipulations on the batch, e.g., to save data to the batch registration parameters.

When it is launched

The script is launched upon adding a batch to the project.

Parameters

Name | Type | Access | Description
Batch | IBatch | Read-only. Document and page internal* fields are available. | A newly added batch

* - The internal field requires loading the object into memory.


Batch deleted

What it does

The handler of this event is used if you need to clear some data relating to the batch.

When it is launched

The script is launched prior to deleting the batch.

note Note: Deleting a batch does not initiate the event of deleting batch documents and pages.

Parameters

Name | Type | Access | Description
Batch | IBatch | Read-only. Internal* fields of batch documents and pages are unavailable. | The batch being deleted

* - The internal field requires loading the object into memory.


Batch parameter change

What it does

The handler of this event can be used for formatting some of the batch properties.

Properties

·Batch type (name of the batch type)

·Batch name

·Batch description

·Value of the registration parameter

·Batch priority (in form of a string). For the list of admissible values, see the description of the TProcessingPriority object.

When it is launched

The script is launched prior to changing a batch property.

note Note: This script does not allow specifying a new value of the batch type.

Parameters

Name | Type | Access | Description
Batch | IBatch | Read-only. Internal* fields of batch documents and pages are unavailable. | The batch whose property is being changed
PropertyModification | IPropertyModificationInfo | Read/write. | Stores information on the property being changed. Allows substituting the set value.

* - The internal field requires loading the object into memory.


Batch structure change (page added/page deleted/document added/document deleted)

What it does

The handler of this event can be used if you need to do some manipulations on the batch, the document or the page depending on a new image. For example, to count the number of pages added to the batch to ensure that no pages are missing.

When it is launched

The script is launched upon adding pages (or documents) or prior to deleting them.

note Note: Deleting a document does not initiate the event of deleting document pages.

Parameters

Name | Type | Access | Description
Batch | IBatch | Internal* fields of batch documents and pages are unavailable | The batch being manipulated
Document (or Page) | IDocument (or IPage) | External fields of the changed document (or page) can be modified. Access to the deleted document (or page) and other documents and pages of the batch is read-only. | The item being deleted (or added).

* - The internal field requires loading the object into memory.


Pages moved

note Note: Pages can be moved during the document assembly as well.

What it does

The handler of this event can be used if you need to do some manipulation on the new document based on the source documents, for example, to save the merged registration parameters.

If one document is fully embedded into another one, then in the Pages array its pages will go in succession and in the same order as they go in the target document.

note Note: After merging pages the layout of the target document can change.

When it is launched

The script is launched prior to moving pages from one document to another.

Parameters

Name | Type | Access | Description
Batch | IBatch | Internal* fields of batch documents and pages are unavailable | The batch
InsertionPosition | int | Read-only | The position in the document where pages are inserted
Pages | IPages | Read-only | The array of pages being moved
TargetDocument | IDocument | Read/write | The target document pages are moved into

* - The internal field requires loading the object into memory.


Batch opened/closed

When it is launched

The script is launched upon opening or prior to closing the batch.

Parameters

Name | Type | Access | Description
Batch | IBatch | Read-only. Internal* fields of batch documents and pages are unavailable. | The batch

* - The internal field requires loading the object into memory.


Batch integrity check

What it does

Checks the batch structure. For example, you can check whether the batch contains obligatory documents or whether the number of documents specified on the control page coincides with the number of documents actually processed.

When it is launched

The script is launched prior to export (if the corresponding option is selected in workflow settings) or by an explicit user command.

Parameters

Name | Type | Access | Description
CheckResults | IBatchCheckResults | Read-only. Internal* fields of batch documents and pages are unavailable. | The object that provides access to the batch being checked. Also used to set the check results.

* - The internal field requires loading the object into memory.

note Note: In this script, the following methods are unavailable: HasField, Field, SaveAs, ExcludedFromDocumentImage, Page.Rect, Document.Children (to address document fields, the IndexedItemValue must be used).


Document parameter changed

What it does

The handler of this event can be used for formatting some of document properties.

Document properties

·Comment

·Value of the registration parameter

·ExternalID

·Document priority (specified in form of a string). For the list of admissible values, see the description of the TProcessingPriority object.

When it is launched

The script is launched prior to changing a document property.

Parameters

Name | Type | Access | Description
Document | IDocument | Internal* fields of batch documents and pages are unavailable | The document
PropertyModification | IPropertyModificationInfo | Read/write | Stores information on the property being changed

* - The internal field requires loading the object into memory.


Document state changed

What it does

At any moment the document state can be described with an array of flags. The event occurs every time when the state changes. A set of flags describing changes in the document state are passed to the event as input parameters.

Flags that determine the document state

·Preprocessed

·Analyzed

·Recognized

·HasErrors

·Assembled

·Verified

·Exported

·HasLayout

When it is launched

The script is launched on document export provided the document state has changed since it was read.

Parameters

Name | Type | Access | Description
ChangedStates | IScriptBinaryAttributes <TStateType> | Read-only | Stores information about changes of the document state
Document | IDocument | Read/write | The document


Export completed

What it does

Export results are passed to this script as input parameters.

When it is launched

The script is launched after the export task is completed. If the Process entire batches option is selected for the Export stage, the task will contain all documents of the batch. If the option is deselected, the number of documents in the task can vary from one document to all documents of the batch. The script is launched irrespective of the export result (whether it succeeded or failed). This is the main difference of this script from the event Document state changed.

If some export targets are omitted (as the document has been exported to those targets earlier), then for the corresponding export results, the value of the Applied flag will be false.

Parameters

Name | Type | Access | Description
ExportResults | IDocumentsExportResults | Read-only. Internal* fields of batch documents and pages are unavailable. | Export results for all documents and all export targets
Processing | IProcesingCallback | Read/write | The object for logging the information about processing

* - The internal field requires loading the object into memory.


Check Rules

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for customizing processing stages > Types of scripts > Event handlers >

Return to chapter overview

Script that is run after rule checks

What it does

The handler of this event is used after rule checks.

Parameters

Name | Type | Access | Description
Document | IDocument | Read/write | Represents the document.


Before matching

What it does

The handler of this event allows you to control what sections or Document Definitions will be matched on each subsequent page and specify the matching order.

With this script you can accelerate matching the Document Definition if sections to be matched are known in advance. For example:

·it is known that only the first page of the batch may have the Document Definition "Contents";

·it is known that the given page belongs to a particular section type;

·the order of sections in the documents is known.

The script allows you to disable recognition of document after a Document Definition is matched. For this, set the IMatchingInfo.NeedRecognition parameter to false. It can be useful if field values are supposed to be entered manually.

It is also possible to mark the page as an annex page which does not need recognition. For this, it is necessary to specify an empty list of sections and set the IMatchingInfo.ForceMatch parameter to true.

When it is launched

The script is launched prior to matching sections on each subsequent page.

Parameters

Name | Type | Access | Description
Document | IDocument | Read-only. Internal* fields of batch documents and pages are unavailable. | The document whose pages are being analyzed
Matching | IMatchingInfo | Read/write | The object that specifies some of the matching parameters
PageIndex | int | Read-only. Internal* fields of batch documents and pages are unavailable. | The index of the document page to be analyzed

* - The internal field requires loading the object into memory.

note Note: It is also possible to specify Document Definitions and sections to be matched by using named registration parameters.


Field verification request

What it does

This script allows you to specify which fields will not be submitted to the context verification. Can be used to verify different fields at different processing stages.

The input parameters for the script are a field and a document.

When it is launched

The script is applied to all fields before they are submitted to the context verification. For the fields which skip the context verification, the script is not executed.

Parameters

Name | Type | Access | Description
Document | IDocument | Read-only | The document that contains the field
Field | IField | Read-only | The field being checked
NeedVerification | IBoxedBoolean | Read/write | Specifies whether to verify the field. If the value is set to false, the field is not verified.


Objects

This section contains the description of objects used in scripts, their properties and methods.

listPicture IActionResult

listPicture IAssemblingError

listPicture IAssemblingErrors

listPicture IBatch

listPicture IBatchItem

listPicture IBatchItems

listPicture IBatchCheckResults

listPicture IBatchTypeClassifier

listPicture IBatchTypeClassifierResult

listPicture IBoxedBoolean

listPicture ICharacterParams

listPicture ICharactersParams

listPicture ICheckmarkGroupValue

listPicture ICheckmarkValue

listPicture IDataSet

listPicture IDataSetQuery

listPicture IDataSetRecord

listPicture IDocument

listPicture IDocuments

listPicture IDocumentDefinitionInfo

listPicture IDocumentDefinitionInfoArray

listPicture IDocumentExportResults

listPicture IDocumentsExportResults

listPicture IEditablePictureObject

listPicture IExportFieldsToRedact

listPicture IExportImageSavingOptions

listPicture IField

listPicture IFieldRegion

listPicture IFieldRegions

listPicture IFields

listPicture IFlexiCaptureTools

listPicture IMatchedSectionInfo

listPicture IMatchingInfo

listPicture IPage

listPicture IPageClassificationResult

listPicture IPages

listPicture IPictureObject

listPicture IPictureObjectsInfo

listPicture IPrincipal

listPicture IPrincipals

listPicture IProcessingCallback

listPicture IProject

listPicture IProperties

listPicture IProperty

listPicture IPropertyModificationInfo

listPicture IRecordCheckResult

listPicture IRecordset

listPicture IRect

listPicture IRects

listPicture IRoutingRuleResult

listPicture IRuleContext

listPicture IRuleError

listPicture IRuleErrors

listPicture IRuleTag

listPicture IRuleTags

listPicture IScriptBinaryAttributes

listPicture IScriptDefinitionContext

listPicture ISectionDefinitionInfo

listPicture ISectionDefinitionInfoArray

listPicture IStageInfo

listPicture IUserAttachment

listPicture IUserAttachments

listPicture IUserSessionInfo

listPicture IValue

listPicture IVARIANTArray

listPicture TAssemlingErrorType

listPicture TBatchItemType

listPicture TExportFieldType

listPicture TExportType

listPicture TPageClassificationType

listPicture TPrincipalType

listPicture TProcessingPriority

listPicture TPropertyType

listPicture TRuleErrorType

listPicture TStateType


IActionResult

What it does

A special object that is used to describe whether the export (or a post-export event) of a particular document succeeded.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Properties

Name

Type

Access

Description

Applied

bool

Read-only

Specifies whether the document has been exported to the target during the current export session. For the false value of the flag:

·if the Succeeded flag value is true, it means that the document has exported to the target earlier;

·if the Succeeded flag value is false, it means that the document is not suitable for export to this target (e.g. because of errors).

ErrorMessage

string

Read/write, Mutable (can be modified even in scripts with read-only permissions)

An error message

Name

string

Read-only

The name of an export profile

Result

string

Read/write, Mutable (can be modified even in scripts with read-only permissions)

Formal description of the operation result. In the event of export, a description of the path where the document was exported (for example, a path to the file).

Succeeded

bool

Read/write, Mutable (can be modified even in scripts with read-only permissions)

Specifies whether the operation succeeded

Type

TExportType

Read-only

The type of export profile (applies in Export completed script)


IAssemblingError

What it does

Represents a document assembly error.

Properties

Name | Type | Access | Description
Description | string | Read-only | The description
Position | int | Read-only | The position in the document
SectionName | string | Read-only | The name of a missing section (in case of the AET_ObligatoryItemOmitted error). For annex pages, the section name is empty.
Type | TAssemblingErrorType | Read-only | The type of an assembling error
Weight | string | Read-only | The weight of an error


IAssemblingErrors

What it does

A collection of IAssemblingError objects.

Can be modified in the document assembly script only.

Methods

Definition | Description
AddCustomError( description : string, [optional] weight : int ) | Adds a custom assembling error.
AddRedundantPageError( int position, [optional] description ) | Adds an error concerning an extra page.
AddSectionOmittedError( int position, sectionName : string, [optional] description ) | Adds an error concerning a missing section.

warning Important! The AddCustomError method should be used with caution and only if there are no other suitable methods. As document assembly is fully determined by the number of errors, the error weight must be set correctly when adding such errors. And setting the weight correctly can cause difficulties.

It is recommended not to combine several standard errors in one CustomError that will produce one common error message.


IBatch

Show/Hide Hidden Text

What it does

Represents the batch.

note 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

warning Important! The methods below require permissions for changing the batch structure. These methods can be called only from the batch processing script.

Definition

Description

CleanRecognitionResults( document : IDocument ) *

Deletes recognition results for the document.

CreateDocumentFromPage( targetPosition : int, page : IPage ): IDocument *

Takes a page from the document and creates a new document from that page. In the targetPosition parameter, specify an index for the new document in the batch. The index must be a number between 0 and N, N being the total number of documents in the batch.

When the CreateDocumentFromPage method is called:

·The documents having indexes from 0 to targetPosition – 1 will remain in their original positions.

·The documents having indexes from targetPosion to N will be moved one position forward.

·The new document will be placed in the vacated targetPosition.

note Note: If the document becomes empty after the page is removed, it will be deleted.

Example

An example of a script for processing the first document:

IDocument document = Documents[0];

for( int i = document.Pages.Count - 1; i >= 0; --i )

{

Batch.CreateDocumentFromPage( document.Index + 1, document.Pages[i] );

}

CreatePageFromImage( page : IPictureObject, [optional] target : IDocument, [optional] position : int, [optional] sourceInfo : string ) : IPage *

Creates a page from the IPictureObject object and returns the created page:

·If a target document is specified, the page is added to this document. To create a one-page document, specify null as a target document.

·If a position is specified, the page is added to the specified position of the document (if a target document is specified). Otherwise a one-page document is added to the specified position of the batch (if null is specified as a target document). The initial position corresponds to "0," the end of the document or batch corresponds to "-1."

·If the sourceInfo parameter is specified it is written into the information about the page source. Otherwise, information about the page source is received from IPictureObject.

DeleteDocument( document : IDocument ) *

Deletes the document.

DeletePage( page : IPage ) *

Deletes the page.

MoveDocument( source : IDocument, targetPosition : int ) *

Moves the document to the specified position in the batch.

MovePage( source : IDocument, target : IDocument, sourcePageIndex : int, int targetPageIndex : int ) *

Moves the page with the sourcePageIndex index from the source document to the targetPageIndex position in the target document.

Properties

Name | Type | Access | Description
AsBatchItem * | IBatchItem | Read-only | Converts the batch into an IBatchItem object.
Attachments | IUserAttachments | Read-only | User attachments.
BatchTypeName | string | Read-only | The name of the batch type.
Comment | string | Read/write | The comment.
CreatedBy | IPrincipal | Read-only | The author of the newly created batch.
CreationDate | DateTime | Read-only | The time when the batch was created.
Documents | IDocuments | Read-only | Documents the batch consists of
Id | int | Read-only | The batch identifier (unique within the project).
Name | string | Read/write | The name of the batch.
Priority | TProcessingPriority | Read/write | The priority of the batch.
Project | IProject | Read-only | The project containing the batch.
Properties | IProperties | Read-only | Named parameters of the batch.
SLAExpirationDate | DateTime | Read/write | Processing deadline of the batch.
SlaStartDate | DateTime | Read-only | The time when processing of the batch started.
SlaWarningPeriod * | Int | Read/write | The starting time of the period during which a warning about the task's approaching deadline will be displayed. Specified in minutes remaining until the deadline.
StageInfo | IStageInfo | Read-only | Returns the IStageInfo object with information about the document's processing stage. The TaskId and PrincipalId fields are not used.


IBatchCheckResults

What it does

Represents the context of the batch integrity check event.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Properties

Name | Type | Access | Description
Batch | IBatch | Read-only | The batch
CheckSucceeded | bool | Read/write, Mutable (can be modified even in scripts with read-only permissions) | Specifies whether the check succeeded
ErrorMessage | string | Read/write, Mutable (can be modified even in scripts with read-only permissions) | The error message


IBatchItem

What it does

Represents an element (a batch, document or page) as the type specified in the Type property.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Properties

Name | Type | Access | Name
AsBatch | IBatch | Read-only | Returns the element as a batch
AsDocument | IDocument | Read-only | Returns the element as a document
AsPage | IPage | Read-only | Returns the element as a page
Batch | IBatch | Read-only | The batch that contains the element
BatchName | string | Read-only | The name of the batch
ChildItems | IBatchItems | Read-only | A collection of child elements
Index | int | Read-only | The index number of the element in the collection
Parent | IBatchItem | Read-only | The parent element
Type | TBatchItemType | Read-only | The type of the element


IBatchItems

Show/Hide Hidden Text

What it is

A collection of IBatchItem.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Methods

Definition | Description
Move(item : IBatchItem, position : int) | Moves the element to the specified position in the collection. note Note: This method is called for the collection where the element needs to be moved. note Note: The position parameter may take values starting from 0 and up to the size of the collection.

Properties

Name | Type | Access | Name
Count | int | Read-only | The number of elements in the collection

Example of the Move method

The script executes several consecutive scenarios, which result in a script for assembling sets from unsorted lists of documents:

·Disassembles sets

·Groups documents by type in the specified order

·Groups documents by the specified key field

·Assembles documents into sets with the same key field

Sample script

using System.Collections.Generic;

IBatchItems batch = Batch.AsBatchItem.ChildItems;
List<string> docDefs = new List<string> {"DocSet","Doc1","Doc2"}; // Document assembly order

// Key field name

// (the field should be indexed in all documents and have the same name)
string keyFieldName = "SSN";
List<string> keyFields = new List<string>();

// Disassembling sets
bool foundChildren = false;
do
{
foreach (IBatchItem itm in batch)
{
if (itm.ChildItems.Count > 1)
{
int shift = 0;
foreach (IBatchItem subItm in itm.ChildItems)
{
shift++;
batch.Move(subItm, itm.Index + shift);
}
}
}
foreach (IBatchItem itm in batch)
if (itm.ChildItems.Count > 1)
foundChildren = true;
} while (foundChildren);

// Sorting documents the way they should be in the set

// (i.e. the set itself followed by all its subdocuments)
foreach (string docDefName in docDefs)
{
List<int> indexList = new List<int>();
foreach (IBatchItem itm in batch)
if (itm.Type == TBatchItemType.BIT_Document)
if (itm.AsDocument.DefinitionName == docDefName) indexList.Add(itm.Index);
for (int i = 0; i < indexList.Count; i++)
batch.Move(batch[indexList[i]-i], batch.Count);
}

// Searching for all options of key fields in the batch
foreach (IBatchItem itm in batch)
{
if (itm.Type == TBatchItemType.BIT_Document)
{
string keyFieldValue = (string)itm.AsDocument.IndexedItemValue(keyFieldName);
if (!keyFields.Contains(keyFieldValue))
keyFields.Add(keyFieldValue);
}
}
// Assembling documents with the same key field
foreach (string keyFieldValue in keyFields)
{
List<int> indexList = new List<int>();
foreach (IBatchItem itm in batch)
if (itm.Type == TBatchItemType.BIT_Document)
if ((string)itm.AsDocument.IndexedItemValue(keyFieldName) == keyFieldValue) indexList.Add(itm.Index);
for (int i = 0; i < indexList.Count; i++)
batch.Move(batch[indexList[i]-i], batch.Count);
}

// Moving subdocuments into sets only if key fields match
// (set sections first, child documents second)
int ind = 0;
while (ind < batch.Count)
{
if (batch[ind].Type == TBatchItemType.BIT_Document)
// Looking for the beginning of the set
if (batch[ind].AsDocument.DefinitionName == docDefs[0])
// If a document after the set is not a set and key fields match,
// we add it to this set
while (ind+1 < batch.Count &&
batch[ind+1].AsDocument.DefinitionName != docDefs[0] &&
(string)batch[ind+1].AsDocument.IndexedItemValue(keyFieldName) == (string)batch[ind].AsDocument.IndexedItemValue(keyFieldName))
batch[ind].ChildItems.Move(batch[ind+1], batch[ind].ChildItems.Count);
ind++;
}

Download the sample here: Sample_IBatchItems_Move.zip


IBatchTypeClassifier

What it does

Classifies a page based on the batch type.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Methods

Definition | Description
ClassifyPage ( page : IPage, [optional] callback, IProcessingCallback ) : IBatchTypeClassifierResult | Starts page classification using the classifier associated with the batch type

See Document classification script for a sample script.


IBatchTypeClassifierResult

Show/Hide Hidden Text

What it does

Gets the confidence level.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Properties

Name | Type | Access | Description
ClassName | string | Read-only | The class name given to the page as a result of classification

Sample script

IBatchTypeClassifierResult res = BatchTypeClassifier.ClassifyPage( Page );
IClassConfidences classVars = res.Classes;
foreach( IClassConfidence c in classVars )
{
FCTools.ShowMessage( c.Name + " --> " + c.Confidence.ToString() );

}


IBinarizationParams

What it does

Configures binarization parameters.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Properties

Name | Type | Access | Description
IsPdfWithText | bool | Read/write | Shows whether an image is a PDF document with a text.
IsPhoto | bool | Read/write | Shows whether an image is a photo.
SmoothTexture | bool | Read/write | Shows whether an image has a smooth texture.


IBoxedBoolean

What it does

Passes in-out boolean values to scripts.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Properties

Name | Type | Access | Description
Value | bool | Read/write | The value


ICharacterParams

Show/Hide Hidden Text

What it does

Stores information about character properties.

note 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

SetRect( newRect : string, [optional] pageId : int ) *

Specifies a new rectangle for a character. The newRect parameter must be passed in the form of the string "[left, top, right, bottom]".

The specified rectangle must be completely inside the region of the field that contains the character.

note Note: This method is not available in the autocorrection script.

Properties

Name

Type

Access

Description

Confidence *

int

Read-only

Confidence level for a batch type. Returns a value from 0 to 100.

warning Important! Using this property requires storing some additional data, which may increase the size of a document and additional disk space. By default, no additional data are saved and the property is disabled. For the correct operation of the property, set the registry key [HKEY_CURRENT_USER\Software\ABBYY\FlexiCapture\12.0\Controller] "ForceSaveConfidenceLevel" = "true". Instead of HKEY_CURRENT_USER, select the branch of the user account that will recognize documents.

IsSuspicious *

bool

Read/write

Specifies whether or not a character has been recognized with a sufficient degree of confidence. This flag is effective only in the custom recognition script.

note Note: When the IsSuspicious property is assigned to a character by a recognition script, the program will check the field containing this character against the field verification threshold. If the percentage of characters with the IsSuspicious property in the field exceeds the specified threshold, the NeedVerification property will be added to the field.

Lang *

int

Read/write

Detects the language of characters in a field.

Example

An example of a script for an on-user-command event that detects the language of each character in the field and writes the detected languages in a comment to the page:

ITaskWindow taskWindow = MainWindow.TaskWindow;

ISelection selection = MainWindow.Selection;

IDocumentItems items = selection.DocumentItems;

foreach( IDocumentItem item in items ) {

IDocument doc = item.Document;

taskWindow.OpenDocument(doc);

foreach (IPage page in doc.Pages) {

IField field = doc.Field("Field Name");

ICharactersParams characterParams = field.Symbols;

string str = "";

foreach( ICharacterParams param in characterParams ) {

str = str + " " + param.Lang.ToString();

}

page.Comment = str;

}

}

note Note: This script will process only selected documents at the verification stage.

NeedVerification

bool

Read/write

Specifies whether any additional verification is required for the character. The value of this flag determines whether the character will be highlighted in the document editor.

note Note: When the NeedVerification property is assigned to a field by any script other than a recognition script, the field is automatically marked as sent to verification. The program checks the field verification threshold (see the note for the IsSuspicious property) prior to allocating the NeedVerification property.

To specify, whether the whole field (not particular characters) needs verification, use the NeedVerification property of the IField interface.

PageId *

int

Read-only

Identifies the page on which the rectangle of the character is located. Required for multi-page fields.

Rect *

IRect

Read-only

A rectangle that contains the character. If the rectangle is not specified, null is returned.

Symbol

string

Read/write

A character (a string consisting of one character).


ICharactersParams

What it does

A collection of ICharacterParams objects.

Methods

Definition

Description

Add( value : Object, [optional] position : int )

Inserts a new value element into the text in the specified position. If the position is not set, the value is added to the end of text.

note Note: The value parameter can be a character, a string, an ICharacterParams object or an ICharactersParams object. Thus characters or text can be copied from other fields with preserved layout and highlighting. If characters regions are larger than the region of a new field, they are not copied.

Delete( index : int, count : Variant)

Deletes an element by its index in the collection.

note Note: The count parameter sets the number of characters to be deleted.

Properties

Name | Type | Access | Description
Count | int | Read-only | Number of objects in the collection.


ICheckmarkGroupValue

What it does

A collection of ICheckmarkValue objects.

note Note. This object is not available on the Web Verification Station for checking rules locally.


ICheckmarkValue

What it does

Represents a checkmark value.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Properties

Name | Type | Access | Description
IsSuspicious | bool | Read/write | Whether a checkmark value is certainly recognized. By default all checkmark values are considered uncertain.
Name | string | Read-only | Checkmark name (field name in the Document Definition)
Rect | IRect | Read-only | A rectangle of the checkmark
Value | bool | Read/write | Checkmark value


IDataSet

Show/Hide Hidden Text

What it does

Represents a data set.

Methods

Definition

Description

AddRecord ( dataSetRecord : IDataSetRecord )

Adds the record to the data set.

CreateQuery () : IDataSetQuery

Creates a data set query object.

CreateRecord () : IDataSetRecord

Creates a record that can be added to the data set later.

DeleteRecord ( dataSetRecord : IDataSetRecord )

Removes the data set record with the specified primary key **.
Sample

If the ID is used as the primary key in the data set, and its value is set to "MyTestid":

IDataSet dataSet = Context.DataSet( "BusinessUnits" );
IDataSetRecord rec = dataSet.CreateRecord();
rec.AddValue( "Id", "MyTestid" );
dataSet.DeleteRecord( rec );

GetRecords (IDataSetQuery : query) : IRecordset

Gets records that satisfy query parameters from the data set.

GetRecordsCount (IDataSetQuery : query) : int

Gets the number of records from the data set that satisfy query parameters.

ModifyRecord ( dataSetRecord : IDataSetRecord )

Edits a data set record in a column with the specified primary key **.

note Note: This method cannot be used to create or edit complex columns.
Sample

If the ID is used as the primary key in the data set, and its value is set to "MyTestid":

IDataSet dataSet = Context.DataSet( "BusinessUnits" );
IDataSetRecord rec = dataSet.CreateRecord();
rec.AddValue( "Id", "MyTestid" );
rec.AddValue( "Name", "MyName");
rec.AddValue( "CountryCode", "DE" );
dataSet.ModifyRecord( rec );

** The ModifyRecord and DeleteRecord methods only work with data sets that have a Primary Key column.


IDataSetQuery

What it does

Represents a data set query.

Methods

Definition | Description
AddValue ( column : string, value : object ) | Lets you add one or more conditions to the query by specifying a column's name and value.


IDataSetRecord

What it does

Represents a record from a data set.

Methods

Definition | Description
AddValue ( column : string, value : object ) | Adds a value to a data set record. The name and value of the column must be specified.
GetColumnName ( index : int ) : string | Gets the name of a column. note Note: Since a column can have multiple names, IDataSetRecord can include the name item multiple times with different values.
GetValue ( index : int ) : object | Gets the value of a field.

Properties

Name | Type | Access | Description
ColumnCount | Int | Read-only | The amount of fields in a record


IDocument

What it does

Represents the document.

note 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

AddFileToExportResults( sourceFile : string, destinationName : string, replaceIfExists : bool ) *

Adds a user file to document export results.

In the sourceFile parameter, specify the address of the user file to be added.

note Note: Be sure to specify the root export path in the project settings. Otherwise, the user file will be placed into the batch folder in the file storage location.

In the destinationName parameter, specify an export destination.

Set the replaceIfExists parameter to true if you want to overwrite any existing file with the same name in the destination. Set the replaceIfExists parameter to false if you want to keep any existing file with the same name in the destination and add an error message to the log.

CheckRules( ) *

Checks all rules in the document. Write permissions for the document are required.

Field( name : string ) : IField *

Gets access to a document field by the full path to the field. Full paths are used.

Is an internal** field. Cannot be used in rules.

HasField( name : string ) : bool *

Checks whether a field with the specified path exists. Relative paths are used.

Is an internal** field. Cannot be used in rules.

IndexedItemValue( name : string ) : VARIANT *

Retrieves the field value by the name or the path to the field. Available from external fields of documents and pages. Both a field name and a full path to the field can be used. Cannot be used in rules.

IndexedItemValues( name : string ) : IVARIANTArray *

Retrieves a set of index values corresponding to a field in the Document Definition by the name or the path to the field. If a field is marked as an index field in the recurring section, the method returns all values of the field from all sections. Available from external fields of documents and pages. Both a field name and a full path to the field can be used. Cannot be used in rules.

Property( name : string ) : VARIANT

Retrieves the value of a specified property by its name. The returned value can be in the form of a string, a number or time.

Properties names and returned values:

·Exported - when the document was exported

·ExportedBy - who exported the document

·Created - when the document was created

·CreatedBy - who created the document

·Recognized - when the document was recognized

·RecognizedBy - who recognized the document

·Modified - when the document was modified last

·ModifiedBy - who modified the document

·TotalSymbolsCount - the total number of symbols

·UncertainSymbolsCount - the total number of uncertain symbols

·RecognizedSymbolsCount - the number of recognized symbols

·Comment - the comment on the document

·ProcessingErrors - document processing errors

·ProcessingWarnings - document processing warnings

·Verified - the time when the fields of the documents were last edited manually

·VerifiedBy - the user who made the last manual changes to the fields of the document (does not save information from Processing Stations)

SaveAs( filename : string, [optional] options : IExportImageSavingOptions ) *

Saves the image of a one-page or multi-page document. If no saving format is specified in the saving options, the image is saved in a *.tif file. This is an internal** field.

SaveAsStream( [optional] options: IExportImageSavingOptions) : byte[] *

Saves the document to a memory stream and returns it as a byte array (COM SafeArray).

note Note: JScript and VBScript do not support iteration over this array.

SaveXmlToFile( filename : string ) *

Saves the XML file with the description of the document without preprocessing to the specified location to be used in the Web Verification Station.

SaveXmlToFileStorage() *

Saves the XML file with the description of the document without preprocessing to the file storage to be used in the Web Verification Station.

warning Important! The Property method should not be confused with the Properties collection which contains document properties specified by the user.

Properties

Name | Type | Access | Description
Action * | IActionResult | Read-only | Is effective in export and post export scripts only.
AsBatchItem * | IBatchItem | Read-only | Converts the document into an IBatchItem object.
AssemblingErrors | IAssemblingErrors | Read-only | A collection of assembly errors. Access to the collection is always read-only.
Attachments | IUserAttachments | Read-only | User attachments
Batch | IBatch | Read-only | The batch. Irrespective of permissions of the script for the document, access to the batch is read-only and internal** fields of documents and pages are unavailable.
BatchName | string | Read-only | The batch name.
Children * | IFields | Read-only | Child fields (document sections). Unlike the property Sections, section order corresponds to their order in Document Definition. Recurring sections are represented as one item and the instances are available through the Items method of that item. Is an internal** field. Cannot be used in rules.
Comment | string | Read/write | A comment of the document.
DefinitionName | string | Read-only | The name of the Document Definition. For unprocessed and unrecognized documents, the property returns an empty string.
DocumentDefinition | IDocumentDefinitionInfo | Read-only | Detailed information about the Document Definition which is matched on the document.
HasErrors | bool | Read-only | Specifies whether the document has single-field or multi-field errors.
HasUnpreparedImages | bool | Read-only | Specifies whether the document contains un-preprocessed pages.
HasWarnings | bool | Read-only | Specifies whether the document has rule or format warnings.
Id | string | Read-only | Document identifier (External Id). The value starts with 1 and is unique only within one batch.
Index | int | Read-only | The index of the document in the batch. The value starts with 0 and is unique only within one task.
IsAnalyzed | bool | Read-only | Specifies whether the document is analyzed. The document is considered analyzed if all pages of the document are analyzed.
IsAssembled | bool | Read-only | Specifies whether the document is assembled.
IsExcludedFromAutomaticAssembling | bool | Read/write | Checks if the document is included into automatic assembly.
IsExported | bool | Read-only | Specifies whether the document is exported.
IsRecognized | bool | Read-only | Specifies whether the document is recognized. The document is considered recognized if each page of the document is either recognized or this is an annex page.
IsUsedForTraining | bool | Read/write | Specifies whether the document is used for training.
IsVerified | bool | Read-only | Specifies whether the document is verified.
Pages | IPages | Read-only | Document pages.
PreviousStageInfo * | IStageInfo | Read-only | Returns the IStageInfo object, i.e. the processing stage of the document. The TaskId and PrincipalId fields are not used.
Priority | TProcessingPriority | Read-only | A priority of the document.
ProcessingErrors * | string | Read-only | Processing errors divided by line breaks.
ProcessingWarnings * | string | Read-only | Processing warnings divided by line breaks.
ProhibitedUserId * | int | Read-only | A task created from the document will not be available to the user with the given identifier. By default the value is "0" which means that the task is available to all users.
Properties | IProperties | Read-only | Registration parameters of the document.
RecognizedSymbolsCount * | int | Read-only | The number of recognized symbols.
RuleErrors * | IRuleErrors | Read-only | A collection of document errors (format errors, rule errors, errors of merging double verification results). note Note: Available for open documents only.
Sections * | IFields | Read-only | A flat list of document sections. If there is a recurring section, the list contains all replications of the section. Sections in the list go in the same order as the first pages of the document sections. Sections without pages close the list. Is an internal** field. Cannot be used in rules.
StageInfo | IStageInfo | Read-only | Information about the processing stage on the application server.
SymbolsForVerificationCount | int | Read-only | The number of symbols that need verification.
TotalSymbolsCount | int | Read-only | The total number of symbols.
UncertainSymbolsCount | int | Read-only | The number of uncertain symbols.

** - The internal field requires loading the object into memory.


Navigation: Using scripts in ABBYY FlexiCapture > Scripts for customizing processing stages > Objects >

Return to chapter overview

IDocuments

What it does

A collection of IDocument objects.


IDocumentExportResults

What it does

The object represents a set of export results of a document to different targets. This is a collection of the IActionResult objects which contain information about export for particular targets.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Properties

Name | Type | Access | Description
Document | IDocument | Read-only | The document exported with the given results
ErrorMessage | string | Read-only | The message that describes why the export failed
Succeeded | bool | Read-only | Specifies whether the document export succeeded


IDocumentsExportResults

What it does

A collection of IDocumentExportResults objects.

The object represents export results for a set of documents.

note Note. This object is not available on the Web Verification Station for checking rules locally.


IDocumentDefinitionInfo

What it does

Contains detailed information about the Document Definition matched with the document.

Properties

Name | Type | Access | Description
Name | string | Read-only | The name of the Document Definition.
SectionsInDefinition | ISectionDefinitionInfoArray | Read-only | An array of sections in the Document Definition. Returns only included sections.
Version | int | Read-only | The version of the Document Definition.


Navigation: Using scripts in ABBYY FlexiCapture > Scripts for customizing processing stages > Objects >

Return to chapter overview

IDocumentDefinitionInfoArray

What it does

A collection of objects of type IDocumentDefinitionInfo.


IEditablePictureObject

Show/Hide Hidden Text

What it does

Represents a picture that can be edited in ABBYY FlexiCapture. The object is an extension of the IPictureObject interface.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Methods

Definition

Description

Allowable image color

ApplyContourSmoother ( params: IContourSmootherParams )

Applies the contour smoother to an image.

For gray and color images

ApplyLocalContrastFilter ( params: ILocalContrastParams )

Applies the non-adaptive contrast filter to an image.

For gray and color images

ApplyMultiscaleLocalContrastFilter ()

Applies the adaptive contrast filter to an image. Use this method to transform an image into a scan.

For gray and color images

ApplyShadowsHighlightsFilter ( params: IShadowsHighlightsParams )

Applies shadow highlighting to an image.

For gray and color images

ApplySigmaFilter ()

Removes digital noise from an image.

For all images

AutoCrop ( [optional] type : string )

Automatically crops an image. Possible values of the type parameter are Photo, Scan, and Generic. The parameter is set to Generic by default.

For all images

Binarize ( params: IBinarizationParams )

Converts colors on an image to black-and-white. Has a different set of properties than the ConvertToBW method.

For gray and color images

ConvertToBW ( [optional] threshold : int )

Converts an image to black-and-white. You can specify a brightness threshold value. Values above the threshold will be considered white and those below the threshold level will be considered black. Brightness threshold values can range from 0 to 255.

For all images

CreateBinarizationParams () : IBinarizationParams

Creates an object with parameters for the Binarize method.

For all images

CreateContourSmootherParams () : IContourSmootherParams

Creates an object with parameters for the contour smoother.

For all images

CreateLocalContrastFilterParams () : ILocalContrastParams

Creates an object with parameters for the contrasting action. Parameters inside the filter are set to default.

For all images

CreateShadowsHighlightsFilterParams () : IShadowsHighlightsParams

Creates an object with parameters for the action of changing a shadow light effect.

For all images

Crop ( rect : string )

Crops the image outside the specified rectangle.

For all images

CutOut ( rect : string ) : IEditablePictureObject

Cuts a specified rectangle from the image and returns this rectangle.

For all images

Deskew ( [optional] byLines : bool, [optional] byBlackSquares : bool, [optional] byText : bool )

Deskews the image. Image skew can be corrected based on straight lines, black squares or text. By default, the byText parameter is set to true.

For all images

Despeckle ( [optional] garbageSize : int )

Removes noise from black-and-white images. Speckles up to the size specified will be removed. If the garbageSize parameter is not specified, the size is detected automatically.

Only for black-and-white images

Erase ( rectangle : string, [optional] red : int, [optional] green : int, [optional] blue : int )

Erases an area on the image. You can specify the color to erase the area with. By default the black color is used.

For all images

FlipHorizontal ()

Flips the image horizontally.

For all images

FlipVertical ()

Flips the image vertically.

For all images

FreeScale ( newWidth : int, newHeight : int, newResolution : int )

Resizes the page according to the new values.

For all images

Invert ( [optional] rectString : string )

Inverts the image. You can specify a string with coordinates of the rectangle to be inverted.

For all images

NewRectsArray (): IRects

Creates a new collection of rectangles.

Only for color images

RemoveMotionBlur ()

Removes blurring caused by document, camera or scanner movement during scanning.

For all images

RemoveStamps ( color: TColorToFilter, rects: IRects )

This method deletes color stamps and other marks of the specified color from an image.

·color
The color of stamps to remove.

·rects
The rectangle collection of the stamps to remove.

Example

Here is a sample script for an On User Command event that removes red stamps from all the pages (entire page area is searched for stamps):

MainWindow.TaskWindow.OpenDocument( MainWindow.TaskWindow.EditorWindow.Document );

foreach (IPage page in MainWindow.TaskWindow.EditorWindow.Document.Pages)

{

if (page.Picture.IsColor)

{

IEditablePictureObject editablePicture = page.Picture.CreateEditableCopy();

IRects rects = editablePicture.NewRectsArray();

rects.AddRect(0, 0, editablePicture.Width - 1, editablePicture.Height - 1); // Вся страница

editablePicture.RemoveStamps(TColorToFilter.CTF_Red, rects);

page.ReplaceImage(editablePicture);

}

}

Only for color images

RemoveStampsExt ( colorsToFilter : string )

This method deletes color stamps and other marks of the specified color from an image. It is similar to the previous method but it also uses an improved algorithm that lets you delete more colors. It is advised that you use this method.

colorsToFilter - The color of stamps to remove.

·Accepts the following string values: Red, Green, Blue, Yellow, Orange, LightBlue, and Purple (not case-sensitive).

·You can specify multiple values, separating them with commas (e.g. "Red, Green").

·You can also specify an empty string ("") to make the program select the appropriate stamp color automatically. The program will delete any stamps it detects on an image which have one of the allowed color values.

Example

Here is a sample script for an On User Command event that removes red stamps from all the pages:

foreach (IPage page in Document.Pages)

{

if (page.Picture.IsColor)

{

IPictureObject picture = page.Picture;

IEditablePictureObject editablePicture = picture.CreateEditableCopy();

editablePicture.RemoveStampsExt("Red, Green");

page.ReplaceImage(editablePicture);

}

}

Only for color images

Rotate ( angle : int )

Rotates the image clockwise to the given angle.

For all images

Scale ( ratio : int )

Stretches or compresses the image relative to the base size of 100%.

The method applies to image pixel size only. Image physical size remains unchanged.

For all images

note Note: The rect parameter which is passed to the CutOut and Crop methods is a string in the form of "[left, top, right, bottom]". To get this string you can either call the ToString method for any object of the IRect type, or use the FCTools::Rect method.

Examples of scripts for custom processing stages that use methods of the IEditablePictureObject object

This script creates an object for the LocalContrastFilter filter with parameters set manually and applies the filter to an image.

foreach( IPage page in Document.Pages )

{

IPictureObject picture = page.Picture;

IEditablePictureObject editablePicture = picture.CreateEditableCopy();

// Creating an object with parameters (parameters are set by default)

ILocalContrastParams localContrastParams = editablePicture.CreateLocalContrastFilterParams();

// Setting parameters whose values will be changed afterwards

localContrastParams.Radius = 7;

localContrastParams.NoiseLevel = 200;

// Applying a filter to the image

editablePicture.ApplyLocalContrastFilter( localContrastParams );

// Replacing an image of a page with the modified one

page.ReplaceImage( editablePicture );

}

The script creates an object with parameters for the Binarize method and converts the image to black-and-white with set parameters.

foreach ( IPage page in Document.Pages )

{

IPictureObject picture = page.Picture;

IEditablePictureObject editablePicture = picture.CreateEditableCopy();

// Creating an object with parameters (parameters are set by default)

IBinarizationParams binarizationParams = editablePicture.CreateBinarizationParams();

// Setting the true or false parameter

binarizationParams.SmoothTexture = false;

editablePicture.Binarize( binarizationParams );

page.ReplaceImage( editablePicture );

}

This script increases the contrast levels, removes digital noise, applies automatic cropping, and removes blurring on the selected pages. The script is initiated by a Verification Station operator.

foreach( IPageItem pageItem in MainWindow.Selection.PageItems) {

pageItem.TaskWindow.CloseEditorWindow();

pageItem.TaskWindow.OpenDocument( pageItem.DocumentItem.Document );

IPage page = pageItem.Page;

IEditablePictureObject editablePicture = page.Picture.CreateEditableCopy();

// Applies the image transformations

editablePicture.AutoCrop();

editablePicture.ApplySigmaFilter();

editablePicture.ApplyMultiscaleLocalContrastFilter();

editablePicture.RemoveMotionBlur();

// Replaces the original document image with the edited image

page.ReplaceImage( editablePicture );

pageItem.TaskWindow.CloseDocument( pageItem.DocumentItem.Document );

}


IExportFieldsToRedact

What it does

The list of fields to be redacted in the resulting image.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Methods

Definition | Description
Add( field : IField ) | Adds a field to the list.
Clean() | Clears the list.

Properties

Name | Type | Access | Description
PlainList | string | Read-only | The list of fields to be redacted in the resulting image. Fields should be listed in a single line and separated by a semicolon.


IExportImageSavingOptions

What it does

Describes image saving options.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Methods

Definition

Description

Add( value : Object, [optional] position : int )

Places the value element in the text at certain position. If no position is specified, the element is placed at the end of the text.

note Note: The value parameter may be a character, a string, an ICharacterParams object, or an ICharactersParams object. Thus, you can copy character or text from other fields, preserving the markup and highlighting. If the regions of the characters you attempt to copy do not fit within the region of the new field, they will not be copied.

SetPdfDocumentInfo( type: TPdfDocumentInfoType, value: string )

The metadata of the PDF file.

Properties

Name

Type

Access

Description

AddProperFileExt

bool

Read/write

If the value is set to true, the extension is set according to the image format during image saving. By default, the value is set to false.

ColorType

string

Read/write

Color scheme. Admissible values: "FullColor", "GrayScale", "BlackAndWhite". Strings are not sensitive to the letter case.

FieldsToRedact

IExportFieldsToRedact

Read/write

The list of fields to be redacted in the resulting image.

Format

string

Read/write

Image saving format. Admissible expressions: "tif", "jpg", "bmp", "jpg2000", "pcx", "png", "pdf" plus "-s" (for PDF Searchable) and "-a" (for PDF/A) parameters. Strings are not sensitive to the letter case. Parameters begin with "-". They can be separated with spaces, tabs or no delimiters can be used. For example: "pdf -s", "pdf-a-s".

ImageCompressionType

TImageCompressionType

Read/write

Sets a compression method for the exported image. By default, a compression method is selected automatically based on the format and colors.

note Note: If an incompatible compression method is selected, the task will be placed in the Exceptions folder.

PdfAVersion

TPdfAVersion

Read/write

Specifies the PDF/A version.

PdfTextSearchArea

TPdfTextSearchAreaType

Read/write

Specifies where a text layer should be created for purposes of export to PDF-S.

Quality

int

Read/write

Image quality for JPEG-compression (in percentage terms).

RecognitionLanguages

string

Read/write

The list of languages that can be used for recognition of documents intended for export to searchable PDF. Consists of the internal names of languages in English divided by semicolons without spaces. If the list is empty, the language of the Document Definition applied to the document is used.

Is effective for annex pages only, as for pages with matched sections, only recognized fields have a text layer. As such fields are recognized in the recognition stage (not in the export stage), specifying this property does not influence recognition results for these fields.

Resolution

int

Read/write

Image resolution (measured in DPI).

SaveAttachmentsToPdf

bool

Read/write

Specifies whether to save the attachment of the PDF file.

ShouldOverwrite

bool

Read/write

Specifies if the existing file can be overwritten.

UseMRC

bool

Read/write

Enables compression using Mixed Raster Content (MRC) technology when exporting to PDF or PDF/A. MRC provides better compression for some images than the commonly used JPEG method, for example, for good quality images with high-contrast text against a uniform background. Use MRC to reduce the size of the resulting PDF file.

note Note: By default the flag is true when exporting to PDF and false when exporting to PDF/A.


IField

Show/Hide Hidden Text

What it does

A document field. The type of the field can be determined based on the Type property. For table fields, the Rows and Cell object methods are available.

Methods

Definition

Description

AddRegion( page : IPage, rect : string ) : IFieldRegion

Adds a region with the specified coordinates to the field. rect is a description of a rectangle formatted as [left,top,right,bottom]. This method requires write permissions for the IField object.

Sample code

Code sample that copies the region of field 1 to field 2:

field2.AddRegion( field1.Regions[0].Page, field1.Regions[0].SurroundingRect.ToString() )

note Note: This method isn't available for tables. To delete a region, use the IFieldRegion.Delete() method.

Cell( columnName : string, rowNum : int ) : IField

Retrieves a table cell by the column name and the row number. Available for tables only. Unavailable in script rules.

CheckRules( )

Checks rules for the given field and its children. Cannot be used in rules.

Field( Path : string) : IField

Search of the child element relative to the given element. Relative paths are used. Only synonyms of field names as they are defined in the rule settings can be used in rules.

GetLangs() : IVARAIANTArray

Returns the IDs of the languages detected in a field.

Example

An example of a user script that checks what languages are present in a field:

var t = Context.Field("Field Name").GetLangs();

var p = "";

foreach (var s in t)

{

p += s.ToString()+",";

}

FCTools.ShowMessage( "Language " + p);

HasField( parameter : string) : bool

Checks whether the field with the specified path exists. Relative paths are used. Only synonyms of field names as they are defined in the rule settings can be used in rules.

Suggest( VARIANT newSuggest )

Adds a prompt to the field.

note Note: Can be in the form of value or string. Added values are written with four decimal places.

For example, the method field.Suggest( "12.90" ) adds the prompt in the form of "12.90", while field.Suggest( 12.90 ) adds the prompt as 12.9000.

Properties

Name

Type

Access

Description

Caption

string

Read-only

The name of the field displayed on the form. The value of this property may be the same as the Name property.

Children

IFields

Read-only

Child items of the field (cells for tables). Unavailable in script rules.

FullName

string

Read-only

A full field name relative to the document. A unique identifier of the field in the document. Can be used for search of document fields through the Field method. In script rules the returned value coincides with Name and is not unique.

HasRuleError

bool

Read/write

Specifies whether a rule warning or error is associated with the field.

note Note: In script rules this property specifies whether to display the field in the error message.

A rule includes a collection of fields specified in the rule properties dialog box. If the rule check fails, an error message (specified in IRuleContext.ErrorMessage) and links to the fields from the collection are displayed in the document editor. Setting this property to false excludes the field from the list of links associated with the error.

IsExportable

bool

Read-only

Specifies whether the field is intended for export (according to the Document Definition settings).

IsIndexed

bool

Read-only

Specifies whether the field is indexable. If yes, the field value can be available from document and page external fields of the Document Definition.

IsMatched

bool

Read-only

Specifies whether the field is matched.

IsSuspicious

bool

Read-only

Specifies whether the field value is certainly recognized.

IsValid

bool

Read-only

Specifies if the field has no format errors.

IsVerified

bool

Read/write

Specifies whether the field is verified.

note Note: The property does not work for field groups.
The property can be set to true in rules even without "write" permissions for the field. To deselect the flag, "write" permissions are required.

If the flag is true, the field is displayed gray in the document editor, as if it were already confirmed. If the flag is false, the field is displayed white and needs to be confirmed. Once the field is verified, the flag is set to true.

note Note: Setting this flag to false does not provide routing the field to the Data Verification stage. For this, use the NeedVerification property of the IField or ICharacterParams interfaces.

IsVisible

bool

Read/write

Specifies whether the field should be reflected in document layout (according to the Document Definition settings).

Items

IFields

Read-only

Instances of the field (rows of table fields).

Name

string

Read-only

The field name in Document Definition.

NeedVerification

bool

Read/write

Specifies whether the field itself (not its characters) needs verification.

If the flag is true, the field is displayed against a red background in the document editor which means that the field needs verification. If the Send to field verification option is selected in the field properties, the field will be routed to the Data Verification stage. Once the field is verified, the flag is set to false.

To specify, whether particular characters, but not the whole field, need verification, use the NeedVerification property of the ICharacterParams interface.

ReadOnly

bool

Read-only

Specifies whether the field has "read-only" permissions (according to the Document Definition settings). When used in rules, indicates that the rule has "write" permission for the field.

ReadOnlyInForm

bool

Read/write

Specifies whether the field on the form has "read-only" permissions (according to the Document Definition settings).

Regions**

IFieldRegions

Read-only

An array of field regions. Overflowing fields can have several regions.

Rows

IFields

Read-only

A set of table rows. Unavailable for non-table fields.

Symbols

ICharactersParams

Read-only

Detailed information about the symbols properties.

Text

string

Read/write

The text representation of a field value.

Type

TExportFieldType

Read-only

The type of a field.

Value

VARIANT

Read/write

The value of the field in the form of VARIANT. The property returns an object of type Int32, if the settings of the field state that it contains an integer and its absolute value is not greater than 2147483647. If the absolute value of the field is greater than 2147483647, the property returns an object of type double.

** - The property is unavailable if the Advanced XML Export option in the license properties is deselected.


IFieldRegion

What it does

Represents a region of the document field.

note 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
Delete( ) | Deletes a field region.

Properties

Name | Type | Access | Description
Field | IField | Read-only | The document field that corresponds to the region. The property value can be "0".
IsMatched | bool | Read-only | Specifies whether the region is matched
Page | IPage | Read-only | The page that contains the region
PageIndex | int | Read/write | The number of the page in the document the region is located on
Picture * | IPictureObject | Read-only | The picture that corresponds to the region
Rects | IRects | Read-only | The array of rectangles the region consists of
SurroundingRect | IRect | Read-only | The rectangle that describes the whole region

note Note: In the custom recognition script the value of the Field property is always "0" as the field does not exist at the time of recognition.


Navigation: Using scripts in ABBYY FlexiCapture > Scripts for customizing processing stages > Objects >

Return to chapter overview

IFieldRegions

What it does

A collection of IFieldRegion objects.


IFields

Show/Hide Hidden Text

What it does

A collection of IField objects.

Methods

Definition

Description

AddNew( insertAt : int )

Inserts a new instance of a recurring field. The insertAt parameter specifies the position of the new instance in collection. The method allows you to create strings for a table block without region.

Cannot be used in script rules.

Sample code

Document.Field( "Page 1\\Address" ).Items.AddNew( 0 );

Delete( what : Object )

Deletes the instance of a field or a table row. The what parameter can be the item to be deleted from the collection or its index.

Cannot be used in script rules.


IFlexiCaptureTools

Show/Hide Hidden Text

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 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 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 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

System.Drawing.Bitmap bitmap = System.Drawing.Image.FromHbitmap( handle );

<do something>

IPictureObject FinalPicture = FCTools.PictureFromHBitmap( 300, bitmap.GetHbitmap().ToInt32() );

note 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 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.


ILocalContrastParams

What it does

Configures contrasting parameters.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Properties

Name | Type | Access | Description
Brightness | int | Read/write | Defines brightness of an image. Possible values are from 0 to 256.
Contrast | int | Read/write | Defines contrasting level.
NoiseLevel | int | Read/write | Defines noise level that will not increase. Possible values are from 0 to 256.
NoiseSensitivity | int | Read/write | Defines how sensitive an image is to an automatic noise level correction.
Radius | int | Read/write | A filter localization degree.
TargetBrightness | int | Read/write | A target brightness level. Possible values are from 0 to 255.


IMatchedSectionInfo

What it does

Contains detailed information about the Document Definition section which is matched on the page.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Methods

Definition | Description
FlexibleAlternativeName( ) : string | Returns the name of the FlexiLayout. Available only for documents that have already been opened.

Properties

Name

Type

Access

Description

DocumentDefinition

IDocumentDefinitionInfo

Read-only

Information about the Document Definition the section belongs to.

FlexibleInstanceId

int

Read-only

Index of a flexible section. A set of pages with the same index of the flexible section forms one document section.

The field is effective for flexible sections only.

If the value of FlexibleInstanceId is different for two pages on which the same definition of the flexible section is matched, it means that the pages belong to different document sections.

IsFlexible

bool

Read-only

Specifies whether the section is flexible.

Name

string

Read-only

The section name.

SectionDefinitionPageNumber

int

Read-only

The page number in the definition of the fixed section matched on the page.

The field is effective for fixed sections only.


IMatchingInfo

What it does

Stores parameters of matching Document Definitions and sections on a page.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Properties

Name | Type | Access | Description
DefinitionsList | string | Read/write | The list of sections and Document Definitions to be matched on the page divided by semicolon. Document Definitions names and section names are specified in the form of <DefinitionName> or <DefinitionName>\<SectionName> respectively. Only existing sections and Document Definitions can be used. For example, the first section of the sample Banking_eng is specified as follows: Banking_eng\Page 1.
ForceMatch | bool | Read/write | Specifies whether to force-match the sections. The flag can be set to true only if no more than one section is set. If the section list is empty and the flag is set to true, the page will be marked as an annex page which does not need recognition.
MaxPagesToMatch | int | Read/write | Specifies the maximum number of pages with which the multi-page sections may be matched. 0 means that there are no restrictions.
NeedRecognition | bool | Read/write | Specifies whether fields within the section need recognition. If the flag is set to false, fields will not be recognized after matching.

note Note: For the page to be recognized with all sections, do not modify the DefinitionsList property. If the DefinitionsList property is empty and the ForceMatch flag is not set, the page will not be recognized and the error message "No Document Definitions to match" will be logged. If the ForceMatch flag is set to true, the page will be marked as an annex page.


IPage

Show/Hide Hidden Text

What it does

Represents a page.

note 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

ApplyImageEnhancementProfile( name: string ) *

Applies the set enhancement profile to an image. If applying a profile creates new pages, they will be added to a document after the current page.

Example

The following code is an example of a script for the custom processing stage that applies the Photo enhancement profile to all images of the "photo" type:

foreach( IPage page in Document.Pages )

{

IPictureObject picture = page.Picture;

if(picture.IsPhoto())

{

page.ApplyImageEnhancementProfile("Photo");

}

}

MarkAsAnnex() *

Marks the page as an annex that does not require recognition.

ReplaceImage( newPicture : IPictureObject ) *

Replaces the page image with a new one.

The new image can be created by editing another IPictureObject object, loaded from file using the FCTools.LoadImage method or created from a bitmap file stored in memory (for example, .NET System.Drawing.Image) using the FCTools.PictureFromHBitmap method.

RevertToOriginalImage() *

Reverts to the original page image. This method can only be called if the HasOriginalImage property is set to true.

Example

The following code is an example of a script that takes the user back to the original page image on the Verification Station (if the Store original image during processing option is selected):

foreach( IPageItem pageItem in MainWindow.Selection.PageItems) {

pageItem.TaskWindow.CloseEditorWindow();

pageItem.TaskWindow.OpenDocument( pageItem.DocumentItem.Document );

IPage page = pageItem.Page;

if ( page.HasOriginalImage )

page.RevertToOriginalImage();

pageItem.TaskWindow.CloseDocument( pageItem.DocumentItem.Document );

}

SaveAs( filename : string, [optional] options : IExportImageSavingOptions ) *

Saves the page image depending on saving options. If options are not specified, the image is saved as *.tif.

Is an internal** field.

SaveSourceFile () *

Saves the source file from which the page image originated to the specified file. This method can only be called if the source file was saved. You can check if the source file was saved using the SourceFileGUID method.

See also Sample scripts describing export.

SaveXmlTextToFile( filename : string ) *

Saves all of the text on the page as an XML file to the specified folder.

SaveXmlTextToFileStorage() *

Saves all of the text on the page as an XML file to the folder of the batch in the file storage.

Properties

Name

Type

Access

Description

AsBatchItem *

IBatchItem

Read-only

Converts the page into an IBatchItem object.

Attachments *

IUserAttachments

Read-only

User attachments.

Comment *

string

Read-only

The page description.

Document *

IDocument

Read-only

The document that contains the page

ExcludedFromDocumentImage *

bool

Read/write, Mutable (can be modified even in scripts with read-only permissions)

Applies during export of the document image. Indicates that the current page image should not be exported when exporting the whole document.

Is an internal** field.

FullText *

string

Read-only

The recognized text on the page.

FullTextCharRects *

IRects

Read-only

Rectangles of characters from FullText.

HasOriginalImage *

bool

Read-only

Indicates whether or not the original page image is available.

Id

string

Read-only

The page identifier

ImageSource *

string

Read-only

The source of an image. If the image was imported from a file, this property will contain the path to the file. If the image was received from a scanner, ImageSource will contain the name of the source. Contains an empty value if the image was imported using a custom import.

ImageSourceFileSubPath *

string

Read-only

The path of the source image relative to the root of Hot Folder or the folder they were imported from.

ImageSourcePageNumber *

int

Read-only

The number of the source page in the file.

ImageSourceType *

string

Read-only

String "File", "Scanner" or "Custom" depending on the source

Index *

int

Read-only

The page index in the document

IsAnalyzed *

bool

Read-only

Specified whether the page is analyzed.

IsResultClassConfident *

bool

Read/write

Shows whether the page was confidently classified.

MatchedSection *

IMatchedSectionInfo

Read-only

Detailed information about the section which is matched on the page. If there are no matched sections on the page, the value is null.

Picture *

IPictureObject

Read-only

The page image.

Is an internal** field.

Rect *

IRect

Read-only

The rectangle of the page.

Is an internal** field.

ReferenceClassName *

string

Read-only

The reference class of the page.

ResultClassName *

string

Read/write

The name of the class that is assigned to the page.

SectionName *

string

Read-only

The document section name.

SourceFileGUID *

string

Read-only

The identifier of a source file of a document. Contains an empty string if the source file was not saved.

SourceImageRotation *

int

Read-only

The angle (in degrees) to which the source page image was rotated. Possible values: 0, 90, 180, 270. For pages rotated counter-clockwise, the value of clockwise rotation is returned (e.g. for image rotated 90˚ counter-clockwise, 270 is returned).

The property is available only if the document that contains the page is open.

Is an internal** field.

Returns the rotation angle for images:

1.imported from a Hot Folder;

2.loaded in the Project Setup Station or in the rich Verification Station;

3.rotated during recognition;

4.rotated manually in rich and remote stations;

5.rotated manually in the Web Verification Station or during verification in the Web Capture Station.

Ignores the rotation value for images:

1.rotated by scripts;

2.rotated in the (Web-) Scanning Station or during scanning in the Web Capture Station;

3.rotated automatically when correcting image skew.

** - The internal field requires loading the object into memory.


IPageClassificationResult

What it does

Stores information about results of classification of the page.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Properties

Name

Type

Access

Description

MatchedSections

string

Read-only

The list of section that can be matched. Contains entries in the form of <Document Definition Name>\<Section Name> divided by semicolon. This unmodified list can be passed to the IMatchingInfo object as the DefinitionsList parameter (IMatchingInfo::DefinitionsList). To pass the results, do the following:

1.Create a custom stage based on script.

2.In this stage, write a script which classifies pages and writes classification results to registration parameters.

3.In the Before matching script, write the code which uses classification results from the registration parameter if the registration parameter is specified.

note Note: When passing classification results to the Before matching script, set the IMatchingInfo.ForceMatch flag to false so that pages are not classified repeatedly with a script.

PageType

TPageClassificationType

Read-only

The type of the page


Navigation: Using scripts in ABBYY FlexiCapture > Scripts for customizing processing stages > Objects >

Return to chapter overview

IPages

What it does

A collection of IPage objects.


IPictureObject

Show/Hide Hidden Text

What it does

Represents the image of a page or a region.

The object implements the IPicture interface and provides access to some of its properties through the IDispatch interface.

For more details about the IPicture interface, see the corresponding article at MSDN.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Methods

Definition

Description

AnalyzePageObjects( [optional] reserved: Object ) : IPictureObjectsInfo

Defines objects on the page and returns the parameters of the page as seen by the recognition module. Some delay in the operation is possible.

CalcSuitabilityForOCR(): float

Shows how suitable is an image for OCR. Possible values are from 0.0 to 1.0.

Example

This script records results of method's operation for the selected documents to a page comment by clicking a user button:

foreach( IDocument doc in MainWindow.Selection.Documents )

{

MainWindow.TaskWindow.OpenDocument( doc );

foreach( IPage page in doc.Pages )

{

IPictureObject picture = page.Picture;

double score = (double)picture.CalcSuitabilityForOCR();

bool verdict = (bool)picture.IsSuitableForOcr();

page.Comment = score.ToString( "0.0000" ) + " / " + verdict.ToString();

}

}

CreateEditableCopy() : IEditablePictureObject

Creates an editable copy of the image.

DetectPageOrientation( [optional] language: string ) : int

Detects page orientation by the text on it. The internal name of the language is passed as the input parameter. If the language is not specified, the language of the current locale is used. Returns the angle (in degrees) to which the page must be rotated. The following values can be returned: 0, 90, 180 and 270.

IsPhoto(): bool

Shows whether an image is a photo.

IsSuitableForOcr(): bool

Shows whether an image is suitable for OCR.

SaveAs( filename : string, [optional] options : IExportImageSavingOptions )

Saves the image. If no options are specified, the image is saved as *.tif.

Properties

Name | Type | Access | Description
Handle | OLE_HANDLE | Read-only | The Windows GDI handle of the picture. In .Net this property can be used in System.Drawing.Image.FromHbitmap method to retrieve the picture object.
Height | int | Read-only | The height of the picture in dots
hPal | OLE_HANDLE | Read/write, Mutable (can be modified even in scripts with read-only permissions) | The Windows handle of the palette used by the picture. This property can be used in System.Drawing.Image.FromHbitmap as a second parameter.
IsBlackWhite | bool | Read-only | Whether the picture is black-and-white.
IsColor | bool | Read-only | Whether the picture is color.
IsGrayscale | bool | Read-only | Whether the picture is grayscale.
Type | SHORT | Read-only | The type of picture.
Width | int | Read-only | The width of the picture in dots
XResolution | int | Read-only | The horizontal image resolution
YResolution | int | Read-only | The vertical image resolution


IPictureObjectsInfo

What it does

An objects that stores the results of object detection.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Properties

Name | Type | Access | Description
BarcodesCount | int | Read-only | The number of barcodes detected on the image (2-D barcodes are not counted).
BlacknessPercentage | int | Read-only | The percentage of black on the page.
BlackSquaresCount | int | Read-only | The number of detected black squares.
TextObjectsCount | int | Read-only | The number of text objects.


IPrincipal

What it does

Represents a user or a user group in scripts.

Properties

Name | Type | Access | Description
Id | int | Read-only | A unique identifier
Name | string | Read-only | The name of a user or a group
Type | TPrincipalType | Read-only | The type of principal


Navigation: Using scripts in ABBYY FlexiCapture > Scripts for customizing processing stages > Objects >

Return to chapter overview

IPrincipals

What it does

A general collection of users and user groups (a collection of IPrincipal objects).


IProcessingCallback

What it does

Passes information about the processing progress.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Methods

Definition | Description
ReportError( error : string ) | Records an error message to the log. The operation that contains an error message is considered to have failed.
ReportMessage( message : string ) | Records an information message to the log.
ReportWarning( warning : string ) | Records a warning message to the log.

Properties

Name | Type | Access | Description
ShouldStop | bool | Read-only | Checks if the task was cancelled or not (whether the user clicked Cancel).


IProject

What it does

Represents the project in scripts.

note 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
GetDocumentDefinitions( [optional] reserved :object ) : IDocumentDefinitionInfoArray | Returns information about the Document Definitions included in the project. The reserved parameter must be null or left unspecified.

Properties

Name | Type | Access | Description
EnvironmentVariables * | IProperties | Read-only | Returns an array of the environment variables used in the project.
ExportRootPath * | string | Read-only | The root export path as it is defined in the project settings. Can be an empty string.
Id | string | Read-only | Identifier of the project (only for projects that have been uploaded to the server).
Name | string | Read-only | The name of the project.
Path * | string | Read-only | The path to the project files.
Principals * | IPrincipals | Read-only | An array of users or groups.


IProperties

What it does

A collection of IProperty objects.

Methods

Definition | Description
Delete (name : string) | Deletes the property with the specified name. This method is unavailable from the script rules.
Get (name : string) : string | Retrieves the property value by the name.
Has (name : string) : bool | Checks whether the set contains the property with the specified name.
Set (name : string, value : string) | Sets the value of a named property. Creates a property, if it does not exist. This method is unavailable from the script rules. note Note: For information on how to change document state, refer to the ITaskWindow interface.


IProperty

What it does

Represents a named property of a document or a batch.

Properties

Name | Type | Access | Description
Name | string | Read-only | The property name
Value | string | Read-only | The property value


IPropertyModificationInfo

What it does

Stores information about modification of a document (or a batch) property.

A set value can be corrected.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Properties

Name | Type | Access | Description
Name | string | Read-only | The name of the named parameter (only for the type PT_NamedPropertyValue)
NewValue | string | Read/write | A new value of the property. The script allows to set the value in a different form, e.g. to normalize the value.
PropertyType | TPropertyType | Read-only | The type of a property being modified


IRecordCheckResult

What it does

Represents the result of a check of a record in a data set (used during script checks).

warning Important! To enable script checks, enable the Check records using script option in the data set's properties.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Properties

Name | Type | Access | Description
CheckSucceeded | bool | Read/write. Can be changed even in scripts with read permissions only. | Indicates that the check succeeded and the record is valid.
ErrorMessage | string | Read/write. Can be changed even in scripts with read permissions only. | Contains an error message and indicates that the record is invalid.


IRecordset

What it does

Represents the result of a search for a set of records in a data set.

Methods

Definition | Description
GetRecord ( index : int ) : IDataSetRecord | Returns a record with the specified index number. The resulting IDataSetRecord is available for reading only.

Properties

Name | Type | Access | Description
Count | int | Read-only | Number of records.


IRect

What it does

Represents a rectangle.

Methods

Definition | Description
ToString() : string | Represents a rectangle as a string of the form "[left,top,right,bottom]".

Properties

Name | Type | Access | Description
Bottom | int | Read-only | The coordinate of the bottom edge.
Left | int | Read-only | The coordinate of the left edge.
Right | int | Read-only | The coordinate of the right edge.
Top | int | Read-only | The coordinate of the top edge.

note Note: The above coordinates are in pixels.


IRects

What it does

A collection of IRect interfaces.

Methods

Definition | Description
AddRect (left: int, top: int, right: int, bottom: int) | Adds another rect element to the rectangle collection.


IRoutingRuleResult

What it does

Represents the result of the routing script execution.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Properties

Name

Type

Access

Description

CheckSucceeded

bool

Read/write

Specifies whether the check succeeded

DocumentComment

string

Read/write

A comment which is added to the document in the event of successful routing

PrincipalId

int

Read/write

A user or user group identifier that is assigned to the document if the routing succeeds. If the document is not assigned to any principal in the routing script, the PrincipalId value is "0". The "0" value indicates that the document can be processed by any user.

For details, see IPrincipal.

Priority

TProcessingPriority

Read/write

The priority that will be assigned to the document if the routing script returns true.

ProhibitedUserId

int

Read/write

Allows you to specify or get the identifier of the user who is not allowed to process the task in the following stage. By default the value is "0" which means that the task can be processed by any user.

note Note: The property applies only to those tasks which are sent to a stage automatically according to a workflow scheme. If the task is sent to a stage manually, the property value is ignored.


IRuleContext

What it does

A context object of rules. Represents the object, at whose level the rule was created.

The object implements IField interface (by means of providing access to the context field of the rule) and also has additional methods.

Methods

Definition | Description
DataSet ( dataSetName : string ) : IDataSet | Accesses the cached data set. The resulting IDataSet is available for reading only.

Properties

Name | Type | Access | Description
CheckSucceeded | bool | Read/write, Mutable (can be modified even in scripts with read-only permissions) | Specifies whether the check succeeded
Document | IDocument | Read-only | Access to the document
ErrorMessage | string | Read/write, Mutable (can be modified even in scripts with read-only permissions) | A message concerning a rule error
Fields | IFields | Read-only | Collection of fields in the rule. Specified in rule settings.
FocusedField | IField | Read/write, Mutable (can be modified even in scripts with read-only permissions) | The field to be focused when clicking a rule error (the field that caused a rule error).
FocusRect | IRect | Read-only | A rectangle in screen coordinates, the executed action refers to (a rectangle of the window). Applies in the Custom Action script only.
ParentWindow | int | Read-only | A handle of the parent window. Applies in the Custom Action script only.


IRuleError

What it does

Represents a rule error, format error or merging error in the document.

note 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
GetFields() : IFields | Returns the fields associated with the given field error.

Properties

Name | Type | Access | Description
IsWarning | bool | Read-only | Specifies whether the message is a warning.
Message | string | Read-only | The text of the error message.
RuleName | string | Read-only | The name of the rule that caused the error. For format and merging errors, an empty string is returned.
RuleTags * | IRuleTags | Read-only | Returns the IRuleTags object with rule tags.
Type | TRuleErrorType | Read-only | The error type.


Navigation: Using scripts in ABBYY FlexiCapture > Scripts for customizing processing stages > Objects >

Return to chapter overview

IRuleErrors

What it does

A collection of IRuleError interfaces.


IRuleTag

What it does

Represents a tag of a rule.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Properties

Name | Type | Access | Description
Value | string | Read-only | The value of the tag.


IRuleTags

What it does

Represents a collection of IRuleTag objects.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Methods

Definition | Description
HasTagWithValue( string tagValue ) | Checks if a tag with the specified value is present in the collection. Returns true if it is, false if it is not.


IScriptBinaryAttributes

What it does

Represents a set of bool flags.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Methods

Definition | Description
Has( TStateType : int ) : bool | Checks whether the requested flag is set


IScriptDefinitionContext

What it does

Provides access to some properties of the objects that may be used in scripts.

Methods

Definition | Description
LoadFile( name: string) : IUserAttachment | Loads a file that is attached to the object that contains the script. Some possible applications for this method are loading a dictionary from a FlexiLayout using its name or loading a reference assembly file. This method is also used in ABBYY FlexiCapture for Invoices scripts to load XML description files.

Properties

Name | Type | Access | Description
Project | IProject | Read-only | Provides access to information about the project.


ISectionDefinitionInfo

What it does

Describes a section in a Document Definition.

Properties

Name | Type | Access | Description
IsFlexible | bool | Read-only | Whether the section is flexible or not.
Name | string | Read-only | Section name.


Navigation: Using scripts in ABBYY FlexiCapture > Scripts for customizing processing stages > Objects >

Return to chapter overview

ISectionDefinitionInfoArray

What it does

A collection of objects of type ISectionDefinitionInfo.


IShadowsHighlightsParams

What it does

Configures shadow parameters.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Properties

Name | Type | Access | Description
RadiusHigh | int | Read/write | A degree of filter localization; a radius of light exposed spots processing.
RadiusLow | int | Read/write | A degree of filter localization; a radius of shadow processing.
StrengthHigh | int | Read/write | How strongly light exposed spots are processed; a degree of bright areas darkening.
StrengthLow | int | Read/write | How strongly shadows are processed; a degree of dark areas lightening.
TonalWidthHigh | int | Read/write | The width of the processed brightness range on light exposed spots. The value is set in percentage points.
TonalWidthLow | int | Read/write | The width of the processed brightness range on shadows. The value is set in percentage points.


IStageInfo

What it does

Stores information about a processing stage of the document.

Properties

Name | Type | Access | Description
PrincipalId | int | Read-only | The identifier of a user or a group which can receive a task with the given document. "0" indicated that the task is not assigned to any principal (user or group). For details, see IPrincipal.
StageId | int | Read-only | The identifier of the current processing stage
StageName | string | Read-only | The name of the current processing stage
TaskId | int | Read-only | The identifier of the task. If there is no task, its value is "0".


IUserAttachment

What it does

The interface is used for working with the contents of user attachment. The object represents an array of bytes. Bytes can be accessed as objects in the collection. The byte value at any position can be changed.

Methods

Definition | Description
FromFile( fileName : string) | Replaces the attachment contents with a file from the specified path.
SetSize( newSize : int) : bool | Changes the size of the file. Files whose size is smaller than the specified value are increased, files with larger size are cut.
ToFile( fileName : string) | Saves the file to the specified path on a hard disk.
UploadAttachment( ) | Saves changes made to the attachment.

Properties

Name | Type | Access | Description
AsString | string | Read/write | Represents the file as one Unicode string. Files can be both written and read as Unicode strings.
Name | string | Read-only | The name of the file


IUserAttachments

What it does

A collection of the IUserAttachment objects.

note 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
AddNew( name : string) : IUserAttachment * | Creates a new attachment file and starts editing it. warning Important! The method creates a new IUserAttachment item without adding it to the collection. To add the item to the collection and make it available for editing, the UploadAttachment( ) method must be called. note Note: If a non-zero attachment with this name already exists, an exception will be returned.
Delete( name : string) * | Deletes the attachment file with the given name. note Note: When deleting an element, its existence is not checked. Thus the method succeeds even if the element being deleted is not in the collection.
Get( name : string) : IUserAttachment * | Accesses the attachment file with the given name
Has( name : string) : bool * | Checks whether the attachment file with the specified name exists

Properties

Name | Type | Access | Description
IsEmpty | bool | Read-only | Checks whether the array contains any attachment files
Names | IVariantArray | Read-only | The array with the names of attachment files


IUserSessionInfo

What it does

Information about the session of the current user of the Processing Station.

During verification, returns information about the session of the user doing the verification (including remote verification).

Properties

Name | Type | Access | Description
PrincipalId | int | Read-only | The ID of the user on the Application Server.
RoleId | int | Read-only | The ID of the user's role.
SessionId | int | Read-only | The identifier of the connection to the Application Server.
UserName | string | Read-only | The user name. When working without the Application Server, the name of the user under which the process is running is returned. When connected to the Application Server, tries to retrieve the name of the user logged into the Application Server.


IValue

What it does

Represents a field value.

note Note. This object is not available on the Web Verification Station for checking rules locally.

Properties

Name | Type | Access | Description
ErrorMessage | string | Read/write | Message concerning a value formatting error
Symbols | ICharactersParams | Read-only | Detailed information about symbols properties
Text | string | Read/write | Text representation of the value


Navigation: Using scripts in ABBYY FlexiCapture > Scripts for customizing processing stages > Objects >

Return to chapter overview

IVARIANTArray

What it does

Represents a collection of items of Variant type.


TAssemlingErrorType

What it does

The type of assembly error.

Admissible values:

·AET_ObligatoryItemOmitted = 0 - A missing section

·AET_RubbishItem = 1 - An extra page

·AET_AssemblingRuleError = 2 - A custom assembly error

·AET_KeyValuesMismatch = 3 - Values of the key fields mismatch (there can be no more than one error of this type within the document)

·AET_ProhibitedTopLevelDocument = 5 - A child document in the set is moved to the top level


TBatchItemType

What it is

An enumerator of the int type that describes the IBatchItem element.

Admissible values:

·BIT_Page = 0
Indicates a page.

·BIT_Document = 1
Indicates a document.

·BIT_Batch = 2
Indicates a batch.


TColorToFilter

What it is

Specifies the color of stamps to remove. Used in the RemoveStamps method of the IEditablePictureObject object,

Admissible values:

·CTF_Red = 0

·CTF_Green = 1

·СTF_Blue = 2

·CTF_Yellow = 3


TExportFieldType

What it does

Enumeration of int type. Defines the type of the document fields.

Admissible values:

·EFT_TextField = 0 - A text field

·EFT_DateTimeField = 1 - A date field

·EFT_NumberField = 2 - A number field

·EFT_PictureField = 3 - A picture field

·EFT_CurrencyField = 4 - A currency field

·EFT_Checkmark = 5 - A checkmark

·EFT_CheckmarkGroup = 6 - A checkmark group

·EFT_Group = 7 - An ordinary group

·EFT_Table = 8 - A table. You can access table rows through the Items or the Rows methods of the IField object.

·EFT_Section = 9 - A document section

·EFT_Document = 10 - A document. Fields of this type can occur only in rules written for the level of a document. Most parameters of such fields are unavailable.

·EFT_TableRow = 11 - A table row. Table cells are the child fields of the row. They are available through the method Children.

·EFT_TimeField = 12 - A time field


TExportType

What it does

The type of the export target.

Admissible values:

·ET_File = 1 - Export to file

·ET_Database = 2 - Export to database

·ET_Script = 3 - Script export

·ET_SharePoint = 4 - Export to SharePoint

·ET_Unknown = 5 - The type is not specified in the event of an error that does not concern any particular exporter


TImageCompressionType

What it does

Sets a compression method for the exported image. Applies in the IExportImageSavingOptions interface.

Admissible values:

·ICT_Auto = -1. The type of compression is selected automatically.

·ICT_Lzw = 1

·ICT_Jpeg = 2

·ICT_PackBits = 3

·ICT_Png = 4

·ICT_Uncompressed = 5

·ICT_Zip = 6

·ICT_CcittGroup4 = 7


TPageClassificationType

What it does

The type of the page defined by the Classifier. Applies in the IPageClassificationResult interface.

Types:

·PCT_Unknown = 0 - An unknown page type.

·PCT_Empty = 1 - An empty page.

·PCT_FixedForm = 2 - A page with a fixed layout.

·PCT_FlexibleMultiPageFormHeader = 3 - A header of a multipage flexible section.

·PCT_FlexibleMultiPageFormNonHeader = 4 - A page in a multipage flexible section which is not a header.

·PCT_FlexibleSinglePageForm = 5 - A one-page flexible section.

·PCT_ClassWithoutDefinition = 6 - A page of the class without Document Definition.


TPdfAVersion

What it does

PDF/A version. Applies in the IExportImageSavingOptions interface.

Admissible values:

·PAV_1a = 0 for PDF/A-1a

·PAV_1b = 1for PDF/A-1b

·PAV_2a = 2for PDF/A-2a

·PAV_2b = 3 for PDF/A-2b

·PAV_2u = 4 for PDF/A-2u

·PAV_3a = 5 for PDF/A-3a

·PAV_3b = 6 for PDF/A-3b

·PAV_3u = 7 for PDF/A-3u


TPdfDocumentInfoType

What it does

Types of the fields in the PDF document. Applies in the IExportImageSavingOptions interface.

Admissible values:

·PDIT_Author = 0 the author of the document

·PDIT_Title = 1 the title of the document

·PDIT_Subject = 2 the subject of the document

·PDIT_KeyWords = 3 the keywords of the document


TPdfTextSearchAreaType

What it does

Specifies where a text layer should be created for purposes of export to PDF-S. Applies in the IExportImageSavingOptions interface.

Admissible values:

·PTSAT_AttachmentsOnly = 0 Only in annexes

·PTSAT_FormsOnly = 1 Only in pages with a form

·PTSAT_AllPages = 2 In all pages


TPrincipalType

What it does

Types of principals (users or processes that have an account in the current environment).

Admissible values:

·PT_User = 0 - A regular user

·ST_Group = 1 - A user group


TProcessingPriority

What it does

The processing priority of a document or a batch.

note Note: The value is passed to the event Document priority change (or Batch priority change) in the form of a string. A new value must be also specified in the form of a string.

Admissible values:

·PP_Lowest = -2 - The lowest priority. Passed in the form of the string "lowest".

·PP_Low = -1 - A low priority. Passed in the form of the string "low".

·PP_Normal = 0 - A normal priority. Passed in the form of the string "normal".

·PP_High = 1 - A high priority. Passed in the form of the string "high".

·PP_Highest = 2 - The highest priority. Passed in the form of the string "highest".

·PP_ExtraHigh = 3 - The extra-high priority. Passed in the form of the string "extrahigh".


TPropertyType

What it does

The type of document (or batch) properties. Applies in the IPropertyModificationInfo interface.

Types:

·PT_Name = 0 - The name. Applies for batches only.

·PT_Comment = 1 - The comment.

·PT_BatchType = 2 - The batch type. Applies for batches only.

·PT_NamedPropertyValue = 3 - A named property (formerly a registration parameter)

·PT_Id = 4 - The identifier (the ExternalId of the document). Its value changes occasionally and only for documents. The value changes mostly during import.

·PT_SLAExpirationDate = 6 - The deadline for processing the batch.


TRuleErrorType

What it does

The type of the error. Applies in the IRuleError interface.

Types:

·ET_RuleError = 0 - A rule error.

·ET_FormatError = 1 - A format error.

·ET_MergeVersionError = 2 - An error of merging different versions of the document.


TStateType

What it does

Types of document states. Used in the event Document state changed. The ChangedState parameter of this event can be used to get information on possible changes of each state type.

Admissible values:

·ST_Preprocessed = 0 - Whether the document is preprocessed. The value can be changed only from false to true.

·ST_Analyzed = 1 - Whether the document is analyzed

·ST_Recognized = 2 - Whether the document is recognized (a document is considered recognized if there is at least one recognized section in it)

·ST_HasErrors = 3 - Whether the document has errors (including format errors)

·ST_Assembled = 4 - Whether the document is assembled

·ST_Verifyed = 5 - Whether the document is verified completely

·ST_Exported = 6 - Whether the document is exported

·ST_HasLayout = 7 - Whether the document has a layout. (In analyzed document a layout can also be missing, e.g., if the page has an unknown type.)


Sample scripts

This section contains sample scripts written in JScript® and VBScript scripting languages.

listPicture Sample scripts for creating custom rules

listPicture Sample scripts describing export

listPicture Sample assembly scripts

listPicture Other sample scripts


Sample scripts for creating custom rules

Show/Hide Hidden Text

Automation rule

This example demonstrates a table data check. The rule checks whether the table data matches the value in the resulting field. The table has columns with prices and quantities of certain goods. The rule has been written at the level of a section containing the table and the resulting field.

[VBScript]
dim autoRule
set autoRule = CreateObject( "AutomationRule.CheckDoc" )
autoRule.CheckResult me.FIELD("cost"), me.FIELD("number"), me.FIELD("Result"), me

[JScript]
var autoRule = new ActiveXObject( "AutomationRule.CheckDoc" );
autoRule.CheckResult( Field("cost"), Field("number"),
Field("Result"), this );

Code of an ActiveX component

The code provided here is a CheckDoc class code from the AutomationRule project, which is used in the scripts mentioned above.

Option Explicit

' Checks whether table data matches the result
' column1 - price column
' column2 - quantity column
' resultField - resulting field (<Total> or equivalent)
' docObj - document node being checked
Public Sub CheckResult(ByRef column1 As Object, ByRef column2 As Object, _
ByRef resultField As Object, ByRef docObj As Object)
On Error GoTo err_h
Dim costItems AsObject, numItems AsObject
Dim curCost AsDouble, curNum AsLong, sum AsDouble
Dim result AsDouble
Dim i AsLong
Set costItems = column1.Items
Set numItems = column2.Items
' summing up table data
sum = 0
For i = 0 To costItems.Count - 1
curCost = costItems.Item(i).Value
curNum = numItems.Item(i).Value
sum = sum + curNum * curCost
Next
' comparison accuracy result rounded to the 2nd digit after the decimal point
result = resultField.Value
If (Round(result, 2) = Round(sum, 2)) Then
docObj.CheckSucceeded = True
Else
docObj.CheckSucceeded = False
docObj.ErrorMessage = "Table data does not match the resulting value"
resultField.Suggest sum
End If
Exit Sub
err_h:
docObj.ErrorMessage = Err.Description
docObj.CheckSucceeded = False
End Sub

Search in the variants list

The rule code provided below checks whether the field value matches one of the values in the list. If not, a rule error flag appears, and the field receives a list of suggested values. Depending on the check result, the field is marked as certainly or uncertainly recognized.

[VBScript]
'remember field value
Dim fieldValue
fieldValue = me.Field("Field6").Value
'create list of values for check
Dim list(5)
dim i
for i = 0 to 4
list(i) = "2" & i
next
dim success
success = false
'check whether field value matches values in the list
for i = 0 to 4
if list(i) = fieldValue Then
success = true
exit for
end if
next
'depending on the check result, set a corresponding certainly status for the field
me.Field("Field6").IsVerified = success
'fill the list of suggestions for the field a suggestion can be any of the
'suitable values
if success = false then
for i = 0 to 4
me.Field("Field6").Suggest( list(i) )
next
end if
'place an error flag
me.CheckSucceeded = success
[JScript]
// remember field value
var fieldValue = Field("Field6").Value;
// create list of values for check
var list = new Array(5);
for( i = 0; i < 5; i++ ) {
list[i] = "2" + i
}
var success = false;
// check whether field value matches values in the list
for( i = 0; i < 5; i++ ) {
if( list[i] == fieldValue ) {
success = true;
break;
}
}
// depending on the check result, set a corresponding certainly status for the field
Field("Field6").IsVerified = success;
// fill the list of suggestions for the field a suggestion can be any of the
// suitable values
if( !success ) {
for( i = 0; i < 5; i++ ) {
Field("Field6").Suggest( list[i] );
}
}
// place an error flag
CheckSucceeded = success;

Field match check

The rule code provided below checks whether the checked field has matched.

[VBScript]
if me.Field("InvoiceNumber").IsMatched then
me.CheckSucceeded = true
else
me.CheckSucceeded = false
me.ErrorMessage = "Field InvoiceNumber is not matched"
end if
[JScript]
if( Field("InvoiceNumber ").IsMatched ) {
CheckSucceeded = true;
} else {
CheckSucceeded = false;
ErrorMessage = "Field InvoiceNumber is not matched";
}

Checkmark check

The rule code provided below checks whether the checkmark has been selected or not

[VBScript]
if me.Field("Page status").Value then
me.CheckSucceeded = true
else
me.CheckSucceeded = false
me.ErrorMessage = "Page status is not checked"
me.FocusedField = me.Field(Page status) ""
end if
[JScript]
if( Field("Page status").Value ) {
CheckSucceeded = true;
} else {
CheckSucceeded = false;
ErrorMessage = "Page status is not checked";
FocusedField = Field("Page status");
}

Checkmark group check

The rule code provided below iterates all the checkmarks in the group and if none are selected, selects the first one. The rule is written for the checkmark group level. All the checkmarks in the group have been added to the list of fields included into the rule. The group itself has been excluded from the list. For the default checkmark (the first one), the ReadOnly flag has been disabled. If there are no checkmarks in the group, a rule error flag is enabled.

This sample code iterates all the fields included in the rule. Since field names are not specified in the code, this code can be used for any checkmark group.

[VBScript]
if me.Fields.Count = 0 then
me.CheckSucceeded = false
me.ErrorMessage = "There are no checkmarks in the group"
else
dim isChosen, i
isChosen = false
for i = 0 to me.Fields.Count - 1
if me.Fields.Item( i ).Value then
isChosen = true
exit for
end if
next
if Not isChosen then
me.Fields.Item(0).Value = true
end if
me.CheckSucceeded = true
end if
[JScript]
if( Fields.Count == 0 ) {
CheckSucceeded = false;
ErrorMessage = "There are no checkmarks in the group";
} else {
var isChosen = false;
var i;
for( i = 0; i < Fields.Count; i++ ) {
if( Fields.Item( i ).Value ) {
isChosen = true;
break;
}
}
if( !isChosen ) {
Fields.Item(0).Value = true;
}
CheckSucceeded = true;
}

Field reliability check

The rule code provided below checks the number of uncertain characters in the field and clears the field if the number of uncertain characters is greater than or equals three. This is an Autocorrection script.

[VBScript]
Dim totQty, suspQty
Dim i
totQty = me.Symbols.Count
suspQty = 0
for i = 0 to totQty - 1
if me.Symbols.Item(i).IsSuspicious = true then
suspQty = suspQty + 1
end if
next
if suspQty >= 3 then
me.Text = ""
end if
[JScript]
var susp, qty, strpos, i, SC, strposPrev
strposPrev = 1
qty = 0
SC = "1"
susp = SuspiciousSymbols

for ( i = 0; i < susp.length; i++) {
strpos = susp.indexOf (SC,i)
if ((strpos != strposPrev) && (strpos != -1)) {
qty = qty + 1
strposPrev = strpos
}
}

if (qty >= 3) {
text = ""
}

Character replacement without loosing regions and verification flags

The script replaces "+" with "&" without loosing information about regions and verification flags. This is an Autocorrection script.

[VBScript]
Dim totQty
Dim i
totQty = me.Symbols.Count
for i = 0 to totQty - 1
if me.Symbols(i).Symbol = "+" then
me.Symbols(i).Symbol = "&"
end if
next

Batch integrity check

Checks if the number of documents specified on the control page coincides with the inventory in the batch and with the number of documents actually processed. If the numbers do not match, an error is returned.

[VBScript]
dim DQty
dim i
for i = 0 to me.Batch.Documents.Count - 1
if me.Batch.Documents.Item(i).DefinitionName = "Inv" then
DQty = me.Batch.Documents.Item(i).IndexedItemValue("DocQty")
exit for
end if
next

dim AcQty
AcQty = me.Batch.Documents.Count
if acqty <> DQty then
me.CheckSucceeded = false
me.ErrorMessage = "Incorrect number of documents in the batch:" & " " & AcQty& ". " & "Expected number:" & " " & DQty & "!"
end if
[JScript]
for ( i = 0; i < [Batch.Documents.Count - 1]; i++ ) {
var TemplName = Batch.Documents.Item(0).DefinitionName;
if (TemplName = "Inv") {
var DQty = Batch.Documents.Item(i).IndexedItemValue("DocQty");
break ;
}
}

var AcQty = Batch.Documents.Count -1
if (AcQty != DQty) {
CheckSucceeded = false;
ErrorMessage = "Incorrect number of documents in the batch:" + " " + AcQty + "." + "Expected number:" + " " + DQty +"!" ;
}

Counting the number of documents and pages in a document set

This script counts the number of pages in a document set section and throws an error if the set contains an element of an unknown type.

int subDocumentsCount = 0;

int pagesCount = 0;

IBatchItem asBatchItem = Context.Document.AsBatchItem;

IBatchItems items = asBatchItem.ChildItems;

foreach (IBatchItem item in items)

{

if ( item.Type == TBatchItemType.BIT_Page )

{ pagesCount ++; }

else if( item.Type == TBatchItemType.BIT_Document )

{ subDocumentsCount ++; }

else

{

Context.CheckSucceeded = false;

Context.ErrorMessage = "Unknown type of element in set";

}

}

Context.Field("Field").Text = subDocumentsCount.ToString() + " " + pagesCount.ToString();


Sample scripts describing export

Show/Hide Hidden Text

Getting field values during export

This sample code shows how you can get the value of a field during export. You may use this value to name the files into which images or date are exported. If there is no such field in the document, an error will occur.

The structure of the document to be exported:

Section 1
Field1
…
Group1
Field2
…
…
FieldN
Section 2
Field1
…
FieldK

[VBScript]
Dim field1Value, field2Value
' Gets the value of Field1 in Section 1
if Not IsNull( me.Field( "Section 1\Field1" ).Value ) then
field1Value = me.Field( "Section 1\Field1" ).Value
end if
' Gets the value of Field2 in Group1 in Section 1
if Not IsNull( me.FIELD( "Section 1\Group1\Field2" ).Value ) then
field2Value = me.Field( "Section 1\Group1\Field2" ).Value
end if
' Gets the value of Field1 in Section 1 if the section has multiple instances
if Not me.Field( "Section 1" ).Items Is Nothing then
dim curPage
for each curPage in me.Field( "Section 1" ).Items
if Not curPage.Children Is Nothing then
dim curField
for each curField in curPage.Children
if curField.Name = "Field1" And Not IsNull( curField.Value ) then
field1Value = curField.Value
exit for
end if
next
end if
next
end if

[JScript]
// Gets the value of Field1 in Section 1
if( Field("Section 1\\Field1").Value != null ) {
var field1Value = Field("Section 1\\Field1").Value;
}
// Gets the value of Field2 in Group1 in Section 1
if( Field("Section 1\\Group1\\Field2").Value != null ) {
var field2Value = Field("Section 1\\Group1\\Field2").Value;
}
// Gets the value of Field1 in Section 1 if the section has multiple instances
if( Field( "Section 1" ).Items != null ) {
var i, j;
for( i = 0; i < Field( "Section 1" ).Items.Count; i++ ) {
var curPage = Field( "Section 1" ).Items.Item( i );
if( curPage.Children != null ) {
for( j = 0; j < curPage.Children.Count; j++ ) {
var curField = curPage.Children.Item( j );
if( curField.Name == "Field1" && curField.Value != null ) {
var field1Value = curField.Value;
break;
}
}
}
}
}

Exporting page images

The code in this example shows how to export images of all document pages using the required file format, color scheme and resolution. Images are saved by the page, i.e. every page in a separate file.

The files in this example are named "page1.tif," "page2.tif," etc. You can change the file naming mechanism if required. For example, you can create file names based on the value of a field.

[VBScript]
dim fso, folderName
set fso = CreateObject("Scripting.FileSystemObject")
folderName = "d:\ExportImages"
if Not fso.FolderExists( folderName ) then
fso.CreateFolder folderName
end if
dim imageOptions
set imageOptions = FCTools.NewImageSavingOptions
imageOptions.Format = "tif"
imageOptions.ColorType = "BlackAndWhite"
imageOptions.Resolution = 600
dim i
for i = 0 to me.Pages.Count - 1
dim fileName
' Sets the desired name and extension for the file depending on the selected format
fileName = fso.BuildPath( folderName, "page" & (i+1) & ".tif" )
me.Pages.Item(i).SaveAs fileName, imageOptions
next

[JScript]
var fso = new ActiveXObject("Scripting.FileSystemObject");
var folderName = "d:\\ExportImages";
if( !fso.FolderExists( folderName ) ) {
fso.CreateFolder( folderName );
}
var imageOptions = FCTools.NewImageSavingOptions();
imageOptions.Format = "tif";
imageOptions.ColorType = "BlackAndWhite";
imageOptions.Resolution = 600;
var i;
for( i = 0; i < Pages.Count; i++ ) {
// Sets the desired name and extension for the file depending on the selected format
var fileName = fso.BuildPath( folderName, "page" + (i+1) + ".tif" );
Pages.Item(i).SaveAs( fileName, imageOptions );
}

Exporting a table

This example shows how to export a table to a *.txt file.

[VBScript]
dim fso, txtFile, fileName
set fso = CreateObject("Scripting.FileSystemObject")
fileName = "d:\TestExportTable.txt"
set txtFile = fso.CreateTextFile( fileName, true )
txtFile.WriteLine "Table"
dim table, row, cell, rowNumber
set table = me.Field("Page 1\Table")
rowNumber = 1
for each row in table.Items
txtFile.WriteLine "RowNumber = " & rowNumber
for each cell in row.Children
txtFile.Write cell.Value & " "
next
txtFile.WriteBlankLines 1
rowNumber = rowNumber + 1
next
txtFile.Close
set txtFile = nothing
set fso = nothing

[JScript]
var fso, txtFile, fileName;
fso = new ActiveXObject("Scripting.FileSystemObject");
fileName = "d:\\TestExportTable1.txt";
txtFile = fso.CreateTextFile( fileName, true );
txtFile.WriteLine( "Table" );
var table, i, j;
table = Field("Page 1\\Table");
var rows = table.Items;
for( i = 0; i < rows.Count; i++ ) {
txtFile.WriteLine( "RowNumber = " + ( i+1 ) );
var cells = rows.Item(i).Children;
for( j = 0; j < cells.Count; j++ ) {
txtFile.Write( cells.Item(j).Value + " " );
}
txtFile.WriteBlankLines(1);
}
txtFile.Close();

Exporting a document of any nesting level

This example shows how to export fields of a document of any nesting level using custom-made functions from the global export module. If you need to export document fields of variable nesting, it is recommended to use an external COM component (see next example).

Core export code

[VBScript]
Export.ExportDocument me, FCTools

[JScript]
Export.ExportDocument( this, FCTools );

The code of the functions of the global export module

[VBScript]
' The procedure carries out the export: creates an export folder and
' saves in it page image files, the text file with the document fields,
' and information about the document
Sub ExportDocument(ByRef docObj, ByRef FCTools)
Dim folderName
Dim txtFile, fileName
Dim fso
On Error Resume Next
set fso = CreateObject("Scripting.FileSystemObject")
' creating the export folder
folderName = CreateExportFolder(docObj.DefinitionName, fso)
if Err.Number <> 0 then
docObj.Action.Succeeded = false
docObj.Action.ErrorMessage = "Error during create export folder: " + Err.Description
Err.Clear
Exit Subub
End if
' exporting images
ExportImages docObj, FCTools, folderName, fso
if Err.Number <> 0 then
docObj.Action.Succeeded = false
docObj.Action.ErrorMessage = "Error during export images: " + Err.Description
Err.Clear
Exit Sub
End if

' creating the text file
fileName = fso.BuildPath(folderName, "doc.txt")
Set txtFile = fso.CreateTextFile(fileName, True)
' exporting info about the document
ExportDocInfo docObj, txtFile
' exporting fields
txtFile.WriteLine "Fields:"
ExportFields docObj.Children, txtFile, ""
txtFile.Close
if Err.Number <> 0 then
docObj.Action.Succeeded = false
docObj.Action.ErrorMessage = "Error during export data: " + Err.Description
Err.Clear
Exit Sub
End if
Set txtFile = Nothing
Set fso = Nothing
End Sub
' Image export function
Function ExportImages( ByRef docObj, ByRef FCTools, ByVal exportFolder, ByRef fso )
Dim pages, page, imageOptions
Dim fileName, pageNum
' specifying export settings
Set imageOptions = FCTools.NewImageSavingOptions
imageOptions.Format = "bmp"
imageOptions.ColorType = "FullColor"
imageOptions.Resolution = 100
' page-by-page export
Set pages = docObj.Pages
pageNum = 1
For Each page In pageses
fileName = fso.BuildPath(exportFolder, "page" & pageNum & ".bmp")
page.SaveAs fileName, imageOptions
pageNum = pageNum + 1
Next
End Function

' The procedure that exports info about the document
Sub ExportDocInfo(ByRef docObj, ByRef txtFile)
txtFile.WriteLine "Doc info:"
txtFile.WriteLine ("DocumentId " & docObj.Id)
txtFile.WriteLine ("IsAssembled " & docObj.IsAssembled)
txtFile.WriteLine ("IsVerified " & docObj.IsVerified)
txtFile.WriteLine ("IsExported " & docObj.IsExported)
txtFile.WriteLine ("ProcessingErrors " & docObj.ProcessingErrors)
txtFile.WriteLine ("ProcessingWarnings " & docObj.ProcessingWarnings)
txtFile.WriteLine ("TotalSymbolsCount " & docObj.TotalSymbolsCount)
txtFile.WriteLine ("RecognizedSymbolsCount " & docObj.RecognizedSymbolsCount)
txtFile.WriteLine ("UncertainSymbolsCount " & docObj.UncertainSymbolsCount)
txtFile.WriteLine
End Sub
' The procedure that exports fields from the fields collection
Sub ExportFields(ByRef fields, ByRef txtFile, ByVal indent)
Dim curField
For Each curField In fields
ExportField curField, txtFile, indent
Next
End Sub
' Checks if the value of the fields is null
' If the field value is invalid, any attempt to access this field (even
' to check if it is null) may cause an exception
Function IsNullFieldValue( ByRef field )
on error resume next
IsNullFieldValue = IsNull( field.Value )
if Err.Number <> 0 then
IsNullFieldValue = True
Err.Clear
End if
End Function
' Field export procedure
Sub ExportField(ByRef field, ByRef txtFile, ByVal indent)
' saving field name
txtFile.Write (indent & field.Name)
' saving field value if it can be accessed
If IsNullFieldValue(field) Then
txtFile.WriteLine
Else
txtFile.WriteLine (" " & field.Text)
End If
If Not field.Children Is Nothing Then
' exporting child fields
ExportFields field.Children, txtFile, indent & " "
ElseIf Not field.Items Is Nothing Then
' exporting field instances
ExportFields field.Items, txtFile, indent & " "
End If
End Sub
' The function creates an export folder and returns a full path to this folder
Function CreateExportFolder(ByVal definitionName, ByRef fso)
Dim docFolder, folderName
' main folder
exportFolder = "d:\ScriptExport"
If fso.FolderExists(exportFolder) = False Then
fso.CreateFolder (exportFolder)
End If
' the folder of specified Document Definition
docFolder = fso.BuildPath(exportFolder, definitionName)
If fso.FolderExists(docFolder) = False Then
fso.CreateFolder (docFolder)
End If
' the folder of the exported document
Dim i
i = 1
folderName = fso.BuildPath(docFolder, i)
While fso.FolderExists(folderName)
i = i + 1
folderName = fso.BuildPath(docFolder, i)
Wend
fso.CreateFolder (folderName)
CreateExportFolder = folderName
End Function

[JScript]
// The function carries out the export: creates an export folder and
// saves in it page image files, the text file with the document fields,
// and information about the document
function ExportDocument(docObj, exportImageTools)
{
var folderName
var txtFile, fileName
var fso
fso = new ActiveXObject("Scripting.FileSystemObject");
// creating export folders
try {
folderName = CreateExportFolder(docObj.DefinitionName, fso);
} catch( e ) {
docObj.Action.Succeeded = false;
docObj.Action.ErrorMessage = "Error during create export folder: " + e.description;
return;n;
}
// exporting images
try {
ExportImages(docObj, exportImageTools, folderName, fso);
} catch( e ) {
docObj.Action.Succeeded = false;
docObj.Action.ErrorMessage = "Error during export images: " + e.description;
return;
}
// creating the text file
fileName = fso.BuildPath(folderName, "doc.txt");
txtFile = fso.CreateTextFile(fileName, true);
// exporting info about the document
ExportDocInfo( docObj, txtFile );
// exporting fields
txtFile.WriteLine( "Fields:" );
try {
ExportFields( docObj.Children, txtFile, "" );
} catch( e ) { {
docObj.Action.Succeeded = false;
docObj.Action.ErrorMessage = "Error during export data: " + e.description;
txtFile.Close();
return;
}
txtFile.Close();
txtFile = 0;
fso = 0;
}
// Image export function. If an error occurs when exporting images,
// it returns a message about the error; otherwise, it returns an empty string
function ExportImages( docObj, exportImageTools, exportFolder, fso )
{
// specifying export settings
var imageOptions = exportImageTools.NewImageSavingOptions();
imageOptions.Format = "bmp";
imageOptions.ColorType = "FullColor";
imageOptions.Resolution = 100;
// page-by-page export
var pages = docObj.Pages;
var i
for( i = 0; i < pages.Count; i++ ) {
var fileName = fso.BuildPath( exportFolder, "page" + (i+1) + ".bmp" );
pages.Item(i).SaveAs( fileName, imageOptions );
}
}
// The procedure that exports info about the document
function ExportDocInfo(docObj, txtFile)
{
txtFile.WriteLine( "Doc info:" );
txtFile.WriteLine("IsAssembled " + docObj.IsAssembled);
txtFile.WriteLine("IsVerified " + docObj.IsVerified);
txtFile.WriteLine("IsExported " + docObj.IsExported);
txtFile.WriteLine("ProcessingErrors " + docObj.ProcessingErrors);
txtFile.WriteLine("ProcessingWarnings " + docObj.ProcessingWarnings);
txtFile.WriteLine("TotalSymbolsCount " + docObj.TotalSymbolsCount);
txtFile.WriteLine("RecognizedSymbolsCount " + docObj.RecognizedSymbolsCount);
txtFile.WriteLine("UncertainSymbolsCount " + docObj.UncertainSymbolsCount);
txtFile.WriteLine();
}
// The procedure that exports fields from the fields collection
function ExportFields(fields, txtFile, indent)
{
var i
for( i = 0; i < fields.Count; i++ ) {
ExportField( fields.Item(i), txtFile, indent );
}
}
// Checks if the field value is null
// If the field value is invalid, any attempt to access this field (even
// to check if it is null) may cause an exception
function IsNullFieldValue( field )
{
try {
return ( field.Value == null );
} catch( e ) {
return true;
}
}
// Field export procedure
function ExportField(field, txtFile, indent)
{
// saving file name
txtFile.Write(indent + field.Name);
// saving field value, if it can be accessed
if( IsNullFieldValue( field ) ) {
txtFile.WriteLine();
} else {
txtFile.WriteLine(" " + field.Text);
} }
if( field.Children != null ) {
// exporting child fields
ExportFields( field.Children, txtFile, indent + " " );
} else if( field.Items != null ) {
// exporting field instances
ExportFields( field.Items, txtFile, indent + " " );
}
}
// The function creates an export folder and returns a full path to this folder
function CreateExportFolder(definitionName, fso)
{
var docFolder, folderName
// main folder
var exportFolder = "d:\\ScriptExport";
if( !fso.FolderExists(exportFolder) ) {
fso.CreateFolder (exportFolder);
} }
// the folder of the specified Document Definition
docFolder = fso.BuildPath(exportFolder, definitionName);
if( !fso.FolderExists(docFolder) ) {
fso.CreateFolder(docFolder);
}
// the folder of the exported document
var i = 1;
folderName = fso.BuildPath(docFolder, i);
while( fso.FolderExists(folderName) ) {
i++;
folderName = fso.BuildPath(docFolder, i);
}
fso.CreateFolder(folderName);
return folderName;
}

Using an external COM component

[VBScript]
dim autoExport
set autoExport = CreateObject( "AutomationExport.Exporter" )
autoExport.Export me, FCTools
[JScript]
var autoExport = new ActiveXObject("AutomationExport.Exporter");
autoExport.Export( this, FCTools );

Code of an ActiveX component in VisualBasic

Provided below is the Exporter class code from the AutomationExport project, which is used in the above mentioned scripts.

OptionExplicit
Dim mFso AsNew Scripting.FileSystemObject
' The procedure carries out document export: created an export folder and
' saves in it page image files, the text file with document fields,
' and information about the document
PublicSub Export(ByRef docObj As Object, ByRef FCTools As Object)
OnErrorGoTo err_h
Dim folderName AsString
Dim txtFile As TextStream, fileName AsString
Dim imageExportResult AsString, errMessage AsString
' creating export folder
folderName = createExportFolder(docObj.definitionName)
If folderName = "" Then
docObj.Action.Succeeded = False
docObj.Action.ErrorMessage = "Cannot create export folder"
ExitSub
EndIf
' exporting images
imageExportResult = exportImages(docObj, FCTools, folderName)
' creating the text file
fileName = mFso.BuildPath(folderName, "doc.txt")
Set txtFile = mFso.CreateTextFile(fileName, True)
' saving info about image export problems
If imageExportResult <> "" Then
txtFile.WriteLine imageExportResult
errMessage = errMessage & imageExportResult
EndIf
' exporting info about document
exportDocInfo docObj, txtFile
' exporting fields
txtFile.WriteLine "Fields:"
IfNot exportFields(docObj.Children, txtFile, "") Then
errMessage = errMessage & " Error during export data"
EndIf
txtFile.Close
' if errors occur during export, reset the
' export success flag to False
If errMessage <> "" Then
docObj.Action.Succeeded = False
docObj.Action.ErrorMessage = errMessage
EndIf

Set txtFile = Nothing
Set mFso = Nothing
ExitSub
err_h:
docObj.Action.Succeeded = False
docObj.Action.ErrorMessage = Err.Description
txtFile.Close
Set mFso = Nothing
EndSub
' Image export function. If an error occurs when exporting images,
' it returns a message about the error, otherwise it returns an empty string
PrivateFunction exportImages(ByRef docObj As Object, ByRef FCTools As Object, _
ByVal exportFolder AsString) AsString
OnErrorGoTo err_h
Dim pages As Object, page As Object, imageOptions As Object
Dim fileName AsString, pageNum AsLong
exportImages = ""
' specifying export settings
Set imageOptions = FCTools.NewImageSavingOptions
imageOptions.Format = "png"
imageOptions.ColorType = "GrayScale"
imageOptions.Resolution = 300
' page-by-page export
Set pages = docObj.pages
pageNum = 1
ForEach page In pages
fileName = mFso.BuildPath(exportFolder, page.definitionName + "_page" & pageNum & "." & imageOptions.Format)
page.SaveAs fileName, imageOptions
pageNum = pageNum + 1
Next page
ExitFunction
err_h:
exportImages = Err.Description
EndFunction
' The procedure that exports info about the document
PrivateSub exportDocInfo(ByRef docObj As Object, ByRef txtFile As TextStream)

OnErrorGoTo err_h
txtFile.WriteLine "Doc info:"
txtFile.WriteLine ("DocumentId " & docObj.Id)
txtFile.WriteLine ("IsAssembled " & docObj.IsAssembled)
txtFile.WriteLine ("IsVerified " & docObj.IsVerified)
txtFile.WriteLine ("IsExported " & docObj.IsExported)
txtFile.WriteLine ("ProcessingErrors " & docObj.ProcessingErrors)
txtFile.WriteLine ("ProcessingWarnings " & docObj.ProcessingWarnings)
txtFile.WriteLine ("TotalSymbolsCount " & docObj.TotalSymbolsCount)
txtFile.WriteLine ("RecognizedSymbolsCount " & docObj.RecognizedSymbolsCount)
txtFile.WriteLine ("UncertainSymbolsCount " & docObj.UncertainSymbolsCount)
txtFile.WriteLine
ExitSub
err_h:
txtFile.WriteLine Err.Description
EndSub
' The procedure that exports fields from the fields collection
PrivateFunction exportFields(ByRef fields As Object, ByRef txtFile As TextStream, ByVal indent As String) AsBoolean
OnErrorGoTo err_h
Dim curField As Object
exportFields = True
ForEach curField In fields
IfNot exportField(curField, txtFile, indent) Then
exportFields = False
EndIf
Next curField
ExitFunction
err_h:
txtFile.WriteLine Err.Description
exportFields = False
EndFunction
' Checks if the field value is null
' If the value is invalid, any attempt to access this field (even
' to check if it is null) may cause an exception
Function IsNullFieldValue(ByRef field As Object) AsBoolean
OnErrorGoTo err_h
IsNullFieldValue = IsNull(field.Value)
ExitFunction
err_h:
IsNullFieldValue = True
EndFunction
' Field export function
PrivateFunction exportField(ByRef field As Object, ByRef txtFile As TextStream, _
ByVal indent AsString) AsBoolean
OnErrorGoTo err_h
Dim result AsBoolean
result = True
' saving field name
txtFile.Write (indent & field.Name)
' saving field value if it can be accessed
IfNot IsNullFieldValue(field) Then
txtFile.WriteLine (" " & field.Value)
Else
txtFile.WriteLine
EndIf
IfNot field.Children Is NothingThen
' exporting child fields
result = result And exportFields(field.Children, txtFile, indent & " ")
ElseIfNot field.Items IsNothingThen
' exporting field instances
result = result And exportFields(field.Items, txtFile, indent & " ")
EndIf
exportField = result
ExitFunction
err_h:
txtFile.WriteLine Err.Description
exportField = False
EndFunction
' The function creates an export folder and returns a full path to this folder
PrivateFunction createExportFolder(ByVal definitionName AsString) AsString
OnErrorGoTo err_h
Dim docFolder AsString, folderName AsString
' main folder
Const exportFolder = "d:\AutomationExport"
If mFso.FolderExists(exportFolder) = FalseThen
mFso.CreateFolder (exportFolder)
EndIf
' the folder of the specified Document Definition
docFolder = mFso.BuildPath(exportFolder, definitionName)
If mFso.FolderExists(docFolder) = FalseThen
mFso.CreateFolder (docFolder)
EndIf
' the folder of the exported document
Dim i AsLong
i = 1
folderName = mFso.BuildPath(docFolder, i)
While mFso.FolderExists(folderName)
i = i + 1
folderName = mFso.BuildPath(docFolder, i)
Wend
mFso.CreateFolder (folderName)
createExportFolder = folderName
ExitFunction
err_h:
createExportFolder = ""
EndFunction

Using an external component written in .Net( C# )

To use an external component written in .Net, do the following:

1.Create a project of type ClassLibrary

2.Add ControllerInterop.dll to the References of the project ABBYY.FlexiCapture will appear in the References list and all the interfaces of the script objects will become available in the project.

3.Define the disp interface and the class that implements this interface, as well as ProgId (this will make it possible to work with the .Net component just like with ActiveX from the code of the script).

4.After building the project, register the generated types library (this can be done automatically by enabling the corresponding option in the project properties).

5.From the export code, call the method of the component in the usual manner:

[VBScript]
dim autoExport
set autoExport = CreateObject( "ExportLibrary1.Export" )
autoExport.ExportDocument me, FCTools

[JScript]
var autoExport = new ActiveXObject("ExportLibrary1.Export"); autoExport.ExportDocument( this, FCTools );

Below follows the code of such a component:

using System;
using System.Runtime.InteropServices;
using System.IO;
using ABBYY.FlexiCapture;
namespace ExportLibrary1
{

// The interface of the export component which can be accessed from the script
// When creating a new component, generate a new GUID
[Guid("32B10C3B-EEA3-4194-B0A0-E358C310225A")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface _cExport
{
[DispId(1)]
void ExportDocument(ref IExportDocument DocRef, ref FCTools Tools);
}
// The class that implements export component functionality
// When creating a new component, generate a new GUID
// and set your ProgId
[Guid("3BA19BD7-C6DC-4f63-BC08-0D95254DADC3")]
[ClassInterface(ClassInterfaceType.None)]
[ProgId("ExportLibrary1.Export")]
[ComVisible(true)]
public class Export : _cExport
{
public Export()
{
}
// The function carries out document export: creates an export folder and
// saves in it page image files,
// the text file with document fields, and information about the document
public void ExportDocument( ref IExportDocument docRef, ref FCTools FCTools )
{
try
{
string exportFolder = createExportFolder( docRef.DefinitionName );
exportImages( docRef, FCTools, exportFolder );
// creating the text file
string fileName = exportFolder + "//" + "doc.txt";
StreamWriter sw = File.CreateText( fileName );
// exporting info about document
exportDocInfo( docRef, sw );
// exporting fields
sw.WriteLine( "Fields:" );
exportFields( docRef.Children, sw, "" );
sw.Close();
}
catch( Exception e )
{
docRef.Action.Succeeded = false;
docRef.Action.ErrorMessage = e.ToString();
}
}
// The function creates an export folder and returns a full path to this folder
privatestring createExportFolder(string definitionName )
{
string docFolder, folderName;
// main folder
string exportFolder = "d:\\DotNetExport";
if( !Directory.Exists(exportFolder) )
{
Directory.CreateDirectory(exportFolder);
}
// the folder of the specified Document Definition
docFolder = exportFolder + "\\" + definitionName;
if( !Directory.Exists(docFolder) )
{
Directory.CreateDirectory( docFolder );
}
// the folder of the exported document
int i = 1;
folderName = docFolder + "\\" + i;
while( Directory.Exists(folderName) )
{
i++;
folderName = docFolder + "\\" + i;
}
Directory.CreateDirectory(folderName);
return folderName;
}
// Image export function
private void exportImages( IExportDocument docRef, FCTools FCTools, string exportFolder )
{
string baseFileName = exportFolder + "\\page_";
IExportImageSavingOptions imageOptions = FCTools.NewImageSavingOptions();
imageOptions.Format = "bmp";
imageOptions.ColorType = "FullColor";
imageOptions.Resolution = 100;
int i = 1;
foreach( IExportPage curPage in docRef.Pages )
{
string fileName = baseFileName + i + ".bmp";
curPage.SaveAs( fileName, imageOptions );
i++;
}
}
// Exporting info about document
private void exportDocInfo( IExportDocument docRef, StreamWriter sw )
{
sw.WriteLine( "Doc info:" );
sw.WriteLine("DocumentId " + docRef.Id );
sw.WriteLine("IsAssembled " + docRef.IsAssembled);
sw.WriteLine("IsVerified " + docRef.IsVerified);
sw.WriteLine("IsExported " + docRef.IsExported);
sw.WriteLine("ProcessingErrors " + docRef.ProcessingErrors);
sw.WriteLine("ProcessingWarnings " + docRef.ProcessingWarnings);
sw.WriteLine("TotalSymbolsCount " + docRef.TotalSymbolsCount);
sw.WriteLine("RecognizedSymbolsCount " + docRef.RecognizedSymbolsCount);
sw.WriteLine("UncertainSymbolsCount " + docRef.UncertainSymbolsCount);
sw.WriteLine();
}
// Exporting field collection
private void exportFields( IExportFields fields, StreamWriter sw, string indent )
{
foreach( IExportField curField in fields )
{
exportField( curField, sw, indent );
}
}
// Checks if the field value is null
// If the field value is invalid, any attempt to access this field (even
// to check if it is null) may cause an exception
privatebool IsNullFieldValue( IExportField field )
{
try
{
return ( field.Value == null );
}
catch( Exception e )
{
returntrue;
}
}
// Exporting the specified field
private void exportField( IExportField field, StreamWriter sw, string indent )
{
// saving the field name
sw.Write( indent + field.Name );
// saving the field value if it can be accessed
if( IsNullFieldValue( field ) )
{
sw.WriteLine();
}
else
{
sw.WriteLine( " " + field.Text );
}
if( field.Children != null )
{
// exporting child fields
exportFields( field.Children, sw, indent + " " );
}
else if( field.Items != null )
{
// exporting field instances
exportFields( field.Items, sw, indent + " " );
}
}
}
}

Export handler

This sample code demonstrates a simple export handler which saves information about exported documents and export results to text files. Two text files are used in this example: one containing the list of successfully exported documents and one containing the list of documents that returned errors during export.

[VBScript]
dim curDoc
dim fso, fileErrorName, txtErrorFile, fileSucceedName, txtSucceedFile
set fso = CreateObject("Scripting.FileSystemObject")
' creating the file with failed documents
fileErrorName = "d:\ExportResults\ErrorsDocuments.txt"
set txtErrorFile = fso.CreateTextFile( fileErrorName, true )
' creating the file with successfully exported documents
fileSucceedName = "d:\ExportResults\SucceedDocuments.txt"
set txtSucceedFile = fso.CreateTextFile( fileSucceedName, true )
dim i, exprortResult, docInfo
' iterating the collection of exported documents
for i = 0 Tome.Count - 1
set exportResult = me.Item(i)
docInfo = "DocumentId:" & exportResult.Document.Id
if exportResult.Succeeded then
docInfo = docInfo & " - Exported successfully."
txtSucceedFile.WriteLine docInfo
else
docInfo = docInfo & " - Export error: " & exportResult.ErrorMessage
txtErrorFile.WriteLine docInfo
endif
next
txtErrorFile.Close
txtSucceedFile.Close
[JScript]
var fso = new ActiveXObject("Scripting.FileSystemObject");
// creating the file with failed documents
var fileErrorName = "d:\\ExportResults\\ErrorsDocuments.txt";
var txtErrorFile = fso.CreateTextFile( fileErrorName, true );
// creating the file with successfully exported documents
var fileSucceedName = "d:\\ExportResults\\SucceedDocuments.txt"
var txtSucceedFile = fso.CreateTextFile( fileSucceedName, true );
var i
// iterating the collection of exported documents
for( i = 0; i < Documents.Count; i++ ) {
var curDoc = Documents.Item( i );
var docInfo = "DocumentId: " + curDoc.Id;
if( curDoc.Action.Succeeded ) {
docInfo = docInfo + ". Exported successfully. Result:" + curDoc.Action.Result;
txtSucceedFile.WriteLine( docInfo );
} else {
docInfo = docInfo + ". Export error: " + curDoc.Action.ErrorMessage + " Result:" + curDoc.Action.Result;
txtErrorFile.WriteLine( docInfo );
}
}
txtErrorFile.Close();
txtSucceedFile.Close();

Accessing source files in common office formats

This sample script shows how you can save the source files when exporting documents. The source files must be in any of the supported common office formats and must be given unique names in order to avoid naming conflicts.

using System;

using System.IO;

using System.Collections.Generic;

// Iterate through the pages.

for( int i = 0; i<Document.Pages.Count; i++ ) {

IPage page = Document.Pages[i];

// Check whether there is a source file.

if( page.SourceFileGUID == "" ) {

continue;

}

// The original name of the file.

string sourceFileName = @"";

// Specify the original file name.

if( page.ImageSourceType == @"File" ) {

sourceFileName = Path.GetFileName( page.ImageSource );

} else if( page.ImageSourceType == @"Scanner" || page.ImageSourceType == @"Custom" ) {

sourceFileName = Path.GetFileName( page.ImageSourceFileSubPath );

}

// Remove the file extension from the file name.

if( sourceFileName != @"" ) {

sourceFileName = Path.GetFileNameWithoutExtension( sourceFileName ) + @".";

}

// Unique source file name (original name + guid).

string sourceFileUniqueName = sourceFileName + page.SourceFileGUID;

// The path to the folder where the source file must be saved.

string sourceFilePath = Document.Batch.Project.ExportRootPath + @"\" + sourceFileUniqueName;

// Make sure that the file does not exist.

if( File.Exists( sourceFilePath ) ) {

continue;

}

// Save the file.

Processing.ReportMessage( "Saving source file: " + sourceFileUniqueName );

page.SaveSourceFile( sourceFilePath );

}


Sample assembly scripts

Show/Hide Hidden Text

Assembly script with conditional documents depending on the value of a field

The script in this example is used to assemble documents into document sets defined by a Document Set Definition. The Document Set Definition contains a section named Borrower's form and references to the following Document Definitions:

·Passport

·Guarantor's documents

·Co-borrower's documents

·Employer reference

The Borrower's form section includes the following fields:

·Co-borrower's name

·Loan sum

The documents that need to be included in the document set depend on the value of the Loan sum field. The script has two threshold values that determine which documents are included in the set:

1.If the loan sum is less than the first threshold value, the document set only needs to contain a passport.

2.If the loan sum is greater than the first threshold value but less than the second threshold value, the document set needs to contain a passport and an employer's reference.

3.If the loan sum is greater than the second threshold value, the document set needs to contain a passport, an employer's reference and a guarantor's documents.

In addition to this, if the Co-borrower's name field contains a value, the document set needs to contain a co-borrower's documents.

The script below uses this logic to assembles document sets.

using System.Collections.Generic;
int creditSum = 0;
bool creditSumFound = false;
string cocreditor = "";
int formCount = 0;
string formName = "Borrower's form";
// Document Definitions used in the document set
int referenceFromWorkCount = 0;
string referenceFromWorkName = "Employer reference";
int guaranteeDocsCount = 0;
string guaranteeDocsName = "Guarantor's documents";
int cocreditorDocsCount = 0;
string cocreditorDocsName = "Co-borrower's documents";
int passportCount = 0;
string passportName = "Passport";

foreach( IBatchItem item in BatchItems ) {
// Find the form and determine the sum of the loan
if (item.Type == TBatchItemType.BIT_Page)
{
if (item.AsPage.SectionName != formName)
AssemblingErrors.AddCustomError("Cannot contain the following sections: " + item.AsPage.SectionName, 1);
else
{
cocreditor = item.AsPage.Document.IndexedItemValue("Borrower's name").ToString();
string creditSumText = item.AsPage.Document.IndexedItemValue("Loan sum").ToString();
if (!int.TryParse(creditSumText, out creditSum))
AssemblingErrors.AddCustomError("Loan sum was not recognized: " + creditSumText, 1);
else
creditSumFound = true;
formCount++;
}
}
// Count the documents in the set
else if (item.Type == TBatchItemType.BIT_Document) {
if (item.AsDocument.TemplateName == referenceFromWorkName)
referenceFromWorkCount++;
else if (item.AsDocument.TemplateName == guaranteeDocsName)
guaranteeDocsCount++;
else if (item.AsDocument.TemplateName == passportName)
passportCount++;
else if (item.AsDocument.TemplateName == cocreditorDocsName)
cocreditorDocsCount++;
else
AssemblingErrors.AddCustomError("The document set cannot contain the document " + item.AsDocument.TemplateName, 1);
}
}

// Check the number of sections and documents in the set
if (formCount > 1)
AssemblingErrors.AddCustomError("There are too many documents of the type: " + formName, formCount);
else if (formCount < 1)
AssemblingErrors.AddCustomError("Missing the following documents: " + formName, 1);

if (passportCount > 1)
AssemblingErrors.AddCustomError("There are too many documents of the type: " + passportName, passportCount);
else if (passportCount < 1)
AssemblingErrors.AddCustomError("Missing the following documents: " + passportName, 1);

// Check that the document set contains a co-borrower if a co-borrower name is present in the form
if (cocreditor != "" && cocreditorDocsCount < 1)
AssemblingErrors.AddCustomError("Missing the following documents: " + cocreditorDocsName, 1);
else if (cocreditor != "" && cocreditorDocsCount > 1)
AssemblingErrors.AddCustomError("There are too many documents of the type: " + cocreditorDocsName, cocreditorDocsCount);
else if (cocreditor == "" && cocreditorDocsCount > 0)
AssemblingErrors.AddCustomError("There are too many documents of the type: " + cocreditorDocsName, cocreditorDocsCount);

// Check that the document set contains all of the document required due to the loan sum exceeding one of the thresholds
if (creditSumFound)
{
if (creditSum > 50000) // requires an employer reference
{
if (referenceFromWorkCount > 1)
AssemblingErrors.AddCustomError("There are too many documents of the type: " + referenceFromWorkName, referenceFromWorkCount);
else if (referenceFromWorkCount < 1)
AssemblingErrors.AddCustomError("Missing the following documents: " + referenceFromWorkName, 1);
}
if (creditSum > 500000) // requires the guarantor's documents
{
if (guaranteeDocsCount > 1)
AssemblingErrors.AddCustomError("There are too many documents of the type: " + guaranteeDocsName, guaranteeDocsCount);
else if (guaranteeDocsCount < 1)
AssemblingErrors.AddCustomError("Missing the following documents: " + guaranteeDocsName, 1);
}
}

Assembly script that checks for missing documents

The script in this example works with the Identification Documents Document Set Definition. The Document Set Definition contains references to the following Document Definitions:

·Passport

·Driver's license

Document sets produced by the script may only include one document of each of these types but at least one document of these types.

The script below uses this logic to assemble document sets.

using System.Collections.Generic;

using System;

string docSetName = "Identification Documents";

int pagesCnt = 0;

// List of the types documents that may be included in the set

List<string> allowed = new List<string> {"Passport", "Driver's license"};

// Limit on the number of documents of each type in the set

List<int> allowedCount = new List<int>{1,1};

// The number of documents detected in the set

List<int> foundCount = new List<int>{0,0};

// Count the number of documents and pages in the set

foreach (IBatchItem item in BatchItems) {

if (item.Type == TBatchItemType.BIT_Document) {

if (item.AsDocument.TemplateName == docSetName)

AssemblingErrors.AddCustomError("Cannot contain a nested set", 1);

else if (allowed.Contains(item.AsDocument.TemplateName)) {

int i = allowed.IndexOf(item.AsDocument.TemplateName);

foundCount[i]++;

}

}

else if (item.Type == TBatchItemType.BIT_Page) pagesCnt++;

}

// Check the number of documents and pages

if (foundCount[0] + foundCount[1] == 0)

AssemblingErrors.AddCustomError("At least one identification document is required", 1);

for (int i = 0; i < allowed.Count; i++) {

if (foundCount[i] > allowedCount[i])

AssemblingErrors.AddCustomError("Maximum number of documents: " + allowed[i] + ": " + allowedCount[i]);

}

if (pagesCnt > 0) AssemblingErrors.AddCustomError("The document set cannot contain pages that do not belong to a document", pagesCnt);


Other sample scripts

Show/Hide Hidden Text
Document merge event

Type: a handler of the Pages moved event

This sample code demonstrates how the "Pages moved" event can be transformed into the "Document merge" event. The logic of this script is as follows: if all pages of the document are moved, then this document is fully embedded into the target document.

The script is launched on the event Pages moved. The Events.OnDocumentsMerge procedure is a procedure that handles the "Document merge" event.

[VBScript]
Dim currentDocument, currentDocumentPagesMoved
set currentDocument = Pages( 0 ).Document
currentDocumentPagesMoved = 0
For i = 0 to Pages.Count - 1
If Pages( i ).Document.Id <> currentDocument.Id Then
' The next document
If currentDocument.Pages.Count = currentDocumentPagesMoved Then
' All pages are moved from the previous document. The event is spawned.
Events.OnDocumentsMerge TargetDocument, currentDocument
End If
Set currentDocument = Pages( i ).Document
Else
Next
If currentDocument.Pages.Count = currentDocumentPagesMoved Then
' All pages are moved from the last document. The event is spawned.
Events.OnDocumentsMerge TargetDocument, currentDocument
End If
[JScript]
var currentDocument = Pages( 0 ).Document;
var currentDocumentPagesMoved = 0;

for( i = 0; i < Pages.Count - 1; i++ ) {
if( Pages( i ).Document.Id != currentDocument.Id ) {
// The next document
if( currentDocument.Pages.Count == currentDocumentPagesMoved ) {
// All pages are moved from the previous document. The event is spawned.
Events.OnDocumentsMerge( TargetDocument, currentDocument );
}
currentDocument = Pages( i ).Document;
} else {
currentDocumentPagesMoved = currentDocumentPagesMoved + 1;
}
}

if( currentDocument.Pages.Count == currentDocumentPagesMoved ) {
// All pages are moved from the last document. The event is spawned.
Events.OnDocumentsMerge( TargetDocument, currentDocument )
}
Merging document registration parameters on document merge

Type: a handler of the Document merge event

This sample code demonstrates the easiest way to merge document registration parameters on document merge. When merging documents into a target document, only those parameters from new documents are added which were missing in it.

The code should be stored in a shared module. The OnDocumentsMerge procedure must called at the moment of merging documents. For details, see the description of the Document merge event.

[VBScript]
Sub MergeProperty(ByVal TargetDocument, ByVal propertyName, ByVal propertyValue)
If TargetDocument.Properties.Get(propertyName) = "" Then
' There is no such a parameter in the document.
TargetDocument.Properties.Set(propertyName, propertyValue)
End If
End Sub
Sub OnDocumentsMerge(ByVal Target, ByVal Document)
' Merging registration parameters.
For i = 0 To Document.Properties.Count - 1
MergeProperty(Target, Document.Properties(i).Name,
Document.Properties(i).Value)
Next
End Sub
[JScript]
function MergeProperty( TargetDocument, propertyName, propertyValue )
{
if( TargetDocument.Properties.Get( propertyName ) == "" ) {
// There is no such a parameter in the document.
TargetDocument.Properties.Set( propertyName, propertyValue );
}
}

function OnDocumentsMerge( Target, Document )
{
// Merging registration parameters.
for( i = 0; i < Document.Properties.Count - 1; i++ ) {
MergeProperty( Target, Document.Properties(i).Name, Document.Properties(i).Value );
}
}


Internal names of recognition languages

What it does

Internal names of recognition languages are used in the RecognitionLanguages property of the IExportImageSavingOptions object.

Compliance of recognition languages to their internal names:

A
Abkhaz | forward | Abkhaz
Adyghe | forward | Adyghe
Afrikaans | forward | Afrikaans
Agul | forward | Agul
Albanian | forward | Albanian
Altaic | forward | Altaic
Arabic (Saudi Arabia) | forward | Arabic
Armenian (Eastern) | forward | ArmenianEastern
Armenian (Grabar) | forward | ArmenianGrabar
Armenian (Western) | forward | ArmenianWestern
Avar | forward | Awar
Aymara | forward | Aymara
Azerbaijani (Cyrillic) | forward | AzeriCyrillic
Azerbaijani (Latin) | forward | AzeriLatin
B
Bashkir | forward | Bashkir
Basque | forward | Basque
Bemba | forward | Bemba
Blackfoot | forward | Blackfoot
Breton | forward | Breton
Bugotu | forward | Bugotu
Bulgarian | forward | Bulgarian
Buryat | forward | Buryat
Belarusian | forward | Belarusian
C
Catalan | forward | Catalan
Chamorro | forward | Chamorro
Chechen | forward | Chechen
Chinese Simplified | forward | ChinesePRC
Chinese Traditional | forward | ChineseTaiwan
Chukchee | forward | Chukcha
Chuvash | forward | Chuvash
Corsican | forward | Corsican
Crimean Tatar | forward | CrimeanTatar
Croatian | forward | Croatian
Crow | forward | Crow
Czech | forward | Czech
D
Danish | forward | Danish
Dargwa | forward | Dargwa
Dungan | forward | Dungan
Dutch | forward | Dutch
Dutch (Belgian) | forward | DutchBelgian
E
English | forward | English
Eskimo (Cyrillic) | forward | EskimoCyrillic
Eskimo (Latin) | forward | EskimoLatin
Esperanto | forward | Esperanto
Estonian | forward | Estonian
Even | forward | Even
Evenki | forward | Evenki
F
Faroese | forward | Faeroese
Fijian | forward | Fijian
Finnish | forward | Finnish
French | forward | French
Frisian | forward | Frisian
Friulian | forward | Friulian
G
Scottish Gaelic | forward | GaelicScottish
Gagauz | forward | Gagauz
Galician | forward | Galician
Ganda | forward | Ganda
German | forward | German
German (new spelling) | forward | GermanNewSpelling
German (Luxembourg) | forward | GermanLuxembourg
Greek | forward | Greek
Guarani | forward | Guarani
H
Hani | forward | Hani
Hausa | forward | Hausa
Hawaiian | forward | Hawaiian
Hebrew | forward | Hebrew
Hungarian | forward | Hungarian
I
Icelandic | forward | Icelandic
Ido | forward | Ido
Indonesian | forward | Indonesian
Ingush | forward | Ingush
Interlingua | forward | Interlingua
Irish | forward | Irish
Italian | forward | Italian
J
Japanese | forward | Japanese
K
Kabardian | forward | Kabardian
Kalmyk | forward | Kalmyk
Karachay-balkar | forward | KarachayBalkar
Karakalpak | forward | Karakalpak
Kasub | forward | Kasub
Kawa | forward | Kawa
Kazakh | forward | Kazakh
Khakass | forward | Khakas
Khanty | forward | Khanty
Kikuyu | forward | Kikuyu
Kirghiz | forward | Kirgiz
Kongo | forward | Kongo
Korean | forward | Korean
Korean (Hangul) | forward | KoreanHangul
Koryak | forward | Koryak
Kpelle | forward | Kpelle
Kumyk | forward | Kumyk
Kurdish | forward | Kurdish
L
Lak | forward | Lak
Sami (Lappish) | forward | Lappish
Latin | forward | Latin
Latvian | forward | Latvian
Latvian Gothic | forward | LatvianGothic
Lezgi | forward | Lezgin
Lithuanian | forward | Lithuanian
Luba | forward | Luba
M
Macedonian | forward | Macedonian
Malagasy | forward | Malagasy
Malay (Malaysian) | forward | Malay
Malinke | forward | Malinke
Maltese | forward | Maltese
Mansi | forward | Mansi
Maori | forward | Maori
Mari | forward | Mari
Maya | forward | Maya
Miao | forward | Miao
Minangkabau | forward | Minankabaw
Mohawk | forward | Mohawk
Moldavian | forward | RomanianMoldavia
Mongol | forward | Mongol
Mordvin | forward | Mordvin
N
Nahuatl | forward | Nahuatl
Nenets | forward | Nenets
Nivkh | forward | Nivkh
Nogay | forward | Nogay
Norwegian | forward | Norwegian
Norwegian (Bokmal) | forward | NorwegianBokmal
Norwegian (Nynorsk) | forward | NorwegianNynorsk
Nyanja | forward | Nyanja
O
Occidental | forward | Occidental
Ojibway | forward | Ojibway
Old English | forward | OldEnglish
Old French | forward | OldFrench
Old German | forward | OldGerman
Old Italian | forward | OldItalian
Old Spanish | forward | OldSpanish
Ossetian | forward | Ossetic
P
Papiamento | forward | Papiamento
Tok Pisin | forward | PidginEnglish
Polish | forward | Polish
Portuguese | forward | PortugueseStandard
Portuguese (Brazilian) | forward | PortugueseBrazilian
Occitan | forward | Provencal
Q
Quechua | forward | Quechua
R
Rhaeto-Romanic | forward | RhaetoRomanic
Romanian | forward | Romanian
Romany | forward | Romany
Rwanda | forward | Ruanda
Rundi | forward | Rundi
Russian (Old Spelling) | forward | RussianOldSpelling
Russian | forward | Russian
Russian and English | forward | Mixed
S
Samoan | forward | Samoan
Selkup | forward | Selkup
Serbian (Cyrillic) | forward | SerbianCyrillic
Serbian (Latin) | forward | SerbianLatin
Shona | forward | Shona
Dakota | forward | Sioux
Slovak | forward | Slovak
Slovenian | forward | Slovenian
Somali | forward | Somali
Sorbian | forward | Sorbian
Sotho | forward | Sotho
Spanish | forward | Spanish
Sunda | forward | Sunda
Swahili | forward | Swahili
Swazi | forward | Swazi
Swedish | forward | Swedish
T
Tabasaran | forward | Tabassaran
Tagalog | forward | Tagalog
Tahitian | forward | Tahitian
Tajik | forward | Tajik
Tatar | forward | Tatar
Thai | forward | Thai
Jingpo | forward | Tinpo
Tongan | forward | Tongan
Tswana | forward | Tswana
Tun | forward | Tun
Turkish | forward | Turkish
Turkmen | forward | Turkmen
Tuvinian | forward | Tuvin
U
Udmurt | forward | Udmurt
Uighur (Cyrillic) | forward | UighurCyrillic
Uighur (Latin) | forward | UighurLatin
Ukrainian | forward | Ukrainian
Uzbek (Cyrillic) | forward | UzbekCyrillic
Uzbek (Latin) | forward | UzbekLatin
V
Cebuano | forward | Visayan
Vietnamese | forward | Vietnamese
W
Welsh | forward | Welsh
Wolof | forward | Wolof
X
Xhosa | forward | Xhosa
Y
Yakut | forward | Yakut
Yiddish | forward | Yiddish
Z
Zapotec | forward | Zapotec
Zulu | forward | Zulu


Scripts for processing interface events

In ABBYY FlexiCapture, you can use scripts to process interface events. This allows you to configure the operation of a station, customize its interface, change a station's behavior under certain conditions, implement user commands, etc.

These scripts can be added for interactive workflow stages and for tools configured in the Tool Settings dialog box.

All script objects are available for reading and writing.

Access permissions to objects of the ControllerInterop used in scripts depend on the objects' state. The current document's state is returned by the DocumentState() method of the ITaskWindow interface. If the document's state is DS_Opened, then the ControllerInterop objects of the document are available for reading and writing. For other states, the objects of ControllerInterop are read-only.

Events that can be handled by means of scripts and their parameters are described below.

listPicture Events

listPicture Objects

note Note: Any changes you make to the interface by means of scripts will be discarded in the following cases:

·When you enter a batch type other than the default batch type

·When you exit a batch type other than the default batch type

·When you open or close a project

·When you close the station

note Note: Web Stations do not support the use of scripts.


Event handlers

Program shell events, that can be handled by using scripts, are listed below:

On Activate Document

On Closing Document

On Closing Project

On Document Closed

On Field Control Activate

On Field Control Deactivate

On Open Document

On Project Closed

On Region Change

On Region Control Draw

On Return From Task

On Task Close

On Task Reject

On Task Send To Stage

On Task Window Create

On Task Window Mode Changed

On Text Field Validating

On User Command


On Document Closed

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers >

Return to chapter overview

On Document Closed

When it is launched

The script is launched after confirming the changes when closing a document in the document editor.

Parameters

Name | Type | Access | Description
Context | IDocumentEditor | Read/write | The document editor


On Project Closed

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers >

Return to chapter overview

On Project Closed

When it is launched

The script is launched when closing the project is finished after the user confirms the action in the inquiry dialog (if it was).

Parameters

Name | Type | Access | Description
Context | IMainWindow | Read/write | The main window


On Activate Document

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers >

Return to chapter overview

On Activate Document

When it is launched

The script is launched prior to activating the document in the task window (by a double-click, by using menu commands, etc.).

·If the CanOpen.Value property is set to true, the document will be opened in the document editor after the script execution.

·If the CanOpen.Value property is set to false, the document will not be opened.

By default, the value of the CanOpen parameter is true.

Parameters

Name | Type | Access | Description
CanOpen | IBoolean | Read/write | Specifies whether to open the document
Context | ITaskWindow | Read/write | The task window
DocumentItem | IDocumentItem | Read/write | The document being processed


On Field Control Activate

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers >

Return to chapter overview

On Field Control Activate

When it is launched

The script is launched upon activating a field.

Parameters

Name | Type | Access | Description
Context | IFieldControl | Read/write | The activated field

note Note: You cannot activate a different field by this script.


On Return From Task

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers >

Return to chapter overview

On Return From Task

When it is launched

The script is launched when processing the current task is finished after confirmation of changes.

Parameters

Name | Type | Access | Description
Context | ITaskWindow | Read/write | The task window


On User Command

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers >

Return to chapter overview

On User Command

When it is launched

The event occurs when calling a user command (provided that a corresponding item is added to the main menu or on the toolbar).

User command identifiers can be represented in the form of CI_UserCommand + <non-negative integer>.

Parameters

Name | Type | Access | Description
CommandId | TCommandID | Read/write | The identifier of the user command
Context | IMainWindow | Read/write | The main window of the application

note Note: To add a user command to the main menu or on the toolbar, you must use AppendItem / InsertItem and AppendButton /InsertButton methods of the IMenu interface and the IToolbar interface respectively. The command identifiers CI_UserCommand or CI_UserCommand + <non-negative integer> must be used.

The sample code below demonstrates how to add a menu item for a user command with a command identifier CI_UserCommand + 1.

ABBYY.FlexiCapture.ClientUI.TCommandID userCommand = ABBYY.FlexiCapture.ClientUI.TCommandID.CI_UserCommand;
ABBYY.FlexiCapture.ClientUI.TCommandID userCommand1 = (ABBYY.FlexiCapture.ClientUI.TCommandID) ((int)userCommand + 1);
IMenu menu = MainWindow.MainMenu[0].Submenu;
menu.AppendItem( userCommand1, "User command" );

A toolbar button or a menu item added for a user command will be disabled unless a handler of the On User Command event is added.

The sample code below demonstrates processing the On User Command event.

ABBYY.FlexiCapture.ClientUI.TCommandID commandID = ( ABBYY.FlexiCapture.ClientUI.TCommandID )( CommandId );
ABBYY.FlexiCapture.ClientUI.TCommandID userCommand = ABBYY.FlexiCapture.ClientUI.TCommandID.CI_UserCommand;
ABBYY.FlexiCapture.ClientUI.TCommandID userCommand1 = (ABBYY.FlexiCapture.ClientUI.TCommandID) ((int)userCommand + 1);
if( commandID == userCommand1 ) {
<... call necessary methods here ...>


On Field Control Deactivate

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers >

Return to chapter overview

On Field Control Deactivate

When it is launched

The script is launched before a field stops being active.

The field that is going to be activated next is passed to the script as an input parameter. This parameter can be changed.

Parameters

Name | Type | Access | Description
Context | IFieldControl | Read/write | The field being deactivated
NewActiveControl | IBoxedFieldControl | Read/write | The field being activated. note Note: The property has null value if the field that is going to be activated belongs to another document.
WasModified | bool | Read/write | Specifies whether the field was modified


On Closing Document

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers >

Return to chapter overview

On Closing Document

When it is launched

The script is launched when the document is being closed in the document editor (when going to a new document or closing the document editor) and prior to confirmation of changes.

·If the CanClose.Value property is set to false, the document will remain open.

·If the CanClose.Value property is set to true, the document will be closed after the script execution.

By default, the value of the CanClose parameter is true.

Parameters

Name | Type | Access | Description
CanClose | IBoolean | Read/write | Specifies whether to close the document
Context | IDocumentEditor | Read/write | The document editor


On Task Close

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers >

Return to chapter overview

On Task Close

When it is launched

The script is launched prior to closing the current task.

·If the CanClose.Value property is set to true, the task will be closed after the script execution.

·If the CanClose.Value property is set to false, the task will remain open.

By default, the value of the CanClose parameter is true.

Parameters

Name | Type | Access | Description
CanClose | IBoolean | Read/write | Specifies whether to close the task
Context | ITaskWindow | Read/write | The task window


On Closing Project

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers >

Return to chapter overview

On Closing Project

When it is launched

The script is launched when the project is being closed and prior to showing an inquiry dialog. The inquiry box appears if the user must confirm the action before proceeding.

·If the CanClose.Value property is set to false, the main window will remain open.

·If the CanClose.Value property is set to true, the main window will be closed.

By default, the value of the CanClose parameter is true.

Parameters

Name | Type | Access | Description
CanClose | IBoolean | Read/write | Specifies whether to close the main window
Context | IMainWindow | Read/write | The main window


On Region Change

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers >

Return to chapter overview

On Region Change

When it is launched

The script is launched prior to modifying a region in the image window.

·If the AllowChangeRegion.Value property is set to true, the region will be changed after the script execution.

·If the AllowChangeRegion.Value property is set to false, the region will not be changed.

By default, the value of the AllowChangeRegion parameter is true.

Parameters

Name | Type | Access | Description
AllowChangeRegion | IBoolean | Read/write | Specifies whether to change the region.
Context | IFieldRegionControl | Read/write | The region
NewRegionParam | IShellRects | Read/write | Rectangles of the region. For tables, the whole table region is passed. note Note: When changing a container of the region, a new region of this container is returned and new regions of its child elements are not returned. When changing the region of a child element, only a new region of this child element is returned. For tables, the table region is always returned, also when changing a column or row region.


On Task Window Mode Changed

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers >

Return to chapter overview

On Task Window Mode Changed

When it is launched

The script is launched when changing the view of the task window (when the user switches to a different view mode).

Parameters

Name | Type | Access | Description
Context | ITaskWindow | Read/write | The task window


On Open Document

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers >

Return to chapter overview

On Open Document

When it is launched

The script is launched upon opening a document in the document editor (when opening a new document window or going to a new document).

When the script is launched, all windows inside the document editor are already created.

Parameters

Name | Type | Access | Description
Context | IDocumentEditor | Read/write | The document editor

note Note: Closing the document from this script is not allowed. Using the command DocumentEditor.TaskWindow.CloseEditorWindow(); will cause the error message:

"System.Runtime.InteropServices.COMException (0x80004005): Document editor cannot be closed."


On Task Window Create

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers >

Return to chapter overview

On Task Window Create

When it is launched

The script is launched upon creating a task window.

Parameters

Name | Type | Access | Description
Context | ITaskWindow | Read/write | The task window


On Task Reject

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers >

Return to chapter overview

On Task Reject

When it is launched

The script is launched prior to rejecting the task.

·If the CanReject.Value property is set to true, the task will be rejected after the script execution.

·If the CanReject.Value property is set to false, the task will not be rejected.

By default, the value of the CanReject parameter is true.

note Note: The event occurs only when using the Reject Task command. When closing the station the event does not occur.

Parameters

Name | Type | Access | Description
CanReject | IBoolean | Read/write | Specifies whether to reject the task
Context | ITaskWindow | Read/write | The task window


On Region Control Draw

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers >

Return to chapter overview

On Region Control Draw

When it is launched

The script is launched prior to redrawing the region.

·If the DrawDefault.Value property is set to true, drawing the region will be cancelled.

·If the DrawDefault.Value property is set to false, the region will be redrawn.

By default, the value of the DrawDefault parameter is false.

Parameters

Name | Type | Access | Description
Context | IFieldRegionControl | Read/write | The region
DrawContext | IDrawContext | Read/write | The drawing context
DrawDefault | IBoolean | Read/write | Specifies whether to continue drawing the region


On Task Send To Stage

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers >

Return to chapter overview

On Task Send To Stage

When it is launched

This event handler runs before a task is moved to another stage.

·If the value of the CanSend.Value property is set to true, the task will be sent to another stage after the execution of the script.

·If the value of the CanSend.Value property is set to false, the task will not be sent to another stage.

By default, the value of the CanSend parameter is set to true.

Parameters

Name | Type | Access | Description
CanSend | IBoolean | Read/write | Specifies whether to send the task to another stage.
Context | ITaskWindow | Read/write | The task window.


On Text Field Validating

Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers >

Return to chapter overview

On Text Field Validating

When it is launched

The script is launched when the control is validating the user editing of a text field, e.g. when trying to choose the value from suggestions or when the control loses focus.

·If the CanApply.Value property is set to true, the user input will be validated after the script execution.

·If the CanApply.Value property is set to false, the user editing will be undone.

By default, the value of the CanApply parameter is true.

Parameters

Name | Type | Access | Description
CanApply | IBoolean | Read/write | Specifies whether to save changes
Context | ITextEditor | Read/write | The document field editor


Objects

This section contains the description of objects used in scripts, their properties and methods.

listPicture IBoolean

listPicture IBoxedFieldControl

listPicture IDocumentEditor

listPicture IDocumentItem

listPicture IDocumentItems

listPicture IDocumentsCollection

listPicture IDocumentsWindow

listPicture IDrawContext

listPicture IErrorControl

listPicture IErrorControls

listPicture IErrorsWindow

listPicture IFieldControl

listPicture IFieldRegionControl

listPicture IFieldRegionControls

listPicture IFormWindow

listPicture IImageWindow

listPicture IMainMenu

listPicture IMainWindow

listPicture IMenu

listPicture IMenuItem

listPicture IPageControl

listPicture IPageItem

listPicture IPageItems

listPicture IPagesCollection

listPicture IPoint

listPicture ISelection

listPicture IShellRational

listPicture IShellRect

listPicture IShellRects

listPicture ITaskWindow

listPicture ITextEditor

listPicture IToolbar

listPicture IToolbarButton

listPicture IToolbars

listPicture TCommandBarType

listPicture TCommandID

listPicture TDockingType

listPicture TErrorType

listPicture TSelectionType

listPicture TTaskWindowMode

listPicture TTextSize

listPicture TUserRole

listPicture TWorkWindowType


IBoolean

What it does

Passes in-out boolean values to scripts.

Properties

Name | Type | Access | Description
Value | bool | Read/write | The value

note Note: To assign a value to an object of IBoolean type, you must use the Value property. For example, to assign a true value to the object A of IBoolean type, you must write A.Value = true instead of A = true.


IBoxedFieldControl

What it does

Stores the document field control.

Properties

Name | Type | Access | Description
Value | IFieldControl | Read/write | The field


IDocumentEditor

What it does

Represents the document editor.

Methods

Definition | Description
Save() : bool | Saves the document

Properties

Name | Type | Access | Description
Document | IDocument | Read-only | The document being edited
ErrorsWindow | IErrorsWindow | Read-only | The errors window
FormMode | bool | Read/write | Specifies whether the data displaying mode is enabled
FormWindow | IFormWindow | Read-only | The form window
Handle | int | Read-only | The handle of the window
ImageWindow | IImageWindow | Read-only | The image window
Modified | bool | Read-only | Specifies whether the document is modified
TaskWindow | ITaskWindow | Read-only | The task window


IDocumentItem

What it does

Represents a document in the documents window.

Properties

Name | Type | Access | Description
Collection | IDocumentItems | Read-only | The collection that contains the document
Document | IDocument | Read-only | The document
Expanded | bool | Read/write | Specifies whether the document is expanded
MarkedNextStage | IStageInfo | Read-only | The next stage to which the document will be sent after the task is complete.
PageItems | IPageItems | Read-only | The collection of pages included in the document
Rect | IShellRect | Read-only | The rectangle of the document in the IDocumentsWindow
Selected | bool | Read/write | Specifies whether the document is selected
TaskDocument | bool | Read-only | Specifies whether the document belongs to the current task
TaskWindow | ITaskWindow | Read-only | The task window

note Note: For the Thumbnails view mode, the Expanded property value is always true. Setting the property to false does not result in errors, but the value will remain true.

note Note: If the document is collapsed, the DocumentItem.PageItems.Count property returns "0".


Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Objects >

Return to chapter overview

IDocumentItems

What it does

A collection of IDocumentItem objects. Represents documents in the documents window.


Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Objects >

Return to chapter overview

IDocumentsCollection

What it does

A collection of IDocument objects.


IDocumentsWindow

What it does

The window for displaying documents in Thumbnails View or in Details View.

Methods

Definition | Description
EnsureRectVisible( imageRect : IShellRect ) | Moves the scroll box to make the specified rectangle visible
FindDocumentItem( document : IDocument ) : IDocumentItem | Retrieves IDocumentItem by the IDocument object of ControllerInterop
FindPageItem( page : IPage ) : IPageItem | Retrieves IPageItem by the IPage object of ControllerInterop. note Note: If the IDocumentItem, that contains the IPageItem you are looking for is collapsed (i.e. if Expanded=false), no IPageItem will be found.

Properties

Name | Type | Access | Description
ClientRect | IShellRect | Read-only | The rectangle of the client area (in window coordinates). Coordinates of the left upper corner of the main window are (0, 0).
Docking | TDockingType | Read/write | The position of IDocumentsWindow in the document editor
FocusedItem | IDocumentItem | Read-only | Focused document. If the focus is placed on a page, the property returns the document containing this page.
Handle | int | Read-only | The handle of the window
Items | IDocumentItems | Read-only | The collection of documents
Ratio | IShellRational | Read/write | The ratio of the window size to the size of the parent window
ScrollPos | IPoint | Read/write | The position of the scroll box
SelectedItems | IDocumentItems | Read-only | Selected documents
TaskWindow | ITaskWindow | Read-only | The task window
TotalRect | IShellRect | Read-only | The rectangle of the whole window


IDrawContext

What it does

Represents the context of drawing. Allows you to draw elementary geometric objects by using scripts. The color is specified as a sequence of four bytes: 0x00BBGGRR, where the "BB" bite represents the blue color, the "GG" bite is the green color and the "RR" bite is the green color.

Methods

Definition | Description
FillAlphaRect( rect : IShellRect, rgbColor : int, alpha : int ) | Draws a filled rectangle with a specified level of transparency.
FillRect( rect : IShellRect, rgbColor : int ) | Draws a filled rectangle of the specified color.
GetPixel( x : int, y : int ) : int | Retrieves the pixel color (in RGB) by its coordinates.
Line( start : IPoint, end : IPoint, rgbColor : int ) | Draws a line of the specified color connecting the "start" and "end" points.
Rect( rect : IShellRect, rgbColor : int ) | Draws a rectangle with a frame of the specified color.
SetPixel( x : int, y : int, rgbColor : int ) : int | Sets the color (in RGB) of the pixel with specified coordinates. Returns the previous color of the pixel (in RGB).

Properties

Name | Type | Access | Description
Handle | int | Read-only | The handle to the context (HDC)


IErrorControl

What it does

Represents an item in the IErrorsWindow list.

Methods

Definition | Description
Field( index : int ) : IField | Retrieves the field related to the error by the index of the error

Properties

Name | Type | Access | Description
Error | string | Read-only | The text of the error
FieldsCount | int | Read-only | The number of fields related to the error
Index | int | Read-only | The index of the error in the IErrorsWindow
IsWarning | bool | Read-only | Specifies whether the error is a warning
Type | TErrorType | Read-only | The type of the error


Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Objects >

Return to chapter overview

IErrorControls

What it does

A collection of IErrorControl objects.


IErrorsWindow

What it does

Represents the errors window.

Properties

Name | Type | Access | Description
Controls | IErrorControls | Read-only | The collection of controls
Docking | TDockingType | Read/write | The position of IErrorsWindow relative to IFormWindow in the document editor.
DocumentWindow | IDocumentEditor | Read-only | The document editor
FocusedControl | IErrorControl | Read/write | The error which is focused at the moment
Handle | int | Read-only | The handle of the window
Ratio | IShellRational | Read/write | The ratio of the IErrorsWindow size (which is a numerator) to the total size of IFromWindow plus IErrorsWindow windows (which is a denominator).
ShowAssemblingErrors | bool | Read/write | Specifies whether to show assembly errors
ShowFormatErrors | bool | Read/write | Specifies whether to show format errors
ShowRuleErrors | bool | Read/write | Specifies whether to show rule errors
ShowUnmatchedRegionErrors | bool | Read/write | Specifies whether to show errors associated with unmatched regions


IFieldControl

What it does

Represents a control of the document field.

warning Important! The object returns null for fields not involved in distributed verification.

Properties

Name | Type | Access | Description
DeviceRect | IShellRect | Read-only | The rectangle of the control
Field | IField | Read-only | The document field
FieldFullName | string | Read-only | The full name of the field
FieldRegionControls | IFieldRegionControls | Read-only | The collection of field regions of the document. For fields, that do not have regions, null is returned.
First | IFieldControl | Read-only | The first child control
FormWindow | IFormWindow | Read-only | The form window
IsExpandable | bool | Read-only | If the property is set to true, the field can be expanded and collapsed on the form. This property allows you to check whether the field is expandable before applying the IsExpanded property to it. For group fields, the property is true.
IsExpanded | bool | Read/write | Retrieves information whether the group field is expanded. Allows you to collapse/expand the field.
IsUserReadOnly | bool | Read/write | Specifies whether the field is editable. If the property is set to true, editing the field is not allowed. If the property is set to false, the possibility to edit the field depends on the Document Definition settings.
Last | IFieldControl | Read-only | The last child control
Next | IFieldControl | Read-only | The next control
Parent | IFieldControl | Read-only | The parent control
Prev | IFieldControl | Read-only | The previous control
TextEditor | ITextEditor | Read-only | The field editor. For inactive fields, null is returned.


IFieldRegionControl

What it does

Represents a region of the document field.

warning Important! The object returns null for fields not involved in distributed verification.

Properties

Name | Type | Access | Description
DeviceRect | IShellRect | Read-only | The rectangle of the window
FieldControl | IFieldControl | Read-only | The control of the document field which is associated with the region
FieldRegion | IFieldRegion | Read-only | The region of a document field
First | IFieldRegionControl | Read-only | The first child region
Last | IFieldRegionControl | Read-only | The last child region
Next | IFieldRegionControl | Read-only | The next region
Page | IPageControl | Read-only | The page that contains the region
Parent | IFieldRegionControl | Read-only | The parent region
Prev | IFieldRegionControl | Read-only | The previous region
Visible | bool | Read/write | Specifies whether the region is visible
Window | IImageWindow | Read-only | The image window


Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Objects >

Return to chapter overview

IFieldRegionControls

What it does

A collection of IFieldRegionControl objects.


IFormWindow

What it does

Represents the form window.

Methods

Definition | Description
EnsureRectVisible( imageRect : IShellRect ) | Moves the scroll box to make the specified rectangle visible
FindControl( field : IField ) : IFieldControl | Searches for a field control using the value of the field region of ControllerInterop

Properties

Name | Type | Access | Description
ActiveControl | IFieldControl | Read/write | The active control on the form. The value of this property cannot be modified from the On Field Control Activate and On Field Control Deactivate events.
ClientRect | IShellRect | Read-only | The rectangle of the client area (in window coordinates). The coordinates of the left upper corner of the main window are (0, 0).
Control | IFieldControl | Read-only | The main control of the form
Docking | TDockingType | Read/write | The position of IFormWindow relative to IImageWindow in the document editor.
DocumentWindow | IDocumentEditor | Read-only | The document editor
Handle | int | Read-only | The handle of the window
Ratio | IShellRational | Read/write | The ratio of the total size of IFormWindow plus IErrorsWindow windows (which is a numerator) to the size of IDocumentEditor (a denominator). If the Docking property value is DT_Top or DT_Bottom, the ratio between the y-extents is measured. Otherwise, the ratio between the x-extents is measured.
ScrollPos | int | Read/write | The position of the scroll box
TextSize | TTextSize | Read/write | The size of the text
TotalRect | IShellRect | Read-only | The rectangle of the whole form. If the size of the client area is smaller than the size of the form, the form window will have scrollbars


IImageWindow

What it does

Represents the image window.

Methods

Definition | Description
EnsureRectVisible( imageRect : IShellRect ) | Moves the scroll box to make the specified rectangle visible

Properties

Name | Type | Access | Description
ClientRect | IShellRect | Read-only | The rectangle of the client area (in window coordinates). The coordinates of the left upper corner of the main window are (0, 0). If the size of the client area is smaller than the size of the TotalRect, the image window will have scrollbars.
Docking | TDockingType | Read/write | The position of IImageWindow relative to IFormWindow in the document editor
DocumentEditor | IDocumentEditor | Read-only | The document editor
FirstPage | IPageControl | Read-only | The first page
Handle | int | Read-only | The handle of the window
ImageScale | IShellRational | Read/write | The image scale. The range of admissible values is from 1/8 to 8.
IsDocked | bool | Read/write | Specifies whether the image window is docked
LastPage | IPageControl | Read-only | The last page
Ratio | IShellRational | Read/write | The ratio of the IImageWindow size (which is a numerator) to the size of IDocumentEditor (a denominator). If the Docking property value is DT_Top or DT_Bottom, the ratio between the y-extents is measured. Otherwise, the ratio between the x-extents is measured.
ScrollPos | IPoint | Read/write | The position of the scroll box
ShowBWImages | bool | Read/write | Specifies whether to show a black-and-white image
ShowToolbar | IShellRational | Read/write | Specifies whether to show the toolbar
TotalRect | IShellRect | Read-only | The rectangle of the area occupied by all page images


IMainMenu

What it does

A collection of IMenuItem interfaces. Represents the main window menu.

For all items of this menu, the TCommandID property returns CI_SubMenu.

Methods

Definition | Description
Reset() | Resets the menu (restores the original view).

warning Important! After applying the Reset method the current object of IMainMenu type is destructed and a new object is generated. As a result, all references to the current object become invalid and attempts to use it will generate an exception. You must either define a new object or initialize the existing object anew.

The sample code below demonstrates applying the Reset method to an object. As a result, the menu object becomes invalid and cannot be referred to.

// Define a new IMainMenu object and initialize it
IMainMenu menu = TaskWindow.MainWindow.MainMenu;
// Call the Reset method
menu.Reset();


IMainWindow

What it does

Represents the main window.

Methods

Definition | Description
CommandIsEnabled( commandId: TCommandID ) : bool | Returns true for a command that is enabled and false for a command that is disabled.
EnableCommand( commandId: TCommandID, bool) | Makes a command available or unavailable in the GUI.

Properties

Name | Type | Access | Description
Handle | int | Read-only | The handle of the window
MainMenu | IMainMenu | Read-only | The main menu
Selection | ISelection | Read-only | The selection
TaskWindow | ITaskWindow | Read-only | The task window
Toolbars | IToolbars | Read-only | The collection of toolbars
UserRole | TUserRole | Read-only | The user role
WorkWindowType | TWorkWindowType | Read-only | The type of the working window


IMenu

What it does

A collection of IMenuItem objects. Represents a menu or a submenu.

Methods

Definition | Description
AppendItem( commandId : TCommandID, text : string ) : IMenuItem | Appends a menu item with the command identifier commandId and the text Text at the end of the menu. Returns the IMenuItem object of the corresponding element. Any identifiers from the TCommandID enumeration may be used (including CI_SubMenu and CI_Separator), except for CI_Undefined. For CI_Separator, the Text parameter will be ignored.
Delete( index : int ) | Deletes an element by its index in the collection.
Find( commandId : TCommandID ) : int | Finds the index of the first object with the specified ID of the command in the collection.
InsertItem( index : int, commandId : TCommandID, text : string ) : IMenuItem | Inserts a menu item with the command identifier commandId and the text Text in the position Index of the menu. Returns the IMenuItem object of the corresponding element. Any identifiers from the TCommandID enumeration may be used (including CI_SubMenu and CI_Separator), except for CI_Undefined. For CI_Separator, the Text parameter will be ignored.


IMenuItem

What it does

Represents a menu item.

Properties

Name | Type | Access | Description
Command | TCommandID | Read-only | The command identifier. For a submenu title, CI_SubMenu is returned. For a separator, CI_Separator is returned. If there is no identifier for a command among TCommandID values, CI_Undefined is returned.
Enable | bool | Read/write | Specifies whether to enable menu items. If the property is set to false, all menu items with the specified identifier (the Command property) will be disabled. If the property is set to true, enabling menu items depends on the internal logic of the program. For separators and submenu titles, the property is always true.
Submenu | IMenu | Read-only | The submenu. If a submenu is missing, null is returned.
Text | string | Read/write | The text of the menu item. note Note: The property does not allow changing text for the menu bar items: File, Edit, View, etc.


IPageControl

What it does

Represents a page in the image window.

Methods

Definition | Description
ImageToDevice( imageRect : IShellRect ) : IShellRect | Converts image coordinates to window coordinates

Properties

Name | Type | Access | Description
DeviceRect | IShellRect | Read-only | The rectangle of the page
First | IFieldRegionControl | Read-only | The first child region
ImageWindow | IImageWindow | Read-only | The image window
Last | IFieldRegionControl | Read-only | The last child region
Next | IPageControl | Read-only | The next page
Page | IPage | Read-only | The page
Prev | IPageControl | Read-only | The previous page


IPageItem

What it does

Represents a page in the documents window.

Properties

Name | Type | Access | Description
DeviceRect | IShellRect | Read-only | The rectangle occupied by the page in the IDocumentsWindow
DocumentItem | IDocumentItem | Read-only | The document that contains the page
Page | IPage | Read-only | The page
Selected | bool | Read/write | Specifies whether the page is selected
TaskWindow | ITaskWindow | Read-only | The task window


Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Objects >

Return to chapter overview

IPageItems

What it does

A collection of IPageItem objects.


Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Objects >

Return to chapter overview

IPagesCollection

What it does

A collection of IPage objects.


IPoint

What it does

Represents a point.

Properties

Name | Type | Access | Description
X | int | Read/write | X-coordinate
Y | int | Read/write | Y-coordinate


ISelection

What it does

Represents the selection of documents or pages.

Properties

Name | Type | Access | Description
DocumentItems | IDocumentItems | Read-only | The selected documents
Documents | IDocumentsCollection | Read-only | Objects of the IDocument type corresponding to the selected documents
PageItems | IPageItems | Read-only | The selected pages
Pages | IPagesCollection | Read-only | Objects of the IPage type corresponding to the selected pages
Type | TSelectionType | Read-only | The selection type

note Note: If the document is collapsed, the DocumentItems[i].PageItems.Count property returns "0".


IShellRational

What it does

Represents a fraction.

Properties

Name | Type | Access | Description
Denominator | int | Read/write | A denominator
Numerator | int | Read/write | A numerator


IShellRect

What it does

Represents a rectangle.

Methods

Definition | Description
ToString() : string | Represents a rectangle as a string of the form "[left,top,right,bottom]"

Properties

Name | Type | Access | Description
Bottom | int | Read/write | Bottom coordinate
Left | int | Read/write | Left coordinate
Right | int | Read/write | Right coordinate
Top | int | Read/write | Top coordinate


Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Objects >

Return to chapter overview

IShellRects

What it does

A collection of IShellRect objects.


ITaskWindow

What it does

Represents the task window.

Methods

Definition | Description
CloseDocument( document : IDocument ) | Closes the document for editing from script. When calling this method, the document state is changed.
CloseEditorWindow() | Closes the document editor. warning Important! When closing the document editor, all unsaved changes will be lost. When calling this method, the document state is changed.
CloseTask( bool ) | Closes the task with a warning that the process will be canceled (if the argument is set to true) or without a warning (if the argument is set to false).
DocumentState( document : IDocument ) : TDocumentState | Retrieves the document state in the task window. note Note: The method cannot be invoked from a secondary thread.
EditDocument( document : IDocument, page : IPage ) : IDocumentEditor | Opens the document in the document editor for editing. note Note: If the document is opened successfully, the object of the IDocumentEditor type is returned. Otherwise null is returned. When calling this method, the document state is changed.
OpenDocument( document : IDocument ) | Opens the document for editing from script. The method can be called even when the document is opened in the document editor with read-only permissions. When calling this method, the document state is changed.
RejectTask( bool ) | Rejects the task with a warning that the process will be canceled (if the argument is set to true) or without a warning (if the argument is set to false).

Properties

Name | Type | Access | Description
Batch | IBatch | Read-only | The batch
DocumentsWindow | IDocumentsWindow | Read-only | The documents window
EditorWindow | IDocumentEditor | Read-only | The document editor
Handle | int | Read-only | The handle of the window
MainWindow | IMainWindow | Read-only | The main window
Mode | TTaskWindowMode | Read/write | The view mode


ITextEditor

What it does

Represents a document field editor.

Methods

Definition | Description
ApplyChanges() : bool | Applies made changes.
GetSelection( startPos : int, endPos : int ) | Gets the beginning and the end of the selection. If no field is selected, assigns "0" to the startPos and endPos parameters.
ResetChanges() | Resets made changes.
SetSelection( startPos : int, endPos : int ) | Sets a new selection.
ShowSuggestList() | Shows the list of suggestions, if exists. Otherwise, nothing happens.

Properties

Name | Type | Access | Description
Control | IFieldControl | Read-only | The field control
FormWindow | IFormWindow | Read-only | The form window
Modified | bool | Read-only | Specifies whether the field is modified
Text | string | Read-only | The text in the field


IToolbar

What it does

A collection of IToolbarButton objects. Represents a toolbar.

Methods

Definition

Description

AppendButton( commandId : TCommandID, text : string ) : IToolbarButton

Appends a toolbar item with the command identifier commandId and the text Text at the end of the toolbar. Returns the IToolbarButton object of the corresponding element.

Any command identifiers from the TCommandID enumeration may be used (including CI_SubMenu and CI_Separator), except for CI_Undefined. For CI_Separator, the Text parameter will be ignored.

Delete( Index : int )

Deletes an item by its index in the collection.

Find( commandId : TCommandID ) : int

Searches for the index of the button with a specified identifier in the collection.

InsertButton( index : int, commandId : TCommandID, text : string ) : IToolbarButton

Inserts a toolbar item with the command identifier commandId and the text Text in the position Index of the toolbar. Returns the IToolbarButton object of the corresponding element.

Any command identifiers from the TCommandID enumeration may be used (including CI_SubMenu and CI_Separator), except for CI_Undefined. For CI_Separator, the Text parameter will be ignored.

Reset()

Resets all changes and restores the original view of the toolbar.

Properties

Name | Type | Access | Description
Name | string | Read-only | The name of the toolbar
Type | TCommandBarType | Read-only | The type of the toolbar
Visible | bool | Read/write | Specifies whether the toolbar is visible


IToolbarButton

What it does

Represents a toolbar button.

Properties

Name | Type | Access | Description
Command | TCommandID | Read-only | The command identifier. The returned value cannot be CI_SubMenu. If there is no identifier for a command among TCommandID values, CI_Undefined is returned
Enable | bool | Read/write | Specifies whether to enable toolbar buttons: ·If the value is set to false, all toolbar buttons with the specified identifier (the Command property) will be disabled. ·If the value is set to true, enabling toolbar buttons depends on the internal logic of the program.
Text | string | Read/write | The text on the toolbar button
Visible | bool | Read/write | Specifies whether a toolbar button or a separator is visible


Navigation: Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Objects >

Return to chapter overview

IToolbars

What it does

A collection of IToolbar objects.


TCommandBarType

Description

The toolbar type. Applies in the IToolbar interface.

Types:

·CBT_Undefined = 0 - An undefined toolbar.

·CBT_GroupVerification = 1 - A toolbar with group verification commands.

·CBT_FieldVerification = 2 - A toolbar with field verification commands.

·CBT_Standard = 3 - A standard toolbar.

·CBT_Navigation = 4 - A navigation toolbar. Contains buttons such as Previous Document,Next Document, Previous Item to Verify, etc.

·CBT_Views = 5 - A toolbar for switching between the Details View and the Thumbnails View.

·CBT_Tasks = 6 - A toolbar with task operation tools.

·CBT_Setup = 7 - A toolbar with basic tools for managing project. Contains buttons such as Document Definitions..., Batch Types..., Project Properties..., etc.

·CBT_ScanAndRead = 8 - A toolbar with image operation tools (import, recognition and other operations on images).

·CBT_UserToolbar = 9 - A toolbar added by the user when specifying skin settings for a stage.


TCommandID

Show/Hide Hidden Text

Description

The command identifier.

Admissible values:

General

·CI_SubMenu - a submenu title

·CI_Separator - a separator

·CI_Undefined - an undefined command identifier
File menu commands

·CI_NewProject - New Project...

·CI_BrowseProject - Open Project...

·CI_BrowseWebProject - Open Project from Server...

·CI_CloseProject - Close Project

·CI_UploadProject - Upload Project to Server...

·CI_Save - Save

·CI_NewBatch - New Batch...

·CI_LoadImage - Load Images...

·CI_ScanImages - Scan Images...

·CI_ImportImage - Import Images...

·CI_Export - Export

·CI_ExportToFile - Export Data to Files

·CI_ExportImages - Export Images to Files

·CI_ExportToDB - Export to Database

·CI_RecentFiles - Open Recent Project

·CI_Exit - Exit ABBYY FlexiCapture 12

Edit menu commands

·CI_EditUndo - Undo

·CI_EditRedo - Redo

·CI_EditCut - Cut

·CI_EditCopy - Copy

·CI_EditPaste - Paste

·CI_EditClear - Delete

·CI_MergeDocuments - Merge Documents

·CI_SplitDocuments - Split Document

·CI_EditSelectAll - Select All

·CI_EditFind - Find...

·CI_EditFindNext - Find Next

·CI_MoveToNextItem - Next Document

·CI_MoveToPreviousItem - Previous Document

·CI_ImageClean - Despeckle Image

·CI_ImageInvert - Invert Image

·CI_ImageMirrorHorizontal - Flip Horizontally

·CI_ImageMirrorVertical - Flip Vertically

·CI_ImageRotate90 - Rotate 90° Clockwise

·CI_ImageRotate270 - Rotate 90° CounterclockWise

·CI_ImageRotate180 - Rotate 180°

·CI_ImageChangeResolution - Change Resolution

·CI_ExportImage - Save Image

Additional commands for a remote Verification station (Field verification):

·CI_EditDeleteAll - Delete All Characters

·CI_EditInsertLineBreak - Insert Line Break

·CI_VerificationMergeSymbols - Merge Characters

View menu commands

·CI_ShowTestBatches - Show Test Batches

·CI_ShowWorkBatches - Show Batches

·CI_ShowQueues - Show Queues

·CI_ShowDetails - Show Details

·CI_ShowThumbnails - Show Thumbnails

·CI_SetupDetailsView - Choose Details to View

·CI_DocModeImage - Document Editor in Image Mode

·CI_DocModeForm - Document Editor in Data Mode

·CI_DockImageOnTop - Image at Top of Document Editor

·CI_DockImageOnBottom - Image at Bottom of Document Editor

·CI_DocImageOnLeft - Image at Left of Document Editor

·CI_DocImageOnRight - Image at Right of Document Editor

·CI_DocImageUndocked - Undocked

·CI_DocErrorsOnTop - Errors at Top of Document Editor

·CI_DocErrorsOnBottom - Errors at Bottom of Document Editor

·CI_DocErrorsOnLeft - Errors at Left of Document Editor

·CI_DocErrorsOnRight - Errors at Right of Document Editor

·CI_ImageScalePageWidth - Fit Image to Width

·CI_ImageScalePageHeight - Fit Image to Height

·CI_ImageScaleWholePage - Best Image Fit

·CI_ImageScale400 - Scale Image to 400%

·CI_ImageScale200 - Scale Image to 200%

·CI_ImageScale100 - Scale Image to 100%

·CI_ImageScale75 - Scale Image to 75%

·CI_ImageScale50 - Scale Image to 50%

·CI_ImageScale25 - Scale Image to 25%

·CI_ImageScaleCustom - Custom Image Scale

·CI_ImageScaleZoomIn - Zoom Image In

·CI_ImageScaleZoomOut - Zoom Image Out

·CI_TextSizeLargest - Largest Data Text

·CI_TextSizeLarger - Larger Data Text

·CI_TextSizeMedium - Medium Data Text

·CI_TextSizeSmaller - Smaller Data Text

·CI_TextSizeSmallest - Smallest Data Text

·CI_ViewToolbarsLayout - Show Toolbar in Document Editor

·CI_ShowFormatErrorInBallon - Show Error Message for Active Field in Balloon

·CI_ShowFormatErrorInErrorView - Show Error Message for Active Field at Top

·CI_ShowFormatErrorInFormView - Show Error Message for Active Field at Bottom

·CI_BWImageMode - Show Images in Black and White

·CI_ThumbnailSizeSmallest - Smallest Thumbnail Size

·CI_ThumbnailSizeDefault - Default Thumbnail Size

·CI_ThumbnailSizeLargest - Largest Thumbnail Size

·CI_ThumbnailSizeIncrease - Increase Thumbnail Size

·CI_ThumbnailSizeDecrease - Decrease Thumbnail Size

·CI_ViewToolbarsStandard - Show/Hide Standard Toolbar

·CI_ViewToolbarsDocuments - Show/Hide View Toolbar

·CI_ViewToolbarsNavigation - Show/Hide Navigation Toolbar

·CI_ViewToolbarsScanAndRead - Show/Hide Scanning Toolbar

·CI_ViewToolbarsProjectSetup - Show/Hide Project Setup Toolbar

·CI_ViewToolbarsTasks - Show/Hide Queues Tasks Toolbar

·CI_ShowToolbar1 - Show Toolbars

·CI_ViewStatusbar - Show/Hide Status Bar

·CI_ViewFullScreen - Switch to Full Screen/Window

·CI_Refresh - Refresh

·CI_ViewProperties - Show Properties

Additional commands for a remote Verification station (Group verification):

·CI_ShowFieldImage - Show/Hide Field Image

·CI_ShowFieldImageOnTop - Show Field Image on Top

·CI_ShowFieldImageOnBottom - Show Field Image on Bottom

·CI_ShrinkToFit - Shrink Field Image to Fit

·CI_ContextImageScale400 - Scale Field Image 400%

·CI_ContextImageScale200 - Scale Field Image 200%

·CI_ContextImageScale150 - Scale Field Image 150%

·CI_ContextImageScale100 - Scale Field Image 100%

·CI_ContextImageScale75 - Scale Field Image 75%

·CI_ContextImageScale50 - Scale Field Image 50%

·CI_ShowCharacterImage - Show Character Image

·CI_ShowActionsToolBar - Show/Hide Actions Toolbar

·CI_ShowVerInfoBar - Show/Hide Verification Info Bar

·CI_VerificationOptions - Show Verification Preferences

Additional commands for a remote Verification station (Field verification):

·CI_ShowRecognizedText - Show Recognized Text

·CI_ShowSymbolImagesCutting - Show/Hide Character Images Cutting

·CI_ShowSpecialSymbols - Show/Hide Special Characters

·CI_ShowAnalogousFields - Show/Hide Analogous Field

Task menu commands

·CI_GetTask - Get Task

·CI_ReturnTask - Close Task

·CI_ShowTaskComment - Show Task Comment

·CI_CancelTask - Reject Task

·CI_DeferTask - Postpone Task

·CI_SendTaskToException - Send Task to Exceptions

·CI_SendTaskToRescan - Send Task to Rescanning Stage

·CI_SendTaskToStage - Send Task to Stage

·CI_AutoTaskReceive - Automatic Task Receive On/Off

·CI_AddDocsToMarked - Add Documents to Marked

·CI_UnmarksDocs - Unmark Documents

·CI_MarkDocsToException - Mark Documents to Send to Exceptions

·CI_MarkDocsToRescan -Mark Documents to Rescanning

·CI_MarkDocsToStage - Mark Documents to Stage

·CI_ViewMarkedGroupList - View Marked Groups List

Recognition menu commands

·CI_ApplyTemplate - Analyze

·CI_SetDocTemplate - Match Document Definition

·CI_ReadActive - Recognize

Verification menu commands

·CI_VerifyAll - Run Verification...

·CI_GotoNextError - Next Item to Verify

·CI_GotoPrevError - Previous Item to Verify

·CI_GotoNextAssembleError - Next Document with Assembly Error(s)

·CI_GotoPrevAssembleError - Previous Document with Assembly Error(s)

·CI_GotoNextUnkCharacher - Next Uncertain Character

·CI_GotoPrevUnkCharacher - Previous Uncertain Character

·CI_GotoNextRuleError - Next Rule Error

·CI_GotoPrevRuleError - Previous Rule Error

Additional commands for a remote Verification station (Group verification):

·CI_VerificationConfirmAll - Confirm All

·CI_VerificationPostponeAll - Postpone All

·CI_VerificationToggleSelected - Toggle Selected Item

·CI_VerificationNextPage - Next Verification Page

·CI_VerificationPrevPage - Previous Verification Page

·CI_VerificationClose - Close Verification

Additional commands for a remote Verification station (Field verification):

·CI_VerificationConfirmField - Confirm Field

·CI_VerificationNextUncertain - Next Uncertain Character

·CI_VerificationPrevUncertain - Previous Uncertain Character

·CI_VerificationNextField - Next Field

·CI_VerificationPrevField - Previous Field

Project menu commands

·CI_ShowTemplatesList - Show List of Document Definitions

·CI_ShowBatchTypes - Show Batch Types List

·CI_ShowImportProfiles - Show Import Profiles List

·CI_SwitchToAdminMode - Switch to Admin Mode

·CI_ProtectProject - Protect Project with Password

·CI_UnprotectProject - Unprotect Project

·CI_ExportProject - Export Project

·CI_ImportProject - Update Project

·CI_ViewProjectProperties - Show Project Properties

·CI_CreateTestCopy - Create Test Copy

·CI_CommitTestCopy - Commit Test Copy

·CI_DeleteTestCopy - Delete Test Copy

Tools menu commands

·CI_DocPriorityLowest - Set Lowest Document Priority

·CI_DocPriorityLow - Set Low Document Priority

·CI_DocPriorityNormal - Set Normal Document Priority

·CI_DocPriorityHigh - Set High Document Priority

·CI_DocPriorityHighest - Set Highest Document Priority

·CI_DocPriorityExtraHigh - Set Extra-High Priority for Document

·CI_UpdateDocToLatestVersion - Update Documents to Latest Version of Project

·CI_Reanalize - Reanalyze

·CI_Reread - Rerecognize

·CI_AssembleDocuments - Refresh Documents Assembly

·CI_RecheckRules - Recheck Rules

·CI_CheckBatchIntegrity - Check Batch Integrity

·CI_BatchPriorityLowest - Set Lowest Batch Priority

·CI_BatchPriorityLow - Set Low Batch Priority

·CI_BatchPriorityNormal - Set Normal Batch Priority

·CI_BatchPriorityHigh - Set High Batch Priority

·CI_BatchPriorityHighest - Set Highest Batch Priority

·CI_BatchPriorityExtraHigh - Set Extra-High Priority for Batch

·CI_ChangeBatchType - Change Batch Type

·CI_ViewOptions - Show Options

Commands of the field local menu

·CI_ExecuteCustomAction - Execute Custom Action

User commands

·CI_UserCommand - User commands

Help menu commands

·CI_HelpAbbyyWebSite - ABBYY Website

·CI_HelpAbout - About ABBYY FlexiCapture

·CI_HelpContent - Help Topics

·CI_HelpPurchaseInfo - How to Buy ABBYY Products

·CI_HelpSendFeedback - Send Feedback...

·CI_HelpTechSupport - Technical Support


TDockingType

Description

The side of the principal window adjacent to the given window.

Admissible values:

·DT_Undefined = 0 - The side is undefined or the windows are not adjacent.

·DT_Left = 1 - The left side.

·DT_Right = 2 - The right side.

·DT_Top = 3 - The upper side.

·DT_Bottom = 4 - The lower side.


TDocumentState

Description

The document state in the task window. Applies in the ITaskWindow interface.

Admissible values:

·DS_Locked = 0 - The document is locked. No actions on the document are allowed.

·DS_Edited =1 - The document is being edited in the document editor.

·DS_Closed = 2 - The document is closed. It can be both opened and edited.

·DS_Opened = 3 - The document is opened. It can be edited by using a script.

·DS_EditedAndOpened = 4 - The document is being edited in the document editor and can be edited by using a script.

·DS_EditedAndLocked = 5 - The document is opened in the document editor and locked from any actions.

note Note: If the document is being edited in the document editor, its state changes to DS_EditedAndOpened.


TErrorType

Description

The type of an error. Applies in the IErrorControl interface.

Admissible values:

·ET_Assembling = 0 - The assembly error

·ET_Rule =1 - The rule error

·ET_Format = 2 - The format error


TSelectionType

Description

Types of selection. Applies in the ISelection interface.

Admissible values:

·ST_Undefined = 0 - Indicates that no selection type is specified.

·ST_Documents = 1 - Indicates that the selection contains documents.

·ST_Pages = 2 - Indicates that the selection contains pages.

·ST_Both = 3 - Indicates that the selection contains both documents and pages.


TTaskWindowMode

Description

View modes. Applies in the ITaskWindow interface.

Admissible values:

·TWM_Undefinied = 0 - View is undefined

·TWM_ListView = 1 - Details view

·TWM_ThumbnailView = 2 - Thumbnails view


TTextSize

Description

The text size. Applies in the IFormWindow interface.

Admissible values:

·TS_Undefined = 0 - Text size is undefined

·TS_Smallest = 1 - The smallest text size

·TS_Smaller = 2 - Small text size

·TS_Medium = 3 - Medium text size

·TS_Larger = 4 - Large text size

·TS_Largest = 5 - The largest text size


TUserRole

Description

The role of the user. Applies in the IMainWindow interface.

Admissible values:

·UR_Undefined = 0 - The role is undefined

·UR_VerificationOperator =1 - The Verification Operator

·UR_SeniorVerificationOperator = 2 - The Senior Verification Operator


TWorkWindowType

Description

Types of working windows.

Types:

·WWT_Undefined = 0 - The window type is undefined

·WWT_Task = 1 - The task window


User scripts for the Web Verification Station

To enable a web custom action for the data form displayed on the Web Verification Station, follow these steps:

1.Open the Project Setup Station and click Project → Document Definitions....

2.In the Document Definitions dialog box, select the appropriate Document Definition and click Edit....

3.Open the field properties, click the Custom Action tab, and select the Enable Web Custom Action option.

To edit an existing script or to create a new one, complete steps 1 through 3 above and click the Edit... button next to the Enable Web Custom Action option. This will open a Script Editor window, where you can write the required code.

User scripts intended for use on the Web Verification Station are written in JavaScript. As opposed to using the Web Services API provided by the Application Server, such scripts will be run directly in the user's browser window when the user clicks the corresponding button on the data form.

A user script will be run in a separate <iframe> element, which must be closed after the script has been completed. The Web Verification Station and the <iframe> element communicate via postMessage using JSON-RPC.

By default, the <iframe> element is positioned in the <body> of the verification window. You can also place the <iframe> element in the central pane beneath the document image. To do this, specify the following path in the first line of the script: // mode: documentEditor.

See below for a description of the object model used for user scripts to be run on the Web Verification Station. We also provide a sample script that carries out a database search.

listPicture Objects

listPicture Sample script to search in a database


Objects

Show/Hide Hidden Text

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:
['Document Section 1', 'Group[10]','Field3'],
where [10] is the number of the instance of the repeating group.

·namesPath is an array containing field and group names that form the path to the field or a link to a field object.

getFieldValue(namesPath) (*)

Returns:

·a string for a TextField field;

·a checkmark value for a Checkmark field;

·a string array for a Checkmark Group field.

namesPath | fieldObject:

·an array containing field and group names that form the path to the field or a link to a field object,

·or a link to the field object.

setCurrentFieldValue(value, forced, onSaved)

Modifies the field value for which the custom script has been opened.

Parameters:

·value – the field value.

·forced – updates the field value and records new data. This parameter is optional.

ofalse – the field value in the Document Definition will be updated only after the save() function has been called.

otrue – the field value in the Document Definition will be updated immediately.

For a custom script, an update will occur regardless of the mode.
By default, this parameter is set to false.

·onSaved – callback function. Called if the forced parameter is set to true. This parameter is optional.

setFieldValue(namesPath | field, value, forced, onSaved) (*)

Modifies the field value.

Parameters:

·namesPath | fieldObject:

oan array containing field and group names that form the path to the field,

oor a link to the field object.

·value – value of the corresponding field.

·forced – updates the field value and records new data. This parameter is optional.

ofalse – the field value in the Document Definition will be updated only after the save() function has been called.

otrue – the field value in the Document Definition will be updated immediately.

For a custom script, an update will occur regardless of the mode.
By default, this parameter is set to false.

·onSaved – A callback function. Called if the forced parameter is set to true. This parameter is optional.

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:
['Document Section 1', 'Group[10]','Field3'],

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:

·entityInfo – an object:

ocacheName – a name for the data set.

ocolumns – names for the columns where data will be recorded. Array of strings.

ovalues – the values for the corresponding columns. Array of strings.

·onResult – a callback function that receives the ID of the record created in the data set.

editEntity(entityInfo: {cacheName, columns, values}, onResult())

Edits an entry in the database.

Parameters:

·entityInfo – an object:

ocacheName – a name for the data set.

ocolumns – names for the columns where data will be recorded. Array of strings.

ovalues – the values for the corresponding columns. Array of strings.

·onResult – a callback function.

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
FieldValue
BoldMask}].

Parameters:

·cacheName – the data set name.

·filters – search parameters:

oFieldName – the field name. Leave empty to search all fields.

oFieldValue – the field value.

·cursorPos – the position of the cursor in the entry field.

oIf a value was entered partially and the cursor is positioned after the typed symbols, they will be considered as a prefix for the value that is being searched for.

oIf the cursor is positioned before a partially typed word, those symbols will be considered as the ending of the value that is being searched for.

For example, if, when searching for a company name, you type in "AB" and the cursor is positioned after it, the value "ABBYY" will be selected.
If you type in "AB" and the cursor is positioned in front of it, the value "Mention Q LAB" will be selected.

·allowMultipleColumnResults – Returns the values of the fields that have been found.
The data set may contain entries for which one field name (FieldName) corresponds to multiple field values (FieldValue). For example, two or more variations of a company's name may be specified in the CompanyName column.

In this case:

otrue – returns and records all field values that satisfy the search conditions,

ofalse – returns and records a single result that best fits the search conditions.

·onResult – a callback function that returns a search result array. Each result is a single string from the data set, which is a string array. Each string comprises the field name, its value, and the BoldMask parameter.

BoldMask – a string of ‘0’ and ‘1’ the same length as the value found during the search. '1' represents a symbol from the found value that matches the corresponding symbol in the search field, and '0' represents a symbol that does not.

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:

·cacheName – the data set name.

·Filters – an object array:

oFieldName – the field name. In order to search on all fields, this should be left blank.

oFieldValue – the field value.

·onResult – a callback function that returns a search result array. Each result is a single string from the data set, which is itself a string array. Each string comprises the field name, its value, and the BoldMask parameter.

BoldMask – a string of ‘0’ and ‘1’ the same length as the value found during the search. '1' represents a symbol from the found value that matches the corresponding symbol in the search field, and '0' represents a symbol that does not.

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’

},

]

]

Sample database search script

Functions for working with the document form

Function

Description

selectRow(tablePath, rowNumber) (*)

Marks a table row as selected.

·tablePath | fieldObject:

oan array of field and group names that form the path to the table field,

oor a link to a table object.

·rowNumber – the number of the row to select, zero-based.

deselectRow(tablePath, rowNumber?) (*)

Removes selection from a table row.

·tablePath | fieldObject:

oan array of field and group names that form the path to the table field,

oor a link to a table object.

·rowNumber – the number of the row to deselect, zero-based, if omitted the selection is removed from all rows in the table.

scrollFormToField(namesPath) (*)

Scrolls the form editor to get the field into view.

·namesPath | fieldObject:

oan array of field and group names that form the path to the table field,

oor a link to a table object.

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.

·domId – element ID in DOM format.

·onResult – a callback function that receives the object with the DOM coordinates of the element (width, height, top, left, right, bottom) relative to the top left corner of the browser window.

setStyles(styles, callback)

Adds CSS styles to the custom action frame window.

·styles – an object with CSS property names and values.

example:
{
display: 'block',
position: 'absolute',
top: '0px',
bottom: '0px',
left: '0px',
right: '0px',
width: '100%',
height: '100%',
border: '0',
overflow: 'hidden',
'overflow-x': 'hidden',
'overflow-y': 'hidden',
'z-index': '10000'
}

·callback – a callback function.

(*) 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:
['Document Section 1', 'Group[10]','Field3'],

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.

note Note: If the field value was modified after the script was initialized, the changes will not be applied.

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.

·Id – region ID.

·Status – status of the region.

o0 – region not superimposed (or region is deleted)

o1 – region is not recognized

o2 – the value from the region is substituted in the field

·PageId – ID of the page on which the region is located.

·IsNew – flag to indicate new regions.

·Coordinates – coordinates of the region in the image.

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.

·Id – region ID.

·Status – status of the region.

o0 – region not superimposed (or region is deleted)

o1 – region is not recognized

o2 – the value from the region is substituted in the field

·PageId – ID of the page on which the region is located.

·IsNew – flag to indicate new regions.

·Coordinates – coordinates of the region in the image.

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:

·Id – row ID.

·RowNumber – the sequence number of the row, counting from zero.

·TableBlockId – identifiers of sections, tables, table blocks forming the path to the table block..

·Cells – fields in table cells. Fields can be of the following types: picture, checkmark, checkmark group, text.

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.

·Id – region ID.

·Status – status of the region.

o0 – region not superimposed (or region is deleted)

o1 – region is not recognized

o2 – the value from the region is substituted in the field

·PageId – ID of the page on which the region is located.

·IsNew – flag to indicate new regions.

·Coordinates – coordinates of the region in the image.

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:

·0 – text field.

·1 – numeric field.

·2 – currency amount fields.

·3 – DateTime field.

·4 – Date field.

·5 – Time field.

·6 – Code field.

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.

·Id – region ID.

·Status – status of the region.

o0 – region not superimposed (or region is deleted)

o1 – region is not recognized

o2 – the value from the region is substituted in the field

·PageId – ID of the page on which the region is located.

·IsNew – flag to indicate new regions.

·Coordinates – coordinates of the region in the image.

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.

·Id – region ID.

·Status – status of the region.

o0 – region not superimposed (or region is deleted)

o1 – region is not recognized

o2 – the value from the region is substituted in the field

·PageId – ID of the page on which the region is located.

·IsNew – flag to indicate new regions.

·Coordinates – coordinates of the region in the image.

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:

·Id – record ID

·Name – record name

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.

·Id – region ID.

·Status – status of the region.

o0 – region not superimposed (region is deleted)

o1 – region is not recognized

o2 – the value from the region is substituted in the field

·PageId – ID of the page on which the region is located.

·IsNew – flag to indicate new regions.

·Coordinates – coordinates of the region in the image.

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.

·Id – region ID.

·Status – status of the region.

o0 – region not superimposed (or region is deleted)

o1 – region is not recognized

o2 – the value from the region is substituted in the field

·PageId – ID of the page on which the region is located.

·IsNew – flag to indicate new regions.

·Coordinates – coordinates of the region in the image.

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:

·DocumentNodeRef – list of links as an array of field IDs to fields in the form

·Description – error description

·SectionName – list of sections involved in the error

BatchId

Number

Read-only

The package ID

Errors

{
DocumentNodeRef: number[][];
Severity: number;
Message: string;
RuleName: string;
}[]

Read-only

Errors in the document where:

·DocumentNodeRef – list of links as an array of field IDs to fields in the form

·Severity:

o1 – Error,

o0 – Warning

·Message – error text

·RuleName – the name of the rule that caused the error

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:

·Id – page ID

·Modification – the revision number of the page

·HasColorImage –specifies the color of the page

·ImageResolution – image resolution

·KeyValue – the value of the key field page

·SectionTemplateId – ID section of the page

·SectionTemplateName – page section name

·SectionTemplatePageNumber – the page number in the section

·Comment – review of the page

·ImageWidth –width of the image page

·ImageHeight – height of the page image

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


Sample database search script

Show/Hide Hidden Text

This sample script will search for data in a database at the Web Verification Station.

Before you proceed to configure this user script, be sure to complete the following steps:

1.Open the Project Setup Station and click Project → Document Definitions...

2.Click Document Definition → Document Definition Properties, open the data sets tab, and then click Add....

3.Create a data set, create a few records, and click Close.

A new user script will be added to the Script Editor for Web Verification Station.

Sample script that searches for data in a database

//DataSet Name

var dbCacheName = 'DataSet1';

//Field in dataset, used to replace current field value

var fieldNameInCache = 'Field2';

var self = this;

var styles = {

display: 'block',

position: 'absolute',

top: '0px',

bottom: '0px',

left: '0px',

right: '0px',

width: '100%',

height: '100%',

border: '0',

overflow: 'hidden',

'overflow-x': 'hidden',

'overflow-y': 'hidden',

'z-index': '10000'

}

var newValueToInsert = '';

// Sets iframe styles

setStyles(

styles,

function() {

//Dialog markup

var windowMarkup = "<div class='frame'><div class='searchField'><input id='searchValue' /><button id='searchButton'>Search</button></div><div id='recordspanel'><table id='resultspreview'></table><div id='norecord'>No records found</div></div><div class='buttonsfield'><button id='confirm'>Ok</button><button id='cancel'>Cancel</button></div></div>";

//Dialog styles

var css = "<style>body{width:100vw;height:100vh;background:rgba(0,0,0,0.1);margin:0;padding:0;display:flex;align-items:center;justify-content:center;}.frame{width:400px;max-height:80vh;background:white;min-height:200px;padding:50px;}#norecord{display:none;}#searchValue{width:calc(100% - 60px);}#cancel{margin-left:20px;}.buttonsfield{display:flex;justify-content:flex-end;height:25px;}.bolded{font-weight:bold;}button{width:60px;}#confirm{display:none;}#recordspanel{min-height:145px;padding: 10px 0;}#searchfield{height:30px;}</style>";

//Set styles

$('head').append(css);

//Creates dom in iframe

$("body").append(windowMarkup);

// Search button click

$('#searchButton').click(function () {

//Look in Dictionary

getDict(

{

cacheName: dbCacheName, //dataset name

filters: [{ FieldName: "", FieldValue: $('#searchValue').val() }] //fields to search

},

function (result) {

//Records rows from dataset

var records = result.detail.result;

//First row description

var firstRecord = records[0];

//hide 'table' and 'ok' button if no result is found

if (!firstRecord) {

$('#resultspreview').hide();

$('#norecord').show();

$('#confirm').hide();

} else {

$('#resultspreview').show();

$('#confirm').show();

$('#norecord').hide();

$('#resultspreview').html('');

firstRecord.forEach(function (recordData) {

if (fieldNameInCache === recordData.FieldName) {

newValueToInsert = recordData.FieldValue;

}

$('#resultspreview')

.append('<tr class="' +

(fieldNameInCache === recordData.FieldName ? 'bolded' : '') +

'"><td>' +

recordData.FieldName +

'</td><td>' +

recordData.FieldValue +

'</td></tr>');

});

}

});

});

//On 'ok' button click

$('#confirm').click(function () {

if (newValueToInsert) {

//Set value to current field

setCurrentFieldValue(newValueToInsert);

//Save and close iframe

save();

}

});

//On 'cancel' button click

$('#cancel').click(function () {

cancel();

});

});

This sample script can also be found here: http://<ApplicationServer>/FlexiCapture12/Verification/Scripts/CustomScripts/customActionLookup.js, where <ApplicationServer> is the name of the computer where the Application Server is installed.

Replace the values in the following lines of the sample script:

·var dbCacheName = 'DataSet1', where DataSet1 is the name of the data set created earlier.

·var fieldNameInCache = 'Field2', where Field2 is the name of the data set field that will contain the value to be copied.


Application Programming Interface (API)

This section contains a description of the ABBYY FlexiCapture Application Programming Interface (API).


About the ABBYY FlexiCapture Application Server Web Services API

The Web Services API of the Application Server enables an external system to connect to the Application Server of ABBYY FlexiCapture using the SOAP protocol over HTTP, create a document processing task, start the task, and get the results. The Web Services API allows you to create your own applications that use ABBYY FlexiCapture as a service that analyzes document images and exports the results.

The Application Server Web Services API can be used to control a pre-configured workflow. Before you commence, you need to create projects on the Project Setup Station and specify the Document Definitions, batch types, image processing settings, etc. to be used.

The control is exercised by calling Web Services API methods. Standard and specially designed data types are used as parameters and returned values.

The formal description of the service (WSDL) is available here:

http://<ApplicationServer>/FlexiCapture12/Server/API/v1/WSDL where <ApplicationServer> is the name of the computer on which the Application Server is installed.


Migrating from earlier versions of the Web Services API

The new version of the Web Services API is not compatible with earlier versions of WSDL.

The table below lists the changes implemented in the new version.

API Methods
Name | Changes
AddNewDocument | Added the previousItemId parameter that makes it possible to specify the position of a new document in a set.
AddNewPage | Added the previousItemId parameter that makes it possible to specify the position of a page document in a set.
CreateTask | Added the batchId parameter for passing the identifier of the batch to which a document belongs.
GetBatchIdsRange | This new method reserves a range of identifiers within a batch.
GetDocument | Added the sessionId parameter for passing the identifiers of Application Server connection sessions.
GetDocumentResultsList | Added the sessionId parameter for passing the identifiers of Application Server connection sessions and the batchId parameter for passing the identifier of the batch to which a document belongs.
GetDocuments | This method now returns a list containing all documents, including the empty document that is the parent document of all the top-level documents in the batch.
 | Added the sessionId parameter for passing the identifiers of Application Server connection sessions.
LoadDocumentResult | Added the sessionId parameter for passing the identifiers of Application Server connection sessions and the batchId parameter for passing the identifier of the batch to which a document belongs.
ReplacePageImage | Added the batchId parameter for passing the identifier of the batch to which a document belongs.
SetDocumentPriority | Added the batchId parameter for passing the identifier of the batch to which a document belongs.
Data types
Name | Changes
ChildrenOrder | This new structure contains information about a child document of a set.
Document | Added the ParentId field which contains the identifier of the parent document of a set.
 | Added the ChildrenOrder field for passing a set of child documents. This makes it possible to sort documents in a set.
Page | Removed the PreviousId field because the value is now specified explicitly when a page is created using the AddNewPage method.

POST requests concerning files stored on a server must now include the parentId parameter.

Use the following address to access the new version of the Web Services API:

http://<ApplicationServer>/FlexiCapture12/Server/API/v1/Soap.

You can find a formal description here: http://<ApplicationServer>/FlexiCapture12/Server/API/v1/WSDL.

Earlier versions are not supported.


Using the Web Services API of the ABBYY FlexiCapture Application Server

The standard usage scenario includes the following processing stages:

·Connect to the Web Services API

·Scanning the documents and sending them for processing

·Verifying the scanned documents

·Rescanning the documents

·Getting the processing results

It is recommended to use Web Services API to process documents at User Type (ID=2000) stages. These stages can be created on the Workflow tab of the Project Properties dialog box in the Advanced mode. When connecting, the "External User" (ID=12) role and the "External Station" (ID=10) station type must be used.

For tasks at these stage, both pre- and post-processing are always executed, irrespective of the stage type specified when calling the CloseTask method (for other stages, post-processing is executed only if the stage of the required type is specified, e.g. "Verification Postprocessing"). During pre-processing, XML-files with description of documents of the task are created. It is necessary to upload these documents by the using a POST request, make necessary changes and save them on the server, then close the task by the CloseTask method. During post-processing, information from XML-files that describes the documents will be saved in ABBYY FlexiCapture database.


Connecting to the Web Services API

Show/Hide Hidden Text

To use an API, you must first connect to a Web service. A connection can be established by the "External User" (ID=12) role on the "User station" (ID=10) workstation type.

The APIs

You can work with the Web Services API of the ABBYY FlexiCapture 12 Application Server either via SOAP requests, JSON requests or POST requests. The interface to be accessed is determined by the address of the web service:

Method | When to use | Handler value
SOAP requests | Can be used for any operation | .../API/v1/Soap
JSON requests | Can be used for any operation | .../API/v1/Json
POST requests | Can be used to optimize file operations, such as uploading files to the server, uploading files in pieces, getting a check sum, downloading files from the server, etc. | .../FileService/v1

Authentication methods

In ABBYY FlexiCapture 12, you can connect to the Web Services API using the standard Windows and Basic authentication methods, as well as using FlexiCapture authentication. The type of authentication is determined by the address of the web service. To use Windows and Basic authentication, include " /API" in the address, and "/FCAuth/API" to use ABBYY FlexiCapture authentication.

note Note: Add the suffix in the form of ?Tenant=MyTenantName at the end of the API connection address to specify a tenant.

Examples of Web service addresses with different authentication methods

 | Windows and Basic authentication | ABBYY FlexiCapture authentication
SOAP requests | http:// <ApplicationServer>/FlexiCapture12/Server/API/v1/Soap | http:// <ApplicationServer>/FlexiCapture12/Server/FCAuth/API/v1/Soap
JSON requests | http:// <ApplicationServer>/FlexiCapture12/Server/API/v1/Json | http:// <ApplicationServer>/FlexiCapture12/Server/FCAuth/API/v1/Json
POST requests | http:// <ApplicationServer>/FlexiCapture12/Server/FileService/v1 | http:// <ApplicationServer>/FlexiCapture12/Server/FCAuth/FileService/v1


Scanning documents

To scan documents:

1.Connect to Web Services API;

2.Open a session;

3.Open a project;

4.Create a new batch;

5.Open the newly created batch;

6.Add pages / documents into the batch;

7.Close the batch;

8.Start processing the batch.


Verifying the documents

To verify the documents:

1.Connect to Web Services API;

2.Open a session;

3.Open a project;

4.Request a task;

5.Open the batch specified in the task;

6.Request the list of documents in the task;

7.Requests the files from the server which are attached either to the task (data verification stage) or to the document (verification stage);

8.If required, modify the files of the task and save them on the server;

9.Return the task to the server;

10.Close the project.


Rescanning the documents

To verify the documents:

1.Connect to Web Services API;

2.Open a session;

3.Open a project;

4.Request a task;

5.Request the task information;

6.Open the batch specified in the task;

7.Request the list of documents in the task;

8.Replace images of pages or add documents / pages / images;

9.Return the task to the server in the Scanning stage;

10.Close the project;

11.Close the session.


Getting the processing results

To get the processing results:

1.Connect to Web Services API;

2.Open a session;

3.Open a project;

4.Get the list of files with the document export results;

5.Get the files with the document export results;

6.Close the project;

7.Close the session.


References

This section contains the following information about the Web Services API: descriptions of the available methods, the data types used, and working with files.


API Methods

API methods are used to control the Application Server.

Sessions | Projects | Batch Types
Batches | Tasks | Documents
Pages | Licensing tickets | Users
Files | Attachments | Log
Document Definitions | Server Requests | Other

Sessions

CloseSession | Closes a session
GetSessionInfo | Gets information about a session
IsSessionExists | Checks if a session exists
OpenSession | Opens a session and specifies the role types and station

Projects

CloseProject | Closes a project
GetProjects | Gets a list of projects loaded onto the Application Server
GetProjectsForUser | Gets the set of records listing the projects available to the user
OpenProject | Opens a project

Batch Types

GetAllowedBatchTypes | Gets a list of available batch types
GetBatchType | Gets information about a batch type
GetBatchTypes | Gets a list of batch types
GetProcessingStages | Gets extended information about processing stages
HasRightsForBatchType | Checks if the user role has access permissions to a certain batch type

Batches

AddNewBatch | Adds a new batch and specifies its owner
AddNewImage | Adds an image into a batch
CloseBatch | Closes (unlocks) a batch
DeleteBatch | Deletes a batch
GetBatch | Gets information about a batch
GetBatches | Gets information about batches in a project
GetBatchIdsRange | Reserves a set of IDs in a batch
GetBatchPercentCompleted | Gets information about the processing of a batch
GetFilteredBatches | Get the filtered list of batches from a server in groups
OpenBatch | Opens (locks) a batch
ProcessBatch | Starts processing a batch
UpdateBatch | Update the header of the batch

Tasks

CancelTask | Cancels a task
CloseTask | Closes a task
CreateTask | Creates a task
GetAvailableTasks | Get the list of available tasks for the selected stage type. Allows restricting the set of available batches.
GetAvailableTasksByStageId | Get the list of available tasks for the specified processing stages. Allows restricting the set of available batches
GetAvailableQueues | Gets the set of records listing the processing stages available to the user
GetCurrentTask | Gets the ID of the task obtained with the GetTask method and not yet processed
GetPostponedTasks | Gets a list of postponed tasks
GetTask | Select the task with the highest priority at the processing stages of the selected type and open it for processing. Allows restricting the set of available batches.
GetTaskByStageId | Select the task with the highest priority at the specified processing stages and open it for processing
GetTaskDocuments | Gets a list of documents in a task
GetTaskInfo | Gets extended information about a task
OpenTask | Opens a task
PostponeTask | Postpones a task
SendTask | Sends the task to the specified processing stage
SendTaskToException | Sends a task to Exceptions
SetTaskPriority | Changes the task priority

Documents

AddNewDocument | Add a new document and specify additional information
AddNewImage | Adds an image into a batch
DeleteDocument | Deletes a document
GetDocument | Gets information about a document
GetDocumentResultsList | Gets a list of files into which the document processing results were exported
GetDocuments | Gets a list of documents in a batch
LoadDocumentResult | Gets the file into which the document processing results were exported
SetDocumentProperties | Specifies registration parameters for a document
SetDocumentPriority | Changes document priority

Pages

AddNewPage | Adds a page image to a document and includes a description
DeletePage | Deletes a page from a document
ReplacePageImage | Replaces a page image

Licensing tickets

GetNewTicket | Gets a new licensing ticket
ReleaseTicket | Releases a licensing ticket
UpdateTicket | Updates the status of a licensing ticket

Users

AddUserIfNotExist | Gets the ID of the current user and creates a database record if required
FindUser | Gets the user ID and user name
GetAvailableQueues | Gets the set of records listing the processing stages available to the user
GetAvailableUsers | Gets a list of users or groups allowed to process a specified stage
GetProjectsForStationType | Finds projects where a user has at least one role associated with a particular type of station
GetProjectsForUser | Gets the set of records listing the projects available to the user
GetRoles | Gets list of all roles in the project
GetUser | Gets information about the user based on the user ID
GetUserRoles | Gets list of IDs of the user roles available to the current user in the given project
GetUsers | Gets the list of users
GetUserStatistics | Gets a set of records listing the the number of batches, documents and pages whose state changed to "processed" for a given period of time
HasRightsForBatchType | Checks if the user role has access permissions to a certain batch type

Files

GetCustomFileNames | Gets a list of user files stored on the Application Server
LoadCustomFile | Loads a user file from the Application Server
RemoveCustomFile | Deletes a user file from the Application Server
SaveCustomFile | Saves a user file on the Application Server

Attachments

GetAttachmentNames | Gets a list of attachments on the Application Server
LoadAttachment | Loads an attachment from the Application Server
RemoveAttachment | Deletes an attachment from the Application Server
SaveAttachment | Saves an attachment on the Application Server

Document Definitions

GetTemplates | Get the set of Document Definitions of the project
GetBatchTypeTemplates | Returns the set of identifiers for Document Definitions attached to the batch type

Log

WriteToLog

Writes information about events into the Application Server's log

Server Requests

CreateRequest | Creates a request to the Application Server
DeleteRequest | Deletes a request to the Application Server.
GetRequests | Gets a list of requests to the Application Server in the current session
GetRequestStatus | Gets the status of a request to the Application Server
SetRequestStatus | Changes the status of a request to the Application Server

Other

GetSettingValue | Gets a named parameter from the database
SetSettingValue | Saves a named parameter in the database


Sessions

The API methods allow you to perform the following operations on connection sessions:

CloseSession | Close a connection session
GetSessionInfo | Get information about a session
IsSessionExists | Check that the connection session exists
OpenSession | Open a connection session and specify the types of role and station


CloseSession

What it does

Closes a previously opened connection to the Application Server.

Definition

void CloseSession( int sessionId );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server to be closed

Returned value

None.


GetSessionInfo

What it does

Gets information about a session.

Definition

int GetSessionInfo( int sessionId, out string userName, out string computerName, out int roleType );

Parameters

Name | Type | Description
sessionId | int | The ID of the session about which information is to be retrieved
userName | out string | The name of the user
computerName | out string | The name of the user's computer
roleType | out int | The type of user role. See RoleType for possible values.

Returned value

Type | Description
int | User ID


IsSessionExists

What it does

Checks if a session with the specified ID exists.

Definition

bool IsSessionExists( int sessionId );

Parameters

Name | Type | Description
sessionID | int | The ID of the session

Returned value

Type | Description
bool | A flag which shows whether a session with the specified ID exists or not


OpenSession

What it does

Opens a connection to the Application Server.

note Note: You must specify a valid combination of roleType and stationType (i.e. the station you specify for a role must be accessible to that role). Otherwise the session will not be opened. For detailed information about roles and their accessible stations, see Operators of ABBYY FlexiCapture.

Definition

int OpenSession( int roleType, int stationType );

Parameters

Name | Type | Description
roleType | int | The type of role to be used for the connection. See RoleType for possible values.
stationType | int | The type of connecting station. See WorkstationType for possible values.

Returned value

Type | Description
int | The ID of the opened connection


Projects

The API methods allow you to perform the following operations on projects:

CloseProject | Close a project
GetProjects | Get the list of projects loaded onto the Application Server
GetProjectsForUser | Gets the set of records listing the projects available to the user
OpenProject | Open a project


CloseProject

What it does

Closes a previously opened project.

Definition

void CloseProject( int sessionId, int projectId );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
projectId | int | The ID of the project to be closed

Returned value

None.


GetProjects

What it does

Gets information about all the projects on the Application Server.

Definition

Project [] GetProjects();

Parameters

None.

Returned value

Type | Description
Project[] | A set of records, each containing information about one of the projects


OpenProject

What it does

Opens a project for further work.

note Note: An opened project cannot be deleted. To delete the project, first close it using the CloseProject method.

Definition

int OpenProject( int sessionId, string projectNameOrGuid );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
projectNameOrGuid | string | The name or GUID of the project to be opened

Returned value

Type | Description
int | The ID of the opened project


Batch types

The API methods allow you to perform the following operations on batch types:

GetAllowedBatchTypes | Gets a list of available batch types
GetBatchType | Gets information about a batch type
GetBatchTypes | Gets a list of batch types
GetProcessingStages | Gets extended information about processing stages
HasRightsForBatchType | Check if the user under this role is permitted to access this batch type


GetAllowedBatchTypes

What it does

Gets information about batch types within a project which are available to the user with a given role.

Definition

BatchTypeIdentity [] GetAllowedBatchTypes( int userId, int roleType, int projectId );

Parameters

Name | Type | Description
userId | int | User ID
roleType | int | The type of role to be used for the connection. See RoleType for possible values.
projectId | int | The ID of the project for which to get the list of available batch types. If invalid projectId is passed (less than or equal to zero), the list of available batch types for all projects is returned.

Returned value

Type | Description
BatchTypeIdentity[] | A set of records, each containing information about one of available batch types in the project


GetProcessingStages

What it does

Gets information about processing stages.

Definition

ProcessingStage [] GetProcessingStages( int projectId, int batchTypeId, int stageType, string stageName );

Parameters

Name | Type | Description
projectId | int | The ID of the project
batchType | int | The ID of the batch type. The following values are also possible: ·0 - default batch type; ·-1 - all the batch types.
stageType | int | The ID of the stage type. See ProcessingStage for possible values. Use '-1' value to get processing stages of all types.
stageName | string | The name of the processing stage. Use an empty string ("") to get all the processing stages.

Returned value

Type | Description
ProcessingStage[] | A set of records, each containing information about a processing stages


HasRightsToBatchType

What it does

Checks if the specified user role has access permissions to certain batch types.

Definition

bool HasRightsForBatchType( int sessionId, int projectId, int batchTypeId, int roleType );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
projectId | int | Project ID
batchTypeId | int | Batch type ID. ·0 - "default" batch type ·-1 - checks for access permissions to at least one batch type.
roleType | int | User role. See RoleType for possible values.

Returned value

Type | Description
bool | Availability of access permissions


Batches

The API methods allow you to perform the following operations on batches:

AddNewBatch | Add a new batch and specify its owner
AddNewImage | Add an image to a batch
CloseBatch | Close (unlock) a batch
DeleteBatch | Delete a batch
GetBatch | Get information about a batch
GetBatches | Get the list of batches in a project
GetBatchIdsRange | Reserve a set of IDs in a batch
GetBatchPercentCompleted | Get information about the processing of a batch
GetBatchType | Get information about a batch type
GetBatchTypes | Get the list of batch types
GetFilteredBatches | Get the filtered list of batches from a server in groups
OpenBatch | Open (lock) a batch
ProcessBatch | Start the processing of a batch
UpdateBatch | Update the header of the batch


AddNewBatch

What it does

Adds a new batch to a project and allows you to specify the owner of the batch (a user or group).

Definition

int AddNewBatch( int sessionId, int projectId, Batch batch, int ownerId);

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
projectId | int | The ID of the project to which a batch is to be added
batch | Batch | The parameters of the batch to be added
ownerId | int | The ID of the user or group who owns the project

Returned value

Type | Description
int | The ID of the created batch


AddNewImage

What it does

Adds an image to a batch, including a multi-page image (one new document is created, which is then split into one-page documents at the pre-processing stage).

warning Important! The added images will become accessible only after they are pre-processed. Use the ProcessBatch method to initiate batch processing after you have added the images or use the CloseTask method to close the task and to send it in the Import stage if the images were added into the documents of a task that was opened with the OpenTask method.

Definition

void AddNewImage( int sessionId, int batchId, File file );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
batchId | int | The ID of the batch to which an image is to be added
file | File | The file that contains an image

Returned value

None.


CloseBatch

What it does

Closes a batch and unlocks it for deletion.

Definition

void CloseBatch( int sessionId, int batchId );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
batchId | int | The ID of the batch to be unlocked for deletion

Returned value

None.


DeleteBatch

What it does

Deletes a batch.

warning Important! Deleting a batch deleted the exported documents contained in that batch.

Definition

bool DeleteBatch( int sessionId, int batchId );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
batchId | int | The ID of the batch to be deleted

Returned value

Type | Description
bool | A flag that shows whether the operation has been successfully completed


GetBatch

What it does

Gets information about a batch.

Definition

Batch GetBatch( int batchId );

Parameters

Name | Type | Description
batchId | int | The ID of the batch about which information is to be retrieved

Returned value

Type | Description
Batch | Information about the batch


GetBatches

What it does

Gets information about all the batches in a project.

Definition

Batch [] GetBatches( int projectId, int sessionId, bool onlyPrivateBatches );

Parameters

Name | Type | Description
projectId | int | The ID of the project that contains the batches about which information is to be retrieved
sessionId | int | The ID of the connection to the Application Server
onlyPrivateBatches | bool | The flag which determines the set of available batches. Possible values: ·True - only batches that belong the current user or user group are available; ·False - all batches are available

Returned value

Type | Description
Batch[] | A set of records, each containing information about one of the batches in the project. The returned set does not include batches created in the Web Capture Station.


GetBatchIdsRange

What it does

Reserves a set of IDs in a batch for documents and pages.

Definition

int GetBatchIdsRange( int batchId, int idCount, out int idEnd );

Parameters

Name | Type | Description
batchId | int | The ID of the batch where IDs are to be reserved
idCount | int | The number of IDs to reserve
idEnd | int | The last ID in the reserved range

Returned value

Type | Description
int | The first ID in the reserved range


GetBatchPercentCompleted

What it does

Gets information (in percent) about the progress of batch processing.

Definition

int GetBatchPercentCompleted( int batchId );

Parameters

Name | Type | Description
batchId | int | The ID of the batch for which processing information is to be retrieved

Returned value

Type | Description
int | The percentage of the task completed (For a document, 33% means the document is imported, 66% means the document is recognized, 100% means the document is exported. For a batch, the average value for all documents of the batch is calculated.)


GetBatchType

What it does

Gets information about a batch type.

Definition

BatchType GetBatchType( int batchTypeId );

Parameters

Name | Type | Description
batchTypeId | int | The ID of the batch type about which information is to be retrieved

Returned value

Type | Description
BatchType | Information about the batch type


GetBatchTypes

What it does

Gets information about all the batch types within a project.

Definition

BatchType [] GetBatchTypes( int projectId );

Parameters

Name | Type | Description
projectId | int | The ID of the project that contains the batch types about which information is to be retrieved

Returned value

Type | Description
BatchType[] | A set of records, each containing information about one of the batch types contained in the project


GetFilteredBatches

What it does

Requests a filtered set of batches from a server in groups. For example, you can send a request that looks as follows: "return 100 batches that are at the recognition stage starting from the 500th batch."

Definition

int GetFilteredBatches(int sessionId, int projectId, int batchTypeId, int[] stageTypes, int[] stageExtIds, string name, int batchPurpose, long startDate, long stopDate, long slaDateBeginRange, long slaDateEndRange, int slaStateFlags, int firstRecord, int recordsCount, RegistrationProperty[] filterRegParams, out Batch[] batches)

Parameters

Name

Type

Description

sessionId

int

The ID of the connection to the Application Server

projectId

int

The ID of the project that contains the batch types about which information is to be retrieved

batchTypeId

int

The ID of the batch type

·0 - batch by default

·-1 - all batch types

stageTypes

int []

The set of stage types (for possible values, see ProcessingStage) that have the batches you are looking for

·Empty set - all batches

·0 - batches that are not at any particular stage

stageExtIds

int []

The set of stage IDs (the Id field in the ProcessingStage structure) that have the batches you are looking for

·Empty set - all batches

·0 - batches that are not at any particular stage

name

string

The prefix of the batch name. An empty line signifies that any names are allowed

batchPurpose

int

The purpose of the batch

Possible values:

·0 - batches with data

·1 - batches for training Document Definition matching

·2 - batches for training classifiers

startDate

long

Batches that were created later than the specified date, 0 stands for all batches

For conversion, use the following methods (the example below is in C#):

DateTime dtTime;
long lTime;
...
// conversion from DataTime to long
dTime = DataTime.FromFileTime(lTime);
...
// conversion from long to DataTime
lTime = dTime.ToFileTime();

stopDate

long

Batches that were created not earlier than the specified date, 0 stands for all batches

For conversion, use the following methods (the example below is in C#):

DateTime dtTime;
long lTime;
...
// conversion from DataTime to long
dTime = DataTime.FromFileTime(lTime);
...
// conversion from long to DataTime
lTime = dTime.ToFileTime();

slaDateBeginRange

long

Batches with the processing end date under an SLA not earlier than the specified date, 0 stands for all batches

For conversion, use the following methods (the example below is in C#):

DateTime dtTime;
long lTime;
...
// conversion from DataTime to long
dTime = DataTime.FromFileTime(lTime);
...
// conversion from long to DataTime
lTime = dTime.ToFileTime();

slaDateEndRange

long

Batches with the processing end date under an SLA not later than the specified date, 0 stands for all batches

For conversion, use the following methods (the example below is in C#):

DateTime dtTime;
long lTime;
...
// conversion from DataTime to long
dTime = DataTime.FromFileTime(lTime);
...
// conversion from long to DataTime
lTime = dTime.ToFileTime();

slaStateFlags

int

Contains a warning about a batch processing deadline

The following values or their logical sum (OR) is admissible:

·0 - batches are not filtered by this attribute

·1 - batches without a specified processing deadline

·2 - batches with a processing deadline that is neither approaching nor approached

·4 - batches with an approaching processing deadline

·8 - batches with an approached processing deadline

firstRecord

int

The first record in the list

(Records are numbered starting from the zero element)

recordsCount

int

The number of batches that a user tries to obtain

filterRegParams

RegistrationProperty[]

The set of "name–value" pairs that is used to filter by registration parameters

(It is permitted to send only 5 value pairs, other pairs will be ignored)

note Note: Batches are sorted in the descending order of IDs, meaning that the latest batches are returned at the top of the list.

Returned value

Type | Description
int | The number of batches on the server that match the specified filter criteria
Batch[] | The set of completed Batch structures


OpenBatch

What it does

Opens a batch (locks it to prevent deletion by other connections). To delete a batch, close it first using the CloseBatch method.

Definition

bool OpenBatch ( int sessionId, int batchId );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
batchId | int | The ID of the batch being opened

Returned value

Type | Description
bool | A flag that shows whether the operation has been successfully completed


ProcessBatch

What it does

Starts the processing of a batch. The batch is sent to the Import processing stage.

Definition

void ProcessBatch(int sessionId, int batchId );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
batchId | int | The ID of the batch to be processed

Returned value

None.


UpdateBatch

What it does

Changes the header of a batch. Modifies the fields Name, BatchTypeId, Description, and Priority and the registration parameters of the batch whose ID is the same as the value of Batch.Id. The other fields in the Batch structure are ignored.

Definition

void UpdateBatch( int sessionId, Batch batch );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
batch | Batch | The parameters of the batch to be added

Returned value

None.


Tasks

The API methods allow you to perform the following operations on tasks:

CancelTask | Cancel a task
CloseTask | Close a task and send it to a processing stage
CreateTask | Create a task from the set of documents of one batch
GetAvailableTasks | Get the list of available tasks for the selected stage type and restrict the set of available batches
GetAvailableTasksByStageId | Get the list of available tasks for the specified processing stages
GetAvailableQueues | Get the set of records listing the processing stages available to the user
GetCurrentTask | Get the ID of the task obtained with the GetTask method and not yet processed
GetPostponedTasks | Get the list of postponed tasks
GetTask | Select the task with the highest priority at the processing stages of the selected type and open it for processing. Restrict the set of available batches.
GetTaskByStageId | Select the task with the highest priority at the specified processing stages and open it for processing
GetTaskDocuments | Get the list of documents in a task
GetTaskInfo | Get information about a task
OpenTask | Open a task
PostponeTask | Postpone a task
SendTask | Send a task to the specified processing stage
SendTaskToException | Send a task to Exceptions
SetTaskPriority | Change the task priority

warning Important! You can use the Web Services API to access only tasks at those stages for which Web stations are allowed in the project (Project → Project Properties..., Workflow tab).


CancelTask

What it does

Cancels the processing of a task.

Definition

void CancelTask( int sessionId, int taskId );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
taskId | int | The ID of the task to be canceled

Returned value

None.


CloseTask

What it does

Closes a task and makes it available for further operations.

warning Important! If the Web Services API is used to route documents, other routing methods such as enter conditions or scripts are not applied. Exceptions is the stages of the User type (ID=2000) - for them both pre- and post-processing are always executed and workflow works properly.

If documents must be sent to a particular stage after the task is closed, the next stage must be explicitly specified in the task file. For this, RoutingInfo.xsd scheme must be attached to the task when sending the task to Verification Postprocessing. The scheme includes information on stages the documents must be sent to, tasks that must be created, etc. It is also possible to specify which Document Definitions should be matched during document recognition.

To send documents to a specific stage, you can also use the SendTask method.

Definition

void CloseTask( int sessionId, int taskId, int stageType );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
taskId | int | The ID of the task to be closed
stageType | int | The ID of the stage type to which the task is to be sent. See ProcessingStageType for possible values. note Note: To return the task for further processing, the stageType value must be 410 or 510. note Note: At the Data Verification stage, the changes that have been made are saved in the task. To transfer them into the documents, you must upload xml file containing task data using POST request and send the task to the Data Verification Postprocessing stage when closing the task.

Returned value

None.


CreateTask

What it does

Creates a task from the set of documents of one batch.

Definition

int CreateTask( int sessionId, int batchId, int stageExternalId, int priority, string comment, int UserId, int[] docIds, bool setAsCurrentTask );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
batchId | int | The ID of the batch that contains the document about which information is to be retrieved
stageExternalId | int | The ID of the stage the task will be placed in
priority | int | The priority of the task. See Priority for possible values.
comment | string | A text comment to the task
userId | int | The ID of the user the task will be assigned to. If the group ID is specified, the task can be processed by any user of the group. If the value is "0" the task can be processed by any user who is allowed to process this queue in the given batch type. For queues processed by the Processing Server, this parameter is ignored.
docIds | int[] | The IDs of the batch documents
setAsCurrentTask | bool | The flag that shows whether the task will be set as a current task or will be placed in a queue. Possible values: ·True - the task will be set as a current task for the user who called the method; ·False - the task will be placed in a queue.

Returned value

Type | Description
int | Task ID


GetAvailableTasks

What it does

Gets a list of tasks available at the processing stage of the specified type.

note Note: If stage allows web-stations, only preprocessed tasks will be added to the list.

Definition

Task [] GetAvailableTasks( int sessionId, int projectId, int processingStage, bool onlyPrivateBatches);

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
projectId | int | The ID of the project for which the list of tasks is to be retrieved
processingStage | int | The ID of the stage type. Possible values: see ProcessingStage.
onlyPrivateBatches | bool | The flag which determines the set of available batches. Possible values: ·True - only batches that belong the current user or user group are available; ·False - all batches are available.

Returned value

Type | Description
Task[] | List of available tasks


GetAvailableTasksByStageId

What it does

Gets a list of tasks of the current session available at the specified processing stages.

note Note: If stage allows Web stations, only preprocessed tasks will be added to the list.

Definition

Task [] GetAvailableTasksByStageId( int sessionId, int projectId, int[] stageIds, bool onlyPrivateBatches );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
projectId | int | The ID of the project for which the list of tasks is to be retrieved
stageIds | int[] | List of the IDs of the queues to get task from
onlyPrivateBatches | bool | The flag which determines the set of available batches. Possible values: ·True - only batches that belong the current user or user group are available; ·False - all batches are available.

Returned value

Type | Description
Task[] | List of available tasks


GetAvailableQueues

What it does

Gets a set of records listing the processing stages available to the user.

Definition

Queue [] GetAvailableQueues( int sessionId, int projectId );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
projectId | int | The ID of the project for which to get the list of tasks

Returned value

Type | Description
Queue[] | The set of records listing the processing stages available to the user


GetCurrentTask

What it does

Returns the ID of the current task.

Definition

int GetCurrentTask( int sessionId );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server

Returned value

Type | Description
int | Task ID


GetPostponedTasks

What it does

Gets a list of postponed tasks at the specified processing stage.

Definition

Task [] GetPostponedTasks( int sessionId, int projectId, int processingStage );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
projectId | int | The ID of the project for which the list of tasks is to be retrieved
processingStage | int | The ID of the stage. Possible values: see ProcessingStage.

Returned value

Type | Description
Task[] | List of available tasks


GetTask

What it does

Selects the task with the highest priority and opens it for processing. The selected task is locked (i.e. cannot be opened by other users).

note Note: If there is no suitable task, "0" is returned.

warning Important! A task must be opened before any actions on the task can be performed!

Definition

int GetTask( int sessionId, int projectId, int stageType, bool onlyPreprocessedTask, bool onlyPrivateBatches );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
projectId | int | Project ID
stageType | int | The ID of the stage type. See ProcessingStage for possible values.
onlyPreprocessedTask | bool | The flag which determines from which tasks to select. Possible values: ·True - select only pre-processed tasks; ·False - select from all tasks.
onlyPrivateBatches | bool | The flag which determines the set of available batches. Possible values: ·True - only batches that belong the current user or user group are available; ·False - all batches are available.

Returned value

Type | Description
int | Task ID


GetTaskByStageId

What it does

Selects the task with the highest priority and opens it for processing. The selected task is locked (i.e. cannot be opened by other users).

warning Important! A task must be opened before any actions on the task can be performed.

Definition

int GetTaskByStageId( int sessionId, int projectId, int[] stageIds, bool onlyPreprocessedTasks, bool onlyPrivateBatches );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
projectId | int | Project ID
stageIds | int[] | The IDs of the stages to get task from
onlyPreprocessedTask | bool | The flag which determines from which tasks to select. Possible values: ·True - select only pre-processed tasks; ·False - select from all tasks.
onlyPrivateBatches | bool | The flag which determines the set of available batches. Possible values: ·True - only batches that belong the current user or user group are available; ·False - all batches are available.

Returned value

Type | Description
int | Task ID


GetTaskDocuments

What it does

Gets information about all the documents in a task.

Definition

Document [] GetTaskDocuments( int taskId );

Parameters

Name | Type | Description
taskId | int | The ID of the task about which information is to be retrieved

Returned value

Type | Description
Document[] | The list of documents in a task


GetTaskInfo

What it does

Gets information about a task.

Definition

Task GetTaskInfo ( int taskId );

Parameters

Name | Type | Description
taskId | int | The ID of the task about which information is to be retrieved

Returned value

Type | Description
Task | Information about the task


OpenTask

What it does

Opens a task for further operations on it. All tasks which are not opened by another user at the moment are available. The task gets locked (i.e. other users cannot open it).

warning Important! You must open a task before performing any operations on it.

Definition

bool OpenTask( int sessionId, int taskId );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
taskId | int | The ID of the task to be opened

Returned value

Type | Description
bool | A flag that shows whether the operation was successful or not


PostponeTask

What it does

Postpones a task to be processed at a later time.

Definition

void PostponeTask( int sessionId, int taskId, string comment );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
taskId | int | The ID of the task to be postponed
comment | string | A comment to the postponed task.

Returned value

None.


SendTask

What it does

Sends the entire task to the specified processing stage.

Definition

void SendTask( int sessionId, int taskId, int stageId, string comment );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
taskId | int | The ID of the task to be sent to the Exceptions stage
stageId | int | The ID of the stage to which the task must be sent
comment | string | The text of the comment to the task.

Returned value

None.


SendTaskToException

What it does

Sends a task to the Exceptions stage.

Definition

void SendTaskToException( int sessionId, int taskId, string comment, bool needPostprocessing );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
taskId | int | The ID of the task to be sent to the Exceptions stage
comment | string | A comment to the task
needPostprocessing | bool | The flag which shows if post-processing is required. Possible values

Returned value

None.


SetTaskPriority

What it does

Allows you to change the task priority.

Definition

void SetTaskPriority( int sessionId, int taskId, int priority );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
taskID | int | The ID of the task whose priority must be changed
priority | int | Task priority. See Priority for possible values

Returned value

None.


Documents

The API methods allow you to perform the following operations on documents:

AddNewDocument | Add a new document and specify additional information
AddNewImage | Add an image into a batch
DeleteDocument | Delete a document
GetDocument | Get information about a document
GetDocumentResultsList | Get the list of files into which the document processing results were exported
GetDocuments | Get the list of documents in a batch
LoadDocumentResult | Get the file into which the document processing results were exported
SetDocumentProperties | Specify registration parameters for a document
SetDocumentPriority | Change document priority


AddNewDocument

What it does

Adds a new document from an image file into a batch.

To create a document without an image, leave the file parameter empty (file.Name = "", file.Bytes = new bytes [0]).

A new document is created with the excludeFromAutomaticAssembling flag set to true. This flag indicates that the document has already been assembled, and the assembly settings specified for the batch type will not be applied to this document.

warning Important! Newly added documents become accessible only after their images are pre-processed. Use the ProcessBatch method to initiate batch processing after adding new documents.

note Note: When a new document is added into the batch, the Id field of the corresponding object must not be empty.

If you are adding PDF documents and want the program to use the text stored in their text layer, make sure that the Use PDF text layer instead of OCR option is selected for the project in which the documents will be processed (you can find this option on the Processing tab of the Page Properties dialog box).

Definition

int AddNewDocument( int sessionId, Document document, File file, bool excludeFromAutomaticAssembling, int previousItemId );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
document | Document | A description of the document that is being created
file | File | The file that contains the document image
excludeFromAutomaticAssembling | bool | A flag that shows whether the document is excluded from document assembly or not: ·True - the document has already been assembled and is not included in document assembly; ·False - the document will be assembled according to the settings specified for the batch type.
previousItemId | int | The ID explicitly specifying the position of the new document in the set: ·-1 - the new document will be added at the end of the set ·0 - the new document will be added at the start of the set ·Document ID - the new document will be added after the document with this ID note Note: A document with this ID must exist.

note Note: You can also use a POST request to add document image. For this, create a document with an empty file by this method (file.Name = "FileName", file.Bytes = new bytes [0]). Then execute a POST request with the following parameters:

·Action = Save

·objectType = 0

·objectId = documentId, where documentId document ID returned by the AddNewDocument method

·version = 0

·streamName = "C:\Temp\image.pdf", where image.pdf is a name of the file specified when calling the AddNewDocument method

Returned value

Type | Description
int | The ID of the created document


DeleteDocument

What it does

Deletes a document.

warning Important! The document export results will be deleted together with the document.

Definition

bool DeleteDocument( int sessionId, int batchId, int documentId );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
batchId | int | The ID of the batch that contains the document to be deleted
documentId | int | The ID of the document to be deleted

Returned value

Type | Description
bool | A flag which show whether the operation was successful or not


GetDocument

What it does

Gets extended information about a document.

Definition

Document GetDocument( int sessionId, int batchId, int documentId );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
batchId | int | The ID of the batch that contains the document about which information is to be retrieved
documentId | int | The ID of the document about which information is to be retrieved

Returned value

Type | Description
Document | Information about the document


GetDocumentResultsList

What it does

Gets a list of files into which the document processing results were exported. Makes sense only if export results are saved on the Application Server.

The method can be used when exporting results to FlexiCapture database. When exporting to a file storage, null is returned.

Definition

string[] GetDocumentResultsList( int sessionId, int batchId, int documentId );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
batchId | int | The ID of the batch that contains the document
documentId | int | The ID of the document about which information is to be retrieved

Returned value

Type | Description
string[] | The list of files into which the document processing results were exported


GetDocuments

What it does

Gets information about all the documents of a batch.

Definition

Document [] GetDocuments ( int sessionId, int batchId );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
batchId | int | The ID of the batch that contains the documents about which information is to be retrieved

Returned value

Type | Description
Document[] | The list of all documents in the batch, including the empty document that is the parent document of all the top-level documents in the batch. The collection of top-level documents can be accessed using the ChildrenOrder field of the empty parent document. The ParentId of the empty parent document is set to -1.


LoadDocumentResult

What it does

Gets files into which document processing results were exported.

This method can be used when exporting results to the ABBYY FlexiCapture database. When exporting to a file storage, null is returned.

By default, this method can download files of up to 100 MB. This file size restriction can be disabled or modified using Internet Information Services (IIS) Manager.

To set the maximum size of downloaded files:

·Navigate to \Sites\Default Web Site\FlexiCapture12\Server > Application Settings.

·Locate the MaxAttachmentSizeForSoap key and specify the desired file size in bytes. (Setting this key to 0 will disable the file size restriction.)

note Note: To download large files, we recommend using a file storage.

Definition

File LoadDocumentResult( int sessionId, int batchId, int documentId, string fileName );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
batchId | int | The ID of the batch that contains the documents about which information is to be retrieved
documentId | int | The ID of the exported document
fileName | string | The name of the file to be retrieved from the server

Returned value

Type | Description
File | The file into which the document processing results were exported


SetDocumentProperties

What it does

Specifies the registration parameters of a document.

Definition

void SetDocumentProperties( int sessionId, int batchId, int documentId, RegistrationProperty [] properties );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
batchId | int | The ID of the batch that contains the document
documentId | int | The ID of the document for which registration parameters are to be specified
properties | RegistrationProperty[] | A set of records, each describing one of the registration parameters of the document

Returned value

None.


SetDocumentPriority

What it does

Allows you to change the document priority.

Definition

void SetDocumentPriority( int sessionId, int batchId, int documentId, int priority );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
batchId | int | The ID of the batch that contains the document
documentId | int | The ID of the document whose priority must be changed
priority | int | Document priority. See Priority for possible values

Returned value

None.


Pages

The API methods allow you to perform the following operations on pages:

AddNewPage | Add a page image and its description into a document
DeletePage | Delete a page from a document
ReplacePageImage | Replace a page image


AddNewPage

What it does

Adds a page image to a document.

warning Important! The added images will become accessible only after they are pre-processed. Use the ProcessBatch method to initiate batch processing after you have added the images. Another option is to use the CloseTask method to close the task and to send it at the Import stage if the images were added into the documents of a task that was opened with the OpenTask method.

Definition

int AddNewPage( int sessionId, int batchId, int documentId, int previousItemId, Page page, File file );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
batchId | int | The ID of the batch that contains the document
documentId | int | The ID of the document into which a page is to be added
previousItemId | int | The ID allowing explicit specification of the position of the new page in the set: ·-1 - the new page will be added at the end of the set ·0 - the new page will be added at the start of the set ·Page ID - the new page will be added after the page with this ID note Note: A page with this ID must exist.
page | Page | A description of the page. It is recommended to add pages with a predefined ID field
file | File | The file that contains the page image

note Note: You can also use a POST request to add a new page from the file containing an image. To do this, create a page with an empty file using this method: (file.Name = "FileName", file.Bytes = new bytes [0]). Next, execute a POST request with the following parameters:

·Action = Save

·objectType = 1

·objectId = documentId, where documentId represents the ID of the document, to which a page should be added

·version = 0

·streamName = "Page 1", where 1 represents the page ID returned by the AddNewPage method

Returned value

Type | Description
int | The ID of the added page


DeletePage

What it does

Deletes a page from a document.

Definition

bool DeletePage( int sessionId, int batchId, int documentId, int pageId );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
batchId | int | The ID of the batch that contains the document
documentId | int | The ID of the document from which a page is to be deleted
pageId | int | The ID of the page to be deleted

Returned value

Type | Description
bool | A flag which shows whether the operation was successful or not


ReplacePageImage

What it does

Replaces a page image.

warning Important! The added images will become accessible only after they are pre-processed. Use the ProcessBatch method to initiate batch processing after you have added the images or use the CloseTask method to close the task and to send it in the Import stage if the images were added into the documents of a task that was opened with the OpenTask method.

Definition

void ReplacePageImage( int sessionId, int batchId, int documentId, int pageId, File file );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
batchId | int | The ID of the batch that contains the document
documentId | int | The ID of the document in which to replace a page image
pageId | int | The ID of the page whose image is to be replaced
file | File | The file of the image

note Note: You can also use a POST request to add page image. Call this method and then execute a POST request with the following parameters:

·Action = Save

·objectType = 0

·objectId = documentId

·version = 0

·streamName = "Page pageId", where pageId the ID of the page whose image is to be replaced

Returned value

None.


Users

The API methods allow you to perform the following operations on user accounts:

AddUserIfNotExist | Get the ID of the current user and create a database record if required
FindUser | Get the ID of the user with the specified name
GetAvailableQueues | Get the set of records listing the processing stages available to the user
GetAvailableUsers | Gets a list of users or groups allowed to process a specified stage
GetProjectsForStationType | Finds projects where a user has at least one role associated with a particular type of station
GetProjectsForUser | Get the set of records listing the stages available to the user
GetRoles | Gets list of all roles in the project
GetUser | Get information about the user based on the user ID
GetUserRoles | Gets list of IDs of the user roles available to the current user in the given project
GetUsers | Get the list of users
GetUserStatistics | Gets a set of records listing the number of batches, documents and pages whose state changed to "processed" for a given period of time
HasRightsForBatchType | Check if the specified user role has access permissions to a certain batch type


AddUserIfNotExist

What it does

Returns the ID of the current user. If there is no database record for the user, a record is created.

Definition

int AddUserIfNotExist();

Parameters

None.

Returned value

Type | Description
int | User ID


FindUser

What it does

Returns the identifier of a user by his/her user name.

Definition

int FindUser( string userLogin );

Parameters

Name | Type | Description
userLogin | string | User name

Returned value

Type | Description
int | User ID


GetAvailableUsers

What it does

Gets a list of users or groups allowed to process a specified stage. Allows you to get a list of available variants when sending a task to a particular user.

Definition

User [] GetAvailableUsers( int projectId, int batchTypeId, int stageExternalId );

Parameters

Name | Type | Description
projectId | int | The ID of the project for which to get the list of users/groups
batchTypeId | int | The ID of the batch type. 0 corresponds to the "Default" batch type
stageExternalId | int | The ID of the processing stage

Returned value

Type | Description
User[] | The set of records listing the users


GetProjectsForStationType

What it does

Finds projects where a user has at least one role associated with a particular type of station. For example, if you pass "WT_Validation" as the station type, you will get a list of projects where the user has Verification Operator, Senior Verification Operator, Data Verification Operator or custom role rights.

Definition

Project[] GetProjectsForStationType(int userId, int workstationType)

Parameters

Name | Type | Description
userId | int | User identifier
workstationType | int | Station type. See WorkstationType for possible values.

Returned value

Type | Description
Project [] | Project list

note Note: "Role—station" associations are currently recorded only for desktop stations and are not available for web stations. If you need to find projects that can be opened, for example, on the Web Verification Station, you must pass "WT_Validation" as the station type, not "WT_WebValidation."


GetProjectsForUser

What it does

Gets information about the projects on the Application Server, taking into account a user's access permissions.

Definition

Project [] GetProjectsForUser( int userId, int roleType );

Parameters

Name | Type | Description
userId | int | User ID
roleType | int | The ID of the user's role type. See RoleType for possible values.

Returned value

Type

Description

Project[]

A set of records, each of which contains information about one of the projects. The set is created based on the values of the input parameters as follows:

·userId<>0, roleType<>0 the projects where this user has access permissions to at least one of the batch types for the specified role

·userId<>0, roleType=0 the projects where this user has some access permissions to at least one of the batch types

·userId=0, roleType=0 the list of all projects

·userId=0, roleType<>0 empty list


GetRoles

What it does

Returns the list of all roles in a project.

Definition

Role [] GetRoles( int projectId );

Parameters

Name | Type | Description
projectId | int | The ID of the project for which to get the list of roles

Returned value

Type | Description
Role[] | The set of records, each containing information about a role


GetUser

What it does

Returns information about a user.

Definition

bool GetUser( int userId, out User user );

Parameters

Name | Type | Description
userId | int | User ID

Returned value

Type | Description
bool | The flag which shows if the user has been found or not. Possible values: ·True - user found ·False - user not found
User | Information about the user


GetUserRoles

What it does

Gets a list of the IDs of the user roles available to the current user in a project.

Definition

int [] GetUserRoles( int projectId );

Parameters

Name | Type | Description
projectId | int | The ID of the project for which to get the list of IDs

Returned value

Type | Description
int [] | A set of role IDs


GetUsers

What it does

Returns a list of users.

Definition

User [] GetUsers();

Parameters

None.

Returned value

Type | Description
User[] | List of users


GetUserStatistics

What it does

Gets the number of batches, documents, and pages whose state changed to "Processed" within a certain time period.

Definition

UserStatistics [] GetUserStatistics( int userId, long fromDate, long toDate );

Parameters

Name

Type

Description

userId

int

User ID

fromDate

long

The period start date. To convert values, use the following methods (C#):

DateTime dtTime;
long lTime;
...
// conversion from DateTime to long
dTime = DateTime.FromFileTime(lTime);
...
// conversion from long to DateTime
lTime = dTime.ToFileTime();

toDate

long

The period end date. To convert values, use the following methods (C#):

DateTime dtTime;
long lTime;
...
// conversion from DateTime to long
dTime = DateTime.FromFileTime(lTime);
...
// conversion from long to DateTime
lTime = dTime.ToFileTime();

Returned value

Type | Description
UserStatistics[] | A set of records, each containing information about the number of batches, documents or pages whose state changed to "Processed" within the specified time period.


Licensing tickets

The API methods allow you to perform the following operations on licensing tickets:

GetNewTicket | Get a new licensing ticket
ReleaseTicket | Release the ticket
UpdateTicket | Update the status of the ticket


GetNewTicket

What it does

Returns a licensing ticket.

Definition

bool GetNewTicket( int sessionId, int stationType, out TicketInfo ticketInfo );

Parameters

Name

Type

Description

sessionId

int

The ID of the connection to the Application Server

stationType

int

The type of the station for which the ticket must be obtained. See WorkstationType for possible values.

note Note: Use the WT_Verification and the WT_Validation values instead of WT_RemoteDataVerification and WT_RemoteVerification ones respectively.

Returned value

Type | Description
bool | The flag that shows if the ticket has been obtained
TicketInfo | Licensing ticket


ReleaseTicket

What it does

Releases a licensing ticket.

Definition

void ReleaseTicket( int sessionId, int ticketId );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
ticketId | int | The ID of the licensing ticket

Returned value

None.


UpdateTicket

What it does

Updates a licensing ticket.

Definition

bool UpdateTicket( int sessionId, int ticketId, out TicketInfo ticketInfo );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
ticketId | int | The ID of the licensing ticket

Returned value

Type | Description
bool | The flag which shows if the ticket has been updated or not
TicketInfo | Licensing ticket


Files

The API methods allow you to perform the following operations on files:

GetCustomFileNames | Get the list of user files stored on the Application Server
LoadCustomFile | Load a user file from the Application Server
RemoveCustomFile | Delete a user file from the Application Server
SaveCustomFile | Save a user file on the Application Server


GetCustomFileNames

What it does

Gets a list of user files saved on the Application Server.

Definition

string[] GetCustomFileNames();

Parameters

None.

Returned value

Type | Description
string[] | The list of saved files


LoadCustomFile

What it does

Gets a user file saved on the Application Server.

Definition

File LoadCustomFile( string fileName );

Parameters

Name | Type | Description
fileName | string | The name of the file to be retrieved from the Application Server

Returned value

Type | Description
File | The user file


RemoveCustomFile

What it does

Removes a user file from the Application Server.

Definition

void RemoveCustomFile( int sessionId, string fileName );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
fileName | string | The name of the file to be removed from the Application Server

Returned value

None.


SaveCustomFile

What it does

Saves a user file on the Application Server.

Definition

void SaveCustomFile( int sessionId, File file );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
file | File | A user file

Returned value

None.


Attachments

The API methods allow you to perform the following operations on attachments:

GetAttachmentNames | Gets a list of attachments on the Application Server
LoadAttachment | Loads an attachment from the Application Server
RemoveAttachment | Deletes an attachment from the Application Server
SaveAttachment | Saves an attachment on the Application Server


GetAttachmentNames

What it does

Gets a list of attachments of the specified type to the selected object.

Definition

string[] GetAttachmentNames( int type, int objectId, int batchId, int projectId );

Parameters

Name | Type | Description
type | int | Type of attachment. Possible values: ·9 - attachment to a document; ·10 - attachment to a page; ·11 - attachment to a batch.
objectId | int | The ID of the object
batchId | int | The ID of the batch
projectId | int | The ID of the project

Returned value

Type | Description
string[] | The list of attachments to the selected object


LoadAttachment

What it does

Gets attachment as a file.

By default, this method can download files of up to 100 MB. This file size restriction can be disabled or modified using Internet Information Services (IIS) Manager.

To set the maximum size of downloaded files:

·Navigate to \Sites\Default Web Site\FlexiCapture12\Server > Application Settings.

·Locate the MaxAttachmentSizeForSoap key and specify the desired file size in bytes. (Setting this key to 0 will disable the file size restriction.)

note Note: To download large files, we recommend using a file storage.

Definition

File LoadAttachment( int sessionId, int type, int objectId, int batchId, int projectId, string fileName );

Parameters

Name | Type | Description
session | int | The ID of the connection to the Application Server
type | int | Type of attachment. Possible values ·9 - attachment to a document; ·10 - attachment to a page; ·11 - attachment to a batch.
objectId | int | The ID of the object
batchId | int | The ID of the batch
projectId | int | The ID of the project
fileName | string | The name of the attachment file to be retrieved from the Application Server

Returned value

Type | Value
File | Attachment file


RemoveAttachment

What it does

Removes attachment

Definition

void RemoveAttachment( int sessionId, int type, int objectId, int batchId, int projectId, string fileName );Vf

Parameters

Name | Type | Description
session | int | The ID of the connection to the Application Server
type | int | Type of attachment. Possible values ·9 - attachment to a document; ·10 - attachment to a page; ·11 - attachment to a batch.
objectId | int | The ID of the object
batchId | int | The ID of the batch
projectId | int | The ID of the project
fileName | string | Name of attachment to be deleted

Returned value

None.


SaveAttachment

What it does

Adds attachment to the specified object.

Definition

void SaveAttachment( int sessionId, int type, int objectId, int batchId, int projectId, File file );

Parameters

Name | Type | Description
sessionId | int | The ID of the connection to the Application Server
type | int | Type of attachment. Possible values ·9 - attachment to a document; ·10 - attachment to a page; ·11 - attachment to a batch.
objectId | int | The ID of the object
batchId | int | The ID of the batch
projectId | int | The ID of the project
file | File | Attachment file

Returned value

None.


Templates

Navigation: Application Programming Interface (API) > References > API Methods >

Return to chapter overview

Document Definitions

The API methods allow you to perform the following operations on Document Definitions:

GetTemplates | Get the set of Document Definitions of the project
GetBatchTypeTemplates | Returns the set of identifiers for Document Definitions attached to the batch type


GetTemplates

What it does

Gets information about all the Document Definitions of a project.

Definition

Template [] GetTemplates( int projectId );

Parameters

Name | Type | Description
projectId | int | The ID of the project

Returned value

Type | Description
Template[] | A set of records, each containing information about a Document Definition


GetBatchTypeTemplates

What it does

Returns the set of identifiers for Document Definitions attached to the batch type. If NULL is returned, it means either that the Use all Document Definitions option is enabled in batch type properties or that no Document Definition is selected.

Definition

int[] GetBatchTypeTemplates( int projectId, int batchTypeId );

Parameters

Name | Type | Description
projectId | int | The ID of the project
batchTypeId | int | The ID of the batch type

Returned value

Type | Description
int[] | Document Definitions attached to the batch type


Log

The API methods allow you to perform the following operations on the log:

WriteToLog

Writes event data into the log on the Application Server


WriteToLog

What it does

Writes event data in to the log on the Application Server.

Definition

void WriteToLog( long clientTime, LogRecord [] records );

Parameters

Name

Type

Description

clientTime

long

The data and time when the event occurred on the workstation. Use the following methods to convert the data (C#):

DateTime dtTime;
long lTime;
…
// conversion from DateTime to long
dTime = DateTime.FromFileTime(lTime);
…
// conversion from long to DateTime
lTime = dTime.ToFileTime();

records

LogRecord[]

A set of records, each describing one of the events to be written in the log on the Application Server

note Note: Using both the clientTime and LogRecord.time parameters is needed for the following reasons:

·Call of the LogRecord[] method can be deferred.

·Local time on the client computer and the time on the server may differ. This error can be corrected if you know the local time on the client computer at the moment when the LogRecord[] method was called.

Returned value

None.


Server Requests

Navigation: Application Programming Interface (API) > References > API Methods >

Return to chapter overview

Processing requests to the Application Server

The API methods allow you to perform the following operations on Application Server requests:

CreateRequest | Creates a request to the Application Server
DeleteRequest | Deletes a request to the Application Server
GetRequests | Gets a list of requests to the Application Server in the current session
GetRequestStatus | Gets the status of a request to the Application Server
SetRequestStatus | Changes the status of a request to the Application Server


CreateRequest

What it does

Creates a request to the Application Server.

Definition

int CreateRequest( ServerRequest request );

Parameters

Name | Type | Description
request | ServerRequest | A completed structure with request parameters

Returned value

Type | Description
int | The ID of the request to the Application Server


DeleteRequest

What it does

Deletes a request to the Application Server.

Definition

void DeleteRequest( int requestId, int sessionId );

Parameters

Name | Type | Description
requestId | int | The ID of the request to the Application Server
sessionId | int | The ID of the connection to the Application Server

Returned value

None.


GetRequests

What it does

Gets a list of Application Server requests in the current session.

Definition

ServerRequest [] GetRequests( int batchId, int taskId, int sessionId );

Parameters

Name | Type | Description
batchId | int | The ID of the batch
taskId | int | The ID of the task
sessionId | int | The ID of the connection to the Application Server

Returned value

Type | Description
ServerRequest[] | The list of Application Server requests in the current session


GetRequestStatus

What it does

Gets the status of a request to the Application Server.

Definition

int GetRequestStatus( int requestId );

Parameters

Name | Type | Description
requestId | int | The ID of the request to the Application Server

Returned value

Type | Description
int | Information about the status of the request to the Application Server. See ServerRequestStatus for possible values


SetRequestStatus

What it does

Changes the status of a request to the Application Server.

Definition

void SetRequestStatus( int requestId, int status );

Parameters

Name | Type | Description
requestId | int | The ID of the request to the Application Server
status | int | The current status of the request to the Application Server. See ServerRequestStatus for possible values

Returned value

None.


Other

The API methods also allow you to perform the following:

GetSettingValue | Get the named parameter from the database
SetSettingValue | Save the named parameter to the database


GetSettingValue

What it does

Returns the value of the named parameter which was saved to the database by the SetSettingValue method.

note Note: Identically named parameters with different values can be saved for different users/batch types/projects.

Definition

string GetSettingValue( int userId, int projectId, int batchTypeId, string settingName );

Parameters

Name | Type | Description
userId | int | The ID of the user's account
projectId | int | Project ID
batchTypeId | int | Batch type ID
settingName | string | Parameter name

Returned value

Type | Description
string | The value of the named parameter


SetSettingValue

What it does

Saves the named parameter to the database.

note Note: Identically named parameters with different values can be saved separately for different users/batch types/projects. If a parameter with the specified name and set of user IDs, batch types, and project type already exists, the method will change its value.

Definition

void SetSettingValue( int userId, int projectId, int batchTypeId, string settingName, string settingValue );

Parameters

Name | Type | Description
userId | int | The ID of the user's account
projectId | int | Project ID
batchTypeId | int | Batch type ID
settingName | string | Parameter name
settingValue | string | Parameter value

Returned value

None.


Data Types

This section describes the data types used by the methods of the API.

Enumerators | Information about used enumerators
Batch | Information about the batch
BatchType | The type of the batch
BatchTypeIdentity | Information about an available batch type
Document | Information about the document
ChildrenOrder | Information about a child document in the set
File | File
LicenseCustomFeature | Information about a custom parameter that is specified in the license
LogRecord | Record in the log
Page | Information about the page
ProcessingStage | Information about the processing stage
Project | Information about the project on the Application Server
Queue | Information about the document queue at the processing stage
RegistrationProperty | Registration parameter
RegistrationPropertyDef | Description of the registration parameter
Role | Information about the user role
ServerRequest | Information about requests to the Application Server to run the validation rules in the current session
Task | Information about the task
Template | Information about the Document Definition
TicketInfo | Licensing ticket
User | Information about the user
UserStatistics | Information about the number of batches, documents and pages processed by the user


Enumerators

This section describes the enumerators used in the Web Services API of the ABBYY FlexiCapture Application Server.

LogRecordType | The types of events to log
Priority | Batch, document or task processing priority
ProcessingStage | Processing stage
RoleType | User's role
WorkstationType | The type of the station
ServerRequestStatus | The status of the request to run the validation rules on the Processing Server


LogRecordType

What it does

Contains the types of events to log.

Fields

Name | Comment | Description
1 | Error | Error message
2 | Warning | Warning message
3 | Information | Information message


ProcessingPriority

Navigation: Application Programming Interface (API) > References > Data types > Enumerators >

Return to chapter overview

Priority

What it does

Contains the list of object priorities.

Fields

Value | Description
-2 | Lowest
-1 | Low
0 | Normal
1 | High
2 | Highest
3 | Extra-High


ProcessingStage

What it does

Contains the list of predefined types of processing stages.

Fields

Value | Description
100 | Scanning
150 | Rescanning
200 | Recognition
250 | Unattended Processing
300 | Document Assembly Check
390 | Data Verification Preprocessing
400 | Data Verification
410 | Data Verification Postprocessing
490 | Verification Preprocessing
500 | Verification
510 | Verification Postprocessing
600 | Batch Integrity Check
700 | Export Confirmation
800 | Export
900 | Processed
950 | User Request Processing
1000 | Exceptions
-1 | Unknown Stage
-2 | Failed
-3 | Next Stage
2000 | User Type


RoleType

What it does

Contains the list of predefined user roles.

Fields

Name | Description
1 | Scanning Operator
2 | Data Verification Operator
3 | Verification Operator
6 | Senior Verification Operator
7 | Processing Server
8 | Project Settings Editor. Can change project settings, but can't grant access permissions
9 | Monitoring Operator
10 | Administrator. Can change project settings and grant access permissions
11 | Processing Station
12 | External User
13 | Web Capture Operator
1000 | User Defined


ServerRequestStatus

What it does

Gets information about the status of a request to run the validation rules on the Processing Server.

Fields

Name | Type | Description
-1 | Unknown | The status is unknown
0 | Pending | The request awaits processing
1 | InProcess | The request is being processed
2 | Completed | The request has been successfully processed
3 | Failed | An error occurred when processing the request


WorkstationType

What it does

Contains the list of predefined types of workstation.

Fields

Name | Value | Description
1 | WT_Scanning | Scanning station
2 | WT_Verification | Data Verification station
3 | WT_Validation | Verification station
4 | WT_ProcessingServer | Processing Server
5 | WT_Setup | Project Setup station
6 | WT_ProcessingStation | Processing station
7 | WT_RemoteDataVerification | Remote Data Verification Station
8 | WT_RemoteVerification | Remote Verification Station
9 | WT_Monitoring | Monitoring console
10 | WT_ExternalStation | User station
11 | WT_FrontOffice | Web Capture Station
12 | WT_WebValidation | Web Verification Station
13 | WT_WebScanning | Web Scanning Station


Batch

What it does

The Batch data type stores information about a batch.

Fields

Name

Type

Description

Id

int

The ID of the batch

Name

string

The name of the batch

BatchTypeId

int

The ID of the batch type. 0 corresponds to the "Default" batch type

Priority

int

Batch priority. Possible values: see Priority.

Description

string

A description of the batch

ElapsedProcessingSeconds

int

The time remaining until until the deadline for processing the batch, in seconds

HasAttachments

bool

A flag that shows whether the batch has attachments

Properties

RegistrationProperty[]

The set of registration parameters for the batch

StageExternalId

int

The ID of the processing stage in which the task is created

CreationDate

long

The date and time when the batch was created. Completed when the batch is being created. Cannot be modified later. To convert values, use the following methods (C#):

DateTime dtTime;
long lTime;
...
// conversion from DateTime to long
dTime = DateTime.FromFileTime(lTime);
...
// conversionfrom long to DateTime
lTime = dTime.ToFileTime();

SLAExpirationDate

datetime

Processing deadline of the batch

SLAStartDate

long

Batch processing start time and date. Completed when the batch is being created. Cannot be modified later. To convert values, use the following methods (C#):

DateTime dtTime;
long lTime;
...
// conversion from DateTime to long
dTime = DateTime.FromFileTime(lTime);
...
// conversionfrom long to DateTime
lTime = dTime.ToFileTime();

DocumentsCount

int

The number of documents in the batch

RecognizedDocumentsCount

int

The number of recognized documents

AssembledDocumentsCount

int

The number of assembled documents

VerifiedDocumentsCount

int

The number of verified documents

ExportedDocumentsCount

int

The number of exported documents

PagesCount

int

The number of pages in the batch

ProjectId

int

Identifier of the project the batch belongs to. Corresponds to the entry identifier in the Project table

RecognizedSymbolsCount

int

The number of recognized characters

UncertainSymbolsCount

int

The number of uncertain characters

VerificationSymbolsCount

int

The number of verified characters

ErrorText

string

A description of the batch processing errors. Completed automatically by the Application Server.

OwnerId

int

The ID of the user or group who owns the project

CreatorId

int

The ID of the user who created the batch (completed when the batch is being created; cannot be modified later)


BatchType

What it does

The BatchType data type stores information about the type of a batch.

Fields

Name | Type | Description
Id | int | The ID of the batch type
Name | string | The name of the batch type
Description | string | A description of the batch type
PropertyDefs | RegistrationPropertyDef[] | The set of registration parameters for the batch type


BatchTypeIdentity

What it does

The BatchTypeIdentity data type stores information about the batch type. Allows you to get the list of batch types for a few projects.

Fields

Name | Type | Description
Id | int | The ID of the batch type. 0 default batch type
projectId | int | The ID of the project


ChildrenOrder

What it does

Information about a child document of a set.

Fields

Name | Type | Description
Id | int | The ID of the child document
sortIndex | int | The document's place in the set


Document

What it does

The Document data type stores information about a document.

Fields

Name

Type

Description

Id

int

The ID of a document.

The only way to set an ID for a document is to use the GetBatchIdsRange method, which allows reserving IDs for new documents. We recommend that you set an ID for a document before you add the document to a batch.

A document ID will be generated automatically if you set its value to -1.

BatchId

int

The ID of the batch

ParentId

int

The ID of the parent document of the set.

If a new document should be part of a set, this field should be assigned the value of the parent document of the set.

If a new document should not be part of any set, set the value of the field to 0.

warning Important! The parent document must be created before child documents are created.

ChildrenOrder

ChildrenOrder []

A set of child documents enabling the sorting of documents in the set.

When data are read from the server, the field is filled out automatically.

If this field is empty, the documents in the set will be arranged in the order in which they were added.

DocIndex

int

Document index

TemplateName

string

The name of the Document Definition

ProcessingStageType

int

The type of the processing stage; values come from ProcessingStageType

Comment

string

Comment

Pages

Page[]

The set of pages in the document

IsProcessed

bool

A flag that shows whether the document has been processed or not

HasProcessingErrors

bool

A flag that shows whether there were processing errors

HasDocumentErrors

bool

A flag that shows whether there are errors in the document (e.g. format errors, rules errors, assembly errors)

ErrorText

string

A description of the document processing errors

ExternalId

string

The external ID of the document

Properties

RegistrationProperty[]

The set of registration parameters for the document

Priority

Priority[]

Document priority

FileVersion

int

The version of the document file on the server

OwnerId

int

The ID of the user or group who owns the project

StageExternalId

int

The ID of the processing stage in which the task was created (unique within the batch type)

TaskId

int

The ID of the task the document belongs to

UncertainSymbols

int

The number of uncertain characters

VerificationSymbols

int

The number of verified characters

TotalSymbols

int

The total number of characters in the document

HasErrors

bool

A flag that shows whether there are any validation rule errors

HasWarnings

bool

A flag that shows whether there are any validation rule warnings

HasAssemblingErrors

bool

A flag that shows whether there were assembling errors

HasAttachments

bool

A flag that shows whether the document has attachments

Flags

int

A set of flags that describe the status of the document. The value of a field is a combination of the values of the flags, which include:

·BIF_IsAnalyzed = 0x100 shows that the document is analysed;

·BIF_IsRecognized = 0x200 shows that the document is recognized;

·BIF_IsVerified = 0x400 shows that the document is verified;

·BIF_IsExported = 0x800 shows that the document is exported;

·BIF_HasRuleErrors = 0x10000 shows that the document contains rule execution errors;

·BIF_HasRuleWarnings = 0x20000 - shows that the document contains rule execution warnings;

·BIF_HasMergeVersionErrors = 0x80000 - shows that the document contains errors of merging double verification results (verification results do not match);;

·BIF_HasUserAttachments = 0x100000 - shows that the document has attachments;

·BIF_HasUnmatchedFieldErrors = 0x200000 - shows that the document contains unmatched fields;

·BIF_NeedsPreprocessing = 0x800000 - shows that the document needs preprocessing;

·BIF_IsManuallyCreated = 0x1000000 - shows that the document was created manually;

·BIF_IsExcludedFromAutomaticAssembling = 0x2000000 - shows that the document is excluded from automatic assembly;

·BIF_IsSourceImageAttached = 0x4000000 - shows that a source image file is attached to the document.

note Note: Only those flags are listed which are useful when working with the tasks and methods of the Web Services API.


File

What it does

The File data type stores files.

Fields

Name | Type | Description
Name | string | The name of the file
Bytes | System.byte[] | The binary data of the file


LicenseCustomFeature

What it does

Information about a custom parameter that is specified in the license.

Fields

Name | Type | Description
Name | string | The name of the parameter
Value | string | The value of the parameter


LogRecord

What it does

The LogRecord data type stores error records.

Fields

Name

Type

Description

Type

int

The type of the error record. Possible values: see LogRecordType.

SessionId

int

The ID of the connection to the Application Server

MachineId

string

The ID of the workstation

RoleId

RoleType[]

The ID of the user's role

TaskId

int

The ID of the task

ProjectId

int

The ID of the project

BatchId

int

The ID of batch

DocumentId

int

The ID of the document

PageId

int

The ID of the page

Comment

string

A brief description of the event

Details

string

A full description of the event

Time

long

The date and time the method was called on the workstation.

To convert values, use the following methods (C#):

DateTime dtTime;
long lTime;
...
// conversion from DateTime to long
dTime = DateTime.FromFileTime(lTime);
...
// conversion from long to DateTime
lTime = dTime.ToFileTime();


Page

What it does

The Page data type stores information about a document page.

Fields

Name | Type | Description
Id | int | The ID of the page. It is recommended to specify the ID before the document is added into the batch. use the GetBatchIdsRange method to reserve IDs for new documents.
PageIndex | int | Page index
SourceFileName | string | The ID of the source image file
SourcePageNumber | string | The number of the image in the source file
SourceType | int | The type of the image source. Possible values: ·0 - image is loaded from file (from folder, from FTP folder, from Hot Folder, or added by using drag-and-drop); ·1 - image is received from scanner; ·2 - image is received from the Scanning Station, from MAPI, IMAP server or from POP3 server.
SourceDetails | string | Information about the path to the folder or the scanning driver; may contain the name of the file or the name of the originating device (i.e. scanner name or model)
Comment | string | Comment to the page
ErrorText | string | A description of the page processing errors
ExternalId | string | The external ID of the page. If left empty, the parameter is completed automatically by the Application Server and is the same as Id.
HasAttachments | bool | A flag that shows whether the page has attachments
UncertainSymbols | int | The number of uncertain characters
VerificationSymbols | int | The number of verified characters
TotalSymbols | int | The total number of characters
FileVersion | int | The version of the page file on the server
Flags | int | A set of flags that describe the status of the page


ProcessingStage

What it does

The ProcessingStage data type stores information about the processing stage.

Fields

Name | Type | Description
Id | int | The ID of the processing stage
ExternalId | int | The external ID of the processing stage; unique within its batch type
ProjectId | int | The ID of the project
BatchTypeId | int | The ID of the batch type. 0 default batch type
Type | int | The type of the processing stage; see ProcessingStageType for possible values.
Name | string | The name of the processing stage


Project

What it does

The Project data type stores information about a project on the Application Server.

Fields

Name | Type | Description
Id | int | The ID of the project on the Application Server.
Name | string | The name of the project on the Application Server
Guid | string | The unique ID (GUID) of the project
IsTestProject | bool | A flag which identifies a test project. Possible values: ·True - this is a test project; ·False - this is a working project.


Queue

What it does

The Queue data type stores information about the document queue at the processing stage.

Fields

Name | Type | Description
Id | int | The queue ID
Name | string | The name of the queue
StageType | int | The type of the processing stage. See ProcessingStageType for possible values
TaskCount | int | The number of tasks at the processing stage
UserTaskCount | int | The number of tasks at the processing stage assigned to the given user
PostponedTaskCount | int | The number of tasks at the processing stage postponed by the user
IsEnabled | bool | A flag which shows if the processing stage is on or off. Possible values: ·True - the processing stage is enabled ·False - the processing stage is disabled


RegistrationProperty

What it does

The RegistrationProperty data type stores information about a registration parameter of a batch or document.

Fields

Name | Type | Description
Name | string | The name of the registration parameter
Value | string | The value of the registration parameter


RegistrationPropertyDef

What it does

The RegistrationPropertyDef data type stores information about a registration parameter of a batch type.

Fields

Name | Type | Description
Id | int | The ID of the registration parameter of the batch type. Completed automatically by the Application Server.
Name | string | The name of the registration parameter of the batch type
IsRequired | bool | A flag that shows whether the registration parameter must be completed or not


Role

What it does

The Role data type stores information about the user role.

Fields

Name

Type

Description

Id

int

The ID of the role in the database

Type

int

The role type. See RoleType for possible values.

Name

string

The name of user role

ProjectId

int

The ID of the project

Attributes

int

The set of role attributes. This is a bit array, which consists of the following bit flags:

·RG_Attribute_Hidden = 0x1 - the role is not visible to anyone;

·RG_Attribute_Disabled = 0x2 - the role is not displayed when connecting;

·RG_UseOnlyOwnBatches = 0x10 - allows you to work only with your own batches;

·RG_BatchListAccess = 0x100 - allows you to view the project batches;

·RG_CreateDeleteBatches = 0x200 - allows you to create and delete batches;

·RG_ModifyBatchStructure = 0x400 - allows you to create and delete documents and pages and change their order;

·RG_ModifyDocumentLayout = 0x800 - allows you to match Document Definitions and section and edit page layout;

·RG_ModifyDocument = 0x1000 - allows you to modify the document contents;

·RG_CreateTasks = 0x10000 - allows you to create tasks;

·RG_PostponeTasks = 0x20000 - allows you to postpone tasks;

·RG_TasksQueueAccess = 0x40000 - allows you to choose a task from queue;

·RG_TakeTaskOwnership = 0x80000 - allows you to take postponed tasks and tasks assigned to a different Operator;

·RG_CanSendToAnyStage = 0x100000 - allows you to send task to any available stage irrespective of restrictions of the current stage;

·RG_ChangeObjectsPriority = 0x200000 - allows you to change the priority of batches, documents and tasks.

A value of the Attributes parameter is a sum of desired roles (the sum of twos raised to the corresponding power).


ServerRequest

What it does

The ServerRequest data type stores information about requests to the Application Server to run the validation rules in the current session.

Fields

Name | Type | Description
Id | int | Request ID
BatchId | int | The ID of the batch that contains the task's documents
TaskId | int | Task ID
SessionId | int | The ID of the session of the author of the request
Status | int | The current status of the request. See ServerRequestStatus for possible values.


Task

What it does

The Task data type stores information about tasks.

note Note: Besides records of this type, information about tasks is also stored in XML files. An XML file may describe the entire task or its separate files. See the Working with files section for information about the structure of data in files and working with files.

Fields

Name

Type

Description

Id

int

The ID of the task

ProjectId

int

The ID of the project to which the task belongs

BatchId

int

The ID of the batch which includes the documents of the task

BatchTypeId

int

The ID of the batch type. 0 corresponds to the "Default" batch type

Priority

int

Task priority. Possible values: see Priority.

Status

System.UInt32

Task status. Possible values:

·0 - being created

·1 - awaits processing

·2 - being processed

·3 - processing completed

·4 - postponed

CreationTime

long

Time of creation. To convert values, use the following methods (C#):

DateTime dtTime;
long lTime;
...
// conversion from DateTime to long
dTime = DateTime.FromFileTime(lTime);
...
// conversion from long to DateTime
lTime = dTime.ToFileTime();

ModificationTime

long

The time when the task was last modified. Use the following methods (C#) for conversion:

DateTime dtTime;
long lTime;
...
// conversion from DateTime to long
dTime = DateTime.FromFileTime(lTime);
...
// conversion from long to DateTime
lTime = dTime.ToFileTime();

Comment

string

Comment to the task

StageType

int

The type of the processing stage at which the task was formed. See ProcessingStageType for possible values.

UserId

int

The ID of the user or group to whom the task has been assigned.

Flags

int

A set of flags which describe the status of the task. The value of a field is a combination of the values of the flags, which include:

·TA_HasAttachedDataVerificationXml = 0x200 an XML file with pre-processing data has been generated for the task

·TA_HasAttachedDocumentsXml = 0x1000 XML files with data have been generated for the task

note Note: Only those flags are listed which are useful when working with the tasks and methods of the Web Services API.

CreatorId

int

The ID of the user that created the task

BatchName

string

The name of the batch the task is associated with

StageExternalId

int

The ID of the processing stage in which the task is created


Template

What it does

The Template data type stores information about a Document Definition.

Fields

Name | Type | Description
Id | int | The ID of the Document Definition
Name | string | The name of the Document Definition
Version | int | The version of the Document Definition
IsDisabled | bool | A flag which shows the state of the Document Definition in the Project Setup station


TicketInfo

What it does

The TicketInfo data type stores information about the licensing ticket.

Fields

Name

Type

Description

TicketId

int

The ID of the ticket

LicenseNumber

string

The license number

StationType

int

The type of the station. See WorkstationType for possible values.

note Note: Use the WT_Verification and the WT_Validation values instead of the WT_RemoteDataVerification and the WT_RemoteVerification ones respectively.

ExpirationDate

long

The date and time when the license expires.

Use the following methods for conversion (C#):

DateTime dtTime;
long lTime;
...
// conversion from DateTime to long
dTime = DateTime.FromFileTime(lTime);
...
// conversion from long to DateTime
lTime = dTime.ToFileTime();

ExpirationPeriod

long

The license term (starts upon license activation).

Use the following methods for conversion (C#):

DateTime dtTime;
long lTime;
...
// conversion from DateTime to long
dTime = DateTime.FromFileTime(lTime);
...
// conversion from long to DateTime
lTime = dTime.ToFileTime();

AvailableModules

unsigned int

The modules available for the license

IssuedForSessionId

int

The ID of the session during which the ticket was created

CustomFeature

LicenseCustomFeature[]

The custom license parameters

Signature

string

The signature of the ticket


User

What it does

The User data type stores information about the user.

Fields

Name | Type | Description
Id | int | The ID of the user
Name | string | The name of the user
FullName | string | The full name of the user


UserStatistics

What it does

The UserStatistics data type stores information about the number of batches, documents and pages processed by the user. Processed batches are the batches that came to the stage in the "processed" state.

Fields

Name | Type | Description
BatchesCount | int | The number of processed batches
DocumentsCount | int | The number of processed documents
PagesCount | int | The number of processed pages


Working with Files

Show/Hide Hidden Text

To exchange files with the Application Server, use a POST request.

To use an API, you must first connect to a Web service.

Types of actions

With the help of POST requests the following actions can be executed:

·Load files from server (Action = Load)

·Save files on the server (Action = Save)

·Append data to the end of the file (Action = Append)

·Getting a checksum for a file from the server (checksum is calculated using the CRC32 method) (Action = Checksum)

Possible use

1.Importing images. Loading image files, also by parts and getting the checksum.

2.Getting original page images at any time of processing.

3.Working with attachments of batches, documents, pages (upload / download).

note Note: For working with large attachments, POST requests should be used. Large files are divided into smaller parts and uploaded to server. If POST request is used to add an attachment to an object, the SaveAttachment method should be called after the POST request. As the file parameter of the SaveAttachment method, the zero-length file with the name of the transferred file is passed.
In other cases, it is recommended to use methods which are specially developed for working with attachments.

4.Getting XML description of the verification task, modifying this document and saving changes on the server.

Request parameters

note Note: Make sure that the request fields are completed correctly.

Name

Type

Description

Action

string

Type of action. Possible values:

·Load loads a file from the server

·Save saves a file on the server

·Append appends data to an existing file on the server

·Checksum requests a checksum for a file from the server; checksums are calculated using the CRC32 method

sessionId

int

Session ID (used for checking the user's permissions)

projectId

int

Project ID

batchId

int

Batch ID

objectType

int

Type of object on the server. Possible values

·0 document

·1 page

·5 small copy of the page to be displayed as a thumbnail; PNG file

·8 task attachment (XML document)

note Note: Effective when working with large attachments. Otherwise, it is recommended to use methods which have been specifically developed for working with attachments.

·13 file accessible to all users (e.g. End-User License Agreement)

note Note: For files of this type, ProjectId=0 and BatchId=0, i.e. they do not belong to any particular project, batch or tenant. To write a file of this type, the administrator must open a session. To read a file of this type, pass sessionid=0 (there is no need to open a session).

objectId

int

Object ID (ID of a document, page, or task)

parentId

int

The ID of the parent document

note Note: The parameter is specified for document sets. For documents that are not part of a set, the recommended value is 0.

version

int

File version

streamName

string

The name of the Base64-encoded binary stream when saving a file to the server, or of the UrlEncode-encoded binary stream when loading a file from the server. Possible values

for pages:

·BlackWhiteImage the black-and-white image of the page; PNG file

·ColorImage the color image of the page; JPG file

·Preview page preview image; PNG file

for documents:

·DocumentBody an XML document that describes document fields. Created when preparing the task for the Web-stations. After verification, the changes in the document are processed. Versions are not supported, the version parameter must be set to 0. Save the document processing results to this file.

·Page pageID, where pageID is an ID of a page returned by the AddNewPage method. This stream name can be used to upload source page image before preprocessing.

·FileName, where FileName is a name of a file specified when creating the document by the AddNewDocument method. This stream name can be used to upload a multi-page file with document page images.

·RecognizedWords an XML document that contains recognized words and their coordinates on the page.

for tasks:

·Verification an XML document that describes a verification task. Created when preparing the task for the Web-stations. After verification, the changes in the document are processed. Versions are not supported, the version parameter must be set to 1. Save the task processing results to this file.

·VerificationRequest corresponds to any of the following requests:

oan XML document that contains a request to execute operations within a batch, including document separation and page re-arrangement. In particular, this type of request is used by the Web Station for rule checks.

oan XML document containing a routing request

oan XML document containing a LineItems extrapolation request

oan XML document containing a data verification request

blob

Binary file data (if the Action parameter is set to Save or Append)

offset

int

The offset from the start of the file after which to append the data (if the Action parameter is set to Append)

File Storage contains all files of the project. The file name contains information about the type of object, its identifier, name of the stream in the form of: <object type>-<object id>-<stream name>version.

Files of pages (objectType = 1) contain copies of images while document files (objectType = 0) contain source images. Thus, you cannot change an image using the POST request with the parameter: objectType = 1.

Example requests

Loading a file from the server

To load a page file (objectType = 1) with ID id=4, streamName=C:\Temp\image.pdf and version=184201843 from the server, use the following POST request:

1-4-C:\Temp\image.pdf184201843
Saving a file on the server

To save a document (objectType = 0) with ID id=4, projectId=3, batchId=6, version=522, streamName=C:\Temp\image.pdf on the server, use the following POST request:

resp = FileRequest(

action: "Save",

objectType: 0,

projectId: 3,

batchId: 6,

objectId: 4,

version: 522,

streamName: "C:\Temp\image.pdf",

file: new ByteArrayContent(buffer, 0, readed),

clientCredentials: clientCredentials,

endpointAddress: endpointAddress);

For more information about POST request examples, see Examples.


Examples

In this section, you will find the following POST request examples for working with files:

Loading files from the server

Uploading files to the server

Getting a checksum

Loading by parts (modifying an existing file)

Loading files from the server

To load a file from the server, a server request should be created (AppServerURL + "/FlexiCapture12/Server/FileService/v1"). The request method should be POST, and the contents should be of the application/x-www-form-urlencoded type. The results should be recorded to a new file.

Request body:

"Action=Load" +"&sessionId=" + session + "&objectType=" + objectType + "&projectId=" + projectId + "&batchId=" + batchId + "&objectId=" + objectId + "&version=" + version + "&streamName=" + streamName

static private CredentialCache basicAuthenticationCredentialCache = null;
public static List<byte> POSTLoadFile(string AppServerURL, int session, int projectId, int batchId, int objectType, int objectId, int version, int parentId, string streamName)
{
List<byte> result = new List<byte>();
HttpWebResponse response = null;
Stream responseStream = null;
BinaryReader reader = null;
try
{
// creating the request
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(AppServerURL + "/FlexiCapture12/Server/FileService/v1");
request.Method = "POST";
// authentication set up when connecting to the web service
if (basicAuthenticationCredentialCache != null)
{
request.Credentials = basicAuthenticationCredentialCache;
}
else
{
request.UseDefaultCredentials = true;
}
request.ContentType = "application/x-www-form-urlencoded";
string postData = "Action=Load" +
"&sessionId=" + session +
"&objectType=" + objectType +
"&projectId=" + projectId +
"&batchId=" + batchId +
"&parentId=" + parentId +
"&objectId=" + objectId +
"&version=" + version +
"&streamName=" + streamName;
StreamWriter writer = new StreamWriter(request.GetRequestStream());
writer.Write(postData);
writer.Close();

// receiving a response
response = (HttpWebResponse)request.GetResponse();
responseStream = response.GetResponseStream();
reader = new BinaryReader(responseStream);
int responseStreamLength = 0;
while (true)
{
try
{
result.Add(reader.ReadByte());
responseStreamLength++;
}
catch (EndOfStreamException)
{
break;
}
}
reader.Close();
responseStream.Close();
response.Close();
}
if (response != null) response.Close();
if (responseStream != null) responseStream.Close();
if (reader != null) reader.Close();
return result;
}

Uploading files to the server

You need to open an existing file and read data from it (The "content" string should be obtained from the binary file using Encoding.Default).

To save the file, a server request should be created (AppServerURL + "/FlexiCapture12/Server/FileService/v1"). The request method should be POST, and the contents should be of the multipart/form-data type.

Request body:

"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"Action\"\r\n\r\nSave" +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"objectType\"\r\n\r\n" + objectType +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"sessionId\"\r\n\r\n" + session +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"projectId\"\r\n\r\n" + projectId +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"batchId\"\r\n\r\n" + batchId +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"objectId\"\r\n\r\n" + objectId +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"version\"\r\n\r\n" + version +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"streamName\"\r\n\r\n" + streamNameInBase64 + // name of the binary stream in Base64
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"blob\";filename=\"filename.txt\"\r\nContent-Type: application/octet-stream\r\nContent-Transfer-Encoding: binary\r\n\r\n"+ // the value of the filename parameter does not affect the request itself
content + //data that is uploaded to the server
"\r\n--" + requestId + "--\r\n";

static private CredentialCache basicAuthenticationCredentialCache = null;
// the "content" string should be obtained from the binary file using Encoding.Default
public static List<byte> POSTSaveFile(string AppServerURL, int session, int projectId, int batchId, int objectType, int objectId, int version, string streamName, string content)
{
List<byte> result = new List<byte>();
HttpWebResponse response = null;
Stream responseStream = null;
StreamReader reader = null;
int requestId = Environment.TickCount;
try
{
// creating the request
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(AppServerURL + "/FlexiCapture12/Server/FileService/v1");
request.Method = "POST";
// authentication set up when connecting to the web service
if (basicAuthenticationCredentialCache != null)
{
request.Credentials = basicAuthenticationCredentialCache;
}
else
{
request.UseDefaultCredentials = true;
}
request.ContentType = "multipart/form-data, boundary=" + requestId;
byte[] streamNameInBytes = Encoding.Unicode.GetBytes(streamName);
UnicodeEncoding UTFencofing = new UnicodeEncoding();
string postData = "\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"Action\"\r\n\r\nSave" +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"objectType\"\r\n\r\n" + objectType +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"sessionId\"\r\n\r\n" + session +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"projectId\"\r\n\r\n" + projectId +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"batchId\"\r\n\r\n" + batchId +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"objectId\"\r\n\r\n" + objectId +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"version\"\r\n\r\n" + version +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"streamName\"\r\n\r\n" + Convert.ToBase64String(streamNameInBytes) +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"blob\";filename=\"filename.txt\"\r\nContent-Type: application/octet-stream\r\nContent-Transfer-Encoding: binary\r\n\r\n";
postData += content;
postData += "\r\n--" + requestId + "--\r\n";
StreamWriter writer = new StreamWriter(request.GetRequestStream(), Encoding.Default);
writer.Write(postData);
writer.Close();

// receiving a response
response = (HttpWebResponse)request.GetResponse();
responseStream = response.GetResponseStream();
reader = new StreamReader(responseStream);
reader.Close();
responseStream.Close();
response.Close();
}
if (response != null) response.Close();
if (responseStream != null) responseStream.Close();
if (reader != null) reader.Close();
return result;
}

Getting a checksum

To get a checksum, a server request should be created (AppServerURL + "/FlexiCapture12/Server/FileService/v1"). The request method should be POST, and the contents should be of the application/x-www-form-urlencoded type.

Request body:

"Action=Checksum" + "&sessionId=" + session + "&objectType=" + objectType + "&projectId=" + projectId + "&batchId=" + batchId + "&objectId=" + objectId + "&version=" + version + "&streamName=" + streamName

static private CredentialCache basicAuthenticationCredentialCache = null;
public static List<byte> POSTGetChecksum(string AppServerURL, int session, int projectId, int batchId, int objectType, int objectId, int version, string streamName)
{
List<byte> result = new List<byte>();
HttpWebResponse response = null;
Stream responseStream = null;
BinaryReader reader = null;
try
{
// creating the request
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(AppServerURL + "/FlexiCapture12/Server/FileService/v1");
request.Method = "POST";
// authentication set up when connecting to the web service
if (basicAuthenticationCredentialCache != null)
{
request.Credentials = basicAuthenticationCredentialCache;
}
else
{
request.UseDefaultCredentials = true;
}
request.ContentType = "application/x-www-form-urlencoded";
string postData = "Action=Checksum" +
"&sessionId=" + session +
"&objectType=" + objectType +
"&projectId=" + projectId +
"&batchId=" + batchId +
"&objectId=" + objectId +
"&version=" + version +
"&streamName=" + streamName;
StreamWriter writer = new StreamWriter(request.GetRequestStream());
writer.Write(postData);
writer.Close();

// receiving a response
response = (HttpWebResponse)request.GetResponse();
responseStream = response.GetResponseStream();
reader = new BinaryReader(responseStream);
int responseStreamLength = 0;
while (true)
{
try
{
result.Add(reader.ReadByte());
responseStreamLength++;
}
catch (EndOfStreamException)
{
break;
}
}
reader.Close();
responseStream.Close();
response.Close();

}
if (response != null) response.Close();
if (responseStream != null) responseStream.Close();
if (reader != null) reader.Close();
return result;
}

Loading by parts (modifying an existing file)

warning Important! Only a file that already exists on the server can be modified.

In order to modify the file, a server request should be created (AppServerURL + "/FlexiCapture12/Server/FileService/v1"). The request method should be POST, and the contents should be of the multipart/form-data type.

Request body:

"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"Action\"\r\n\r\nAppend" +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"objectType\"\r\n\r\n" + objectType +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"sessionId\"\r\n\r\n" + session +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"projectId\"\r\n\r\n" + projectId +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"batchId\"\r\n\r\n" + batchId +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"objectId\"\r\n\r\n" + objectId +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"version\"\r\n\r\n" + version +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"streamName\"\r\n\r\n" + streamNameInBase64 +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"blob\";filename=\"filename.txt\"\r\nContent-Type: application/octet-stream\r\nContent-Transfer-Encoding: binary\r\n\r\n" +
сontent + //this string should be obtained the same way as in the previous example
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"offset\"\r\n\r\n" + offset + //the offset from the beginning of the file, where the entry starts
"\r\n--" + requestId + "--\r\n";

static private CredentialCache basicAuthenticationCredentialCache = null;
// the "content" string should be obtained from the binary file using Encoding.Default
// Note: you can only add to a file that already exists, meaning that you must first create a file using the POSTSaveFile method
public static List<byte> POSTAppendFile(string AppServerURL, int session, int projectId, int batchId, int objectType, int objectId, int version, string streamName, string content, int offset)
{
List<byte> result = new List<byte>();
HttpWebResponse response = null;
Stream responseStream = null;
StreamReader reader = null;
int requestId = Environment.TickCount;
try
{
// creating a request
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(AppServerURL + "/FlexiCapture12/Server/FileService/v1");
request.Method = "POST";
// authentication set up when connecting to the web service
if (basicAuthenticationCredentialCache != null)
{
request.Credentials = basicAuthenticationCredentialCache;
}
else
{
request.UseDefaultCredentials = true;
}
request.ContentType = "multipart/form-data, boundary=" + requestId;
byte[] streamNameInBytes = Encoding.Unicode.GetBytes(streamName);
UnicodeEncoding UTFencofing = new UnicodeEncoding();
string postData = "\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"Action\"\r\n\r\nAppend" +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"objectType\"\r\n\r\n" + objectType +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"sessionId\"\r\n\r\n" + session +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"projectId\"\r\n\r\n" + projectId +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"batchId\"\r\n\r\n" + batchId +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"objectId\"\r\n\r\n" + objectId +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"version\"\r\n\r\n" + version +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"streamName\"\r\n\r\n" + Convert.ToBase64String(streamNameInBytes) +
"\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"blob\";filename=\"filename.txt\"\r\nContent-Type: application/octet-stream\r\nContent-Transfer-Encoding: binary\r\n\r\n";
postData += content;
postData += "\r\n--" + requestId + "\r\ncontent-disposition: form-data; name=\"offset\"\r\n\r\n" + offset;
postData += "\r\n--" + requestId + "--\r\n";
StreamWriter writer = new StreamWriter(request.GetRequestStream(), Encoding.Default);
writer.Write(postData);
writer.Close();

// receiving a response
response = (HttpWebResponse)request.GetResponse();
responseStream = response.GetResponseStream();

// displaying the response
reader = new StreamReader(responseStream);
reader.Close();
responseStream.Close();
response.Close();
}
if (response != null) response.Close();
if (responseStream != null) responseStream.Close();
if (reader != null) reader.Close();
return result;
}


Web Services Mobile API

Show/Hide Hidden Text

For the best performance of a mobile client app, it is important to minimize the number of requests sent to the server. The Web Services Mobile API allows you to develop high-performance applications for mobile clients where the number of requests to the server is kept to a minimum.

In the most typical scenario, you have to complete the following two steps:

1. Request the parameters

2. Upload a file to the server

Authentication

To connect mobile clients to the server, basic authentication is used. If authentication is successful, the server will send a response to the client containing an authentication ticket in the "AuthTicket" header. Now you can pass this ticket in subsequent requests to the server instead of the user name and password. The ticket should be placed in the "Bearer" header.

Example of passing an authentication ticket

Authorization: Bearer <ticket value>


Requesting the parameters

Show/Hide Hidden Text

Use a GET request and pass this URI: http://localhost/flexicapture12/Server/MobileApp. When working with tenants, you should additionally pass the tenant name as a parameter: http://localhost/flexicapture12/Server/MobileApp?Tenant=[tenant name].

The server sends a response in the JSON format encoded in UTF-8.The root of the JSON response contains values of projectName and batchType parameters if they were configured by an Administrator on the server. Below the values configured on the server is the list of all the projects available to the user. Each project contains the list of batches with the attached list of document types and registration parameters specified on the server by an Administrator.

note Note: The user must have Scanning Operator permissions.

Example of a JSON response

{
"batchType":"",
"projectName":"<project name>"
"projects":

[

{
"name" : "<available project>",
"batchTypes" :

[
{
"name" : "<Default>"
},
{
"name" : "<batch type 1>"
"regParams" :

[
{
"name" : "<registration parameters 1>",
"isRequired" : "true"
},
{
"name" : "<registration parameters 2>",
"isRequired" : "false"
}
]
}

]
}
]
}


Uploading files to the server

Show/Hide Hidden Text

To upload a file to the server, use a PUT or POST request.

Creating a PUT request

To upload a file using a PUT request, pass the following URI:

http://localhost/flexicapture12/server/MobileApp?filename=[file name]&projectName=[project name]&batchType=[batch name], where:

Name | Value
projectName | The name of the project. Required parameter
batchType | The name of the batch. Required parameter. If no value is specified, the default batch type will be used.
filename | The name of the file that is to be uploaded. Required parameter

We recommend that you explicitly specify the value of the Content-type header field. The file to be uploaded is specified in the body of the PUT request.

Hash coding is supported. Pass the value of the MD5 hash function to the FlexiCapture 12 server. The value should be encoded in Base64 and passed in the standard Content-MD5 header. The server will compute the value of the hash function for the file and compare it against the value passed in the header. If the values do not match, the file will be deleted on the server.

There are two possible server responses:

·HTTP 201 (Created) - The file has been successfully uploaded to the server.

·HTTP 400 (Bad request) - Some required parameters have not been specified/The value of the hash function does not match the value specified in the header and no file has been uploaded.

note Note: Currently, you cannot pass the registration parameters to the server.

Creating a POST request

We recommend using PUT requests. If, for some reason, PUT requests cannot be used, you can upload a file to the server using a POST request. The projectName and batchType parameters can be passed in the URL, just like in a PUT request, or as text fields in the request body.

You can pass multiple images in one POST request. To pass multiple images, set the value of the Content-type field to "multipart/form-data" and specify the value of the separator in the boundary parameter. The names of the files included in a request must not be the same.

Example of passing multiple files

Content-type: multipart/form-data; boundary=<random string>
--<boundary value>
Content-Disposition: form-data; name=<field name>; filename=<name of file 1><crlf>
Content-MD5: <value of MD5 hash for file><crlf>
<crlf>
<file data>

--<boundary value>
Content-Disposition: form-data; name=<field name>; filename=<name of file 2><crlf>
<crlf>
<file data>

You can also pass a text field using a POST request.

Example of passing a text field

--<boundary value>
Content-Disposition: form-data; name=”<field name>”<crlf>
<crlf>
<field value><crlf>

The request ends with the string

--<boundary value>--<crlf><crlf>


Specifying structure of a batch

You can add a description of the batch's structure when sending a batch with several pages by means of a POST request. The current version supports the following scenarios:

·Creation of documents from pages

·Specifying a desired Document Definition for a document

note Note: The current version supports only one-level documents.

To use these features, add a separate text field with the BatchStructure name to the multipart request. This name must contain a json description of the structure of the batch being created and look as follows:

{
"documents": [
{
"template": "Banking_eng",
"pages": ["file1.jpg", "file2.jpg"]
},
{ "pages": ["file3.jpg", "file4.jpg"] }
]
}

The template field is optional and contains the name of one Document Definition in the batch type. The pages array contains names of files that are sent in a request (a value from the filename is used). They will be used to form a document.

note Note: The services does not forbid using one image to create several pages in different documents. This method can be used, for example, to decrease the size of a request.

Together with the batch structure, you may use the json file to describe registration parameters for documents and/or a batch:

{
"regParams": [
{"name":"batchParam1", "value":"param1value"},
{"name":"batchParam2", "value":"param2value"}
],
"documents": [
{
"template": "Banking_eng",
"pages": ["file1.jpg", "file2.jpg"],
"regParams": [
{"name":"param1", "value":"param1value"},
{"name":"param2", "value":"param2value"}
]
}
]
}


Web Services for user account management

This service allows you to automate the management of user accounts and groups as well as their permissions.

You can connect to the service by using:

1.The service URL to call methods:
http://<ApplicationServer>/flexicapture12/server/AuthAPI/v1/SOAP

2.WSDL with the service description when adding the service link to the Visual Studio project:
http://<ApplicationServer>/flexicapture12/server/AuthAPI/v1/WSDL


Data types

This section describes the types of data that use the methods of the Web Service API.

Users |
UserInfo | The FlexiCapture database record with information about a user
Groups |
GroupInfo | The FlexiCapture database record with information about a group
Tenants |
TenantInfo | The FlexiCapture database record with information about a tenant
Permissions |
RolePermissionInfo | The permission to use the specified role
PermissionRequestInfo | The permission request to an administrator


UserInfo

What it does

The UserInfo data type stores the user information in the database.

Fields

Name | Type | Description
Id | int | User ID
Name | string | User name
FullName | string | Full user name
Email | string | E-mail
TenantId | int | Tenant ID


GroupInfo

What it does

The GroupInfo data type stores the group information in the database.

Fields

Name | Type | Description
Id | int | Group ID
Name | string | Short group name
FullName | string | Full group name
TenantId | int | Tenant ID


TenantInfo

What it does

The TenantInfo data type stores the tenant information in the database.

Fields

Name | Type | Description
Id | int | Tenant ID
Name | string | Tenant name
Description | string | Full tenant description
LicenseNumber | string | License number (if a tenant uses an allocated license)
CanUseCommonLicense | bool | Permission to use a common license if there is no allocated tenant license


RolePermissionInfo

What it does

The RolePermissionInfo stores information about the permissions to use the specified role.

Field

Name | Type | Description
BatchTypeName | string | Batch type name
ProjectName | string | Project name
RoleType | int | User role type. For possible values, see User role types


PermissionRequestInfo

What it does

The PermissionRequestInfo data type provides information about the permission request that is sent to an administrator.

Fields

Name | Type | Description
CreationDate | long | Request creation date
ProcessedDate | long | Request processing date (if it was successfully processed)
IsProcessed | bool | The attribute that shows whether the permission request has been processed
Text | string | Request text


Methods

This section describes methods that are used to manage users, groups, tenants, and permissions.

Configuration

IsDatabaseConnected

Checks whether the database is connected to the Application Server

note Note: Add a suffix in the form of ?Tenant=MyTenantName at the end of a URL to specify the name of a tenant. All methods that do not explicitly specify a tenant use the current tenant that is determined by the URL.


IsDatabaseConnected

What it does

Checks the connection of the database to the Application Server.

Definition

bool IsDatabaseConnected();

Parameters

N/A

Returned value

Type | Description
bool | ·"true" if the database is connected ·otherwise "false" is returned


User management

This section describes methods that allow a user to perform the following actions while managing users:

ChangePassword | Change a user password
CreateUser | Create a new user
DeleteUser | Delete a user
GetUser | Obtain information about a user
FindUser | Search for users by their name
UpdateUser | Update the user information
UserNeedToResetPassword | Check whether the specified user has the enabled requirement to change their password
ValidateUser | Check whether a user name and a password match the values in the database


ChangePassword

What it does

Resets a user's password.

Definition

bool ChangePassword( string userName, string oldPassword, string newPassword );

Parameters

Name | Type | Description
userName | string | User name
oldPassword | string | Old password value (unencrypted)
newPassword | string | New password value

Sample code for calculating the password hash:

public static string GetPasswordHashWithSalt( string login, string password )
{
string salt = GetPasswordSha256Hash(login.ToUpper());
return GetPasswordSha256Hash(password + salt);
}
private static string GetPasswordSha256Hash( string password )
{
Encoding enc = Encoding.GetEncoding("UTF-16");
byte[] buffer = enc.GetBytes(password);
var cryptoTransformSHA256 = new SHA256CryptoServiceProvider();
string hash = BitConverter.ToString(cryptoTransformSHA256.ComputeHash(buffer)).Replace("-", "");
return hash;
}

Returned value

Type | Description
bool | ·"false" if the password has not been reset. For example, the old password didn't match the new password ·"true" if the password has been successfully reset


CreateUser

What it does

Creates a new user.

Definition

int CreateUser( string userName, string fullName, string password, string email, string tenantName );

Parameters

Name | Type | Description
userName | string | User name
fullName | string | Full user name
password | string | User password hash
email | string | User e-mail
tenantName | string | Tenant name

Sample code for calculating the password hash:

public static string GetPasswordHashWithSalt( string login, string password )
{
string salt = GetPasswordSha256Hash(login.ToUpper());
return GetPasswordSha256Hash(password + salt);
}
private static string GetPasswordSha256Hash( string password )
{
Encoding enc = Encoding.GetEncoding("UTF-16");
byte[] buffer = enc.GetBytes(password);
var cryptoTransformSHA256 = new SHA256CryptoServiceProvider();
string hash = BitConverter.ToString(cryptoTransformSHA256.ComputeHash(buffer)).Replace("-", "");
return hash;
}

Returned value

Type | Description
int | User ID

note Note: A T-SQL code that is used to check whether the password was correctly encrypted:

Select Convert( nvarchar(40), HASHBYTES( 'SHA1', N'myPassword'), 2 )


DeleteUser

What it does

Deletes a user.

Definition

void DeleteUser( int userId );

Parameters

Name | Type | Description
userId | int | User ID

Returned value

N/A


FindUser

What it does

Searches for users by their name.

Definition

int FindUser( string userName );

Parameters

Name | Type | Description
userName | string | User name

Returned value

Type | Description
int | User ID


GetUser

What it does

Obtains information about a user.

Definition

UserInfo GetUser( string userName );

Parameters

Name | Type | Description
userName | string | User name

Returned value

Type | Description
UserInfo | The type of data that contain information about a user


UpdateUser

What it does

Updates information about a user.

Definition

void UpdateUser( int userId, string userName, string fullName, string email );

Parameters

Name | Type | Description
userId | int | User ID
userName | string | New user name
fullName | string | Full new user name
email | string | New user e-mail

Returned value

N/A

note Note: To modify the user information, call the GetUser method, make relevant changes in one or more fields, and call the UpdateUser method.


UserNeedToResetPassword

What it does

Checks whether the specified user has the requirement to change their password.

Definition

bool UserNeedToResetPassword( string userName );

Parameters

Name | Type | Description
userName | string | User name

Returned value

Type | Description
bool | ·"true" if the requirement is enabled ·otherwise "false" is returned


ValidateUser

What it does

Checks whether a user name and a password match the values in the database.

Definition

bool ValidateUser( string userName, string passwordHash );

Parameters

Name | Type | Description
userName | string | User name
passwordHash | string | Password hash

Sample code for calculating the password hash:

public static string GetPasswordHashWithSalt( string login, string password )
{
string salt = GetPasswordSha256Hash(login.ToUpper());
return GetPasswordSha256Hash(password + salt);
}
private static string GetPasswordSha256Hash( string password )
{
Encoding enc = Encoding.GetEncoding("UTF-16");
byte[] buffer = enc.GetBytes(password);
var cryptoTransformSHA256 = new SHA256CryptoServiceProvider();
string hash = BitConverter.ToString(cryptoTransformSHA256.ComputeHash(buffer)).Replace("-", "");
return hash;
}

Returned value

Type | Description
bool | ·"true" if values match ·otherwise "false" is returned


Group management

This section describes methods that allow a user to perform the following actions while managing groups:

AddToGroup | Add a user or a group to the specified group
CreateGroup | Create a new group
DeleteGroup | Delete a group
GetChildGroups | Request information about all groups that are included in the specified group
GetGroup | Request information about a group
GetGroups | Request information about all groups
GetUsersInGroup | Request information about all users that are included in the specified group
RemoveFromGroup | Remove a user or a group from the specified group


AddToGroup

What it does

Adds users and groups to the specified group.

Definition

void AddToGroup( int principalId, int groupId );

Parameters

Name | Type | Description
principalId | int | User or group ID
groupId | int | Group ID

Returned value

N/A


CreateGroup

What it does

Creates a new group.

Definition

int CreateGroup( string name, string fullName );

Parameters

Name | Type | Description
name | string | Group short name
fullName | string | Group full name

Returned value

Type | Description
int | ·Group ID


DeleteGroup

What it does

Deletes a group.

Definition

void DeleteGroup( int groupId );

Parameters

Name | Type | Description
groupId | int | Group ID

Returned value

N/A


GetChildGroups

What it does

Obtains information about all groups that are included in the specified group.

Definition

GroupInfo[] GetChildGroups( int groupId );

Parameters

Name | Type | Description
groupId | int | Group ID

Returned value

Type | Description
GroupInfo[] | ·The type of data that contain information about a group


GetGroup

What it does

Obtains information about a group.

Definition

bool GetGroup( int groupId, out GroupInfo groupinfo );

Parameters

Name | Type | Description
groupId | int | Group ID

Returned value

Type | Description
bool | ·The value that tells whether the group exists. Possible values: ·"true" if the specified group is found ·otherwise returns "false"
GroupInfo | Information about a group


GetGroups

What it does

Obtains information about all groups.

Definition

GroupInfo[] GetGroups();

Parameters

N/A

Returned values

Type | Description
GroupInfo[] | ·The type of data that contain information about a group


GetUsersInGroups

What it does

Obtains information about all users that are included in the specified group.

Definition

UserInfo[] GetUsersInGroup( int groupId );

Parameters

Name | Type | Description
groupId | int | Group ID

Returned value

Type | Description
UserInfo [] | ·The type of data that contain information about a user


RemoveFromGroup

What it does

Removes a user or a group from the specified group.

Definition

void RemoveFromGroup( int principalId, int groupId );

Parameters

Name | Type | Description
principalId | int | The ID of a user or a group to be deleted
groupId | int | The ID of a group that the data is deleted from

Returned value

N/A


Tenant management

This section describes methods that allow a user to perform the following actions while managing tenants:

AddTenant | Create a new tenant
DeleteTenant | Delete a tenant
FindTenant | Search for a tenant by its name
GetTenants | Obtain information about all tenants
UpdateTenant | Update information about a tenant


AddTenant

What it does

Adds a new tenant.

Definition

int AddTenant( string tenantName, string tenantDescription, string licenseNumber, bool canUseCommonLicense );

Parameters

Name | Type | Description
tenantName | string | Tenant name
tenantDescription | string | Tenant description
licenseNumber | string | Tenant license number (if required)
canUseCommonLicense | bool | Permission to share main license

Returned value

Type | Description
int | Tenant identifier

note Note: Only a tenant will be added. Users must be created separately. The first created user will automatically become the administrator of the tenant.


DeleteTenant

What it does

Deletes a tenant.

Definition

void DeleteTenant( int tenantId );

Parameters

Name | Type | Description
tenantId | int | Tenant ID

Returned value

N/A


FindTenant

What it does

Searches for tenants by their name.

Definition

int FindTenant( string tenantName );

Parameters

Name | Type | Description
tenantName | string | Tenant name

Returned value

Type | Description
int | Tenant ID


GetTenants

What it does

Obtains information about all tenants.

Definition

TenantInfo[] GetTenants();

Parameters

N/A

Returned value

Type | Description
TenantInfo[] | The type of data that contain information about a tenant


UpdateTenant

What it does

Updates information about a tenant.

Definition

void UpdateTenant( int tenantId, string tenantName, string tenantDescription, string licenseNumber, bool canUseCommonLicense );

Parameters

Name | Type | Description
tenantId | int | Tenant ID
tenantName | string | Tenant name
tenantDescription | string | Tenant description
licenseNumber | string | Tenant license number (if required)
canUseCommonLicense | bool | Permission to share a common license

Returned value

N/A

note Note: To modify the tenant information, call the GetTenant method, make relevant changes in one or more fields, and call the UpdateTenant method.


Managing permissions

This section describes methods that allow a user to perform the following actions while managing permissions for users, groups, and tenants:

AddPermission | Add permissions to users or groups to use the specified role in the specified project
CreatePermissionRequest | Create a permission request from a specified user
GetUserPermissions | Obtain information about all permissions of a specified user
GetUserRequests | Obtain information about permission requests that were sent from the specified user
HasPermission | Check whether a user or a group has the permission to use the specified role in the specified project
RemovePermission | Remove user or group permissions to use the specified role in the specified project


AddPermission

What it does

Adds permissions to users or groups to use the specified role in the specified project.

Definition

void AddPermission( int principalId, int projectId, int batchTypeId, int roleType );

Parameters

Name | Type | Description
principalId | int | User or group ID
projectId | int | Project ID ·-1 - all projects
batchTypeId | int | Batch ID ·-1 - all batch types ·0 - batch by default
roleType | int | User role type. For possible values, see User role types.

Returned value

N/A


CreatePermissionRequest

What it does

Creates a permission request from a specified user.

Definition

bool CreatePermissionRequest( string userName, string requestText );

Parameters

Name | Type | Description
userName | string | User name
requestText | string | The text of the request

Returned value

Type | Description
bool | ·"true" if the user was found ·otherwise "false" is returned


GetUserPermissions

What it does

Obtains information about all permissions of the specified user.

Definition

RolePermissionInfo[] GetUserPermissions( string userName );

Parameters

Name | Type | Description
userName | string | User name

Returned value

Type | Description
RolePermissionInfo[] | The type of data that contain information about permissions to use the specified role


GetUserRequests

What it does

Obtains information about permission requests that were sent from the specified user.

Definition

PermissionRequestInfo[] GetUserRequests( string userName );

Parameters

Name | Type | Description
userName | string | User name

Returned value

Type | Description
PermissionRequestInfo[] | The type of data that contain a permission request to an administrator


HasPermission

What it does

Checks whether a user or a group has the permission to use the specified role in the specified project.

Definition

bool HasPermission( int principalId, int projectId, int batchTypeId, int roleType );

Parameters

Name | Type | Description
principalId | int | User or group ID
projectId | int | Project ID ·-1 - all projects
batchTypeId | int | Batch ID ·-1 - all batch types ·0 - batch by default
roleType | int | User role type. For possible values, see User role types.

Returned value

Type | Description
bool | ·"true" if the permission was granted ·otherwise "false" is returned


RemovePermission

What it does

Removes user or group permissions to use the specified role in the specified project.

Definition

void RemovePermission( int principalId, int projectId, int batchTypeId, int roleType );

Parameters

Name | Type | Description
principalId | int | User or group ID
projectId | int | Project ID ·-1 - all projects
batchTypeId | int | Batch ID ·-1 - all batch types ·0 - batch by default
roleType | int | User role type. For possible values, see User role types.

Returned value

N/A


API usage examples

This section contains examples of using the API.

Example of automatic processing

This example shows how you can upload bank account applications to the server and capture the customers' data.

The example code performs the following steps:

·Connects to the service

·Starts working with a session

·Opens the project

·Creates a new batch

·Adds images to the batch

·Starts processing the batch

·Gets the results and displays the captured data

·Closes the session

Example of manual processing

This example shows how you can create an additional stage of manual data processing.

The example code performs the following steps:

·Configures the connection

·Opens the project

·Gets and processes the list of tasks

·Processes each task at the service stage

·Uploads the file to the server

·Closes the session


Example of automatic processing

Show/Hide Hidden Text

This example shows how you can upload bank account applications to the server and capture the customers' data.

Download the project and the accompanying materials: http://help.abbyy.com/

The example code performs the following steps:

·Connects to the service

·Opens a session

·Opens the project

·Creates a new batch

·Adds images to the batch

·Starts processing the batch

·Gets the results and displays the captured data

·Closes the session

To proceed with this example:

·Upload the UnattendedExample.fcproj project file to the server.

·Open UnattendedExample.sln in Visual Studio 2013 or later

Connecting to the service

// Create an instance of the web service client
var service = new FlexiCapture.FlexiCaptureWebServiceSoapClient();

// ======= BASIC AUTHENTICATION =======
// service.ClientCredentials.UserName.UserName = "username";
// service.ClientCredentials.UserName.Password = "password";

Opening a session

// To secure your batches against unauthorized access, specify the current user
// First, get the name of the user visible to the system
var username = service.GetCurrentUserIdentity();

// Next, find yourself among the FlexiCapture users
var userId = service.FindUser(username.Name);
if (userId <= 0) throw new Exception("Current user not found");

// Open a new processing session
const int roleType = 12; //The operator role on the user's station
const int stationType = 10; //The user's station
var sessionId = service.OpenSession(roleType, stationType);
if (sessionId <= 0) throw new Exception("Couldn't open the session");

Opening the project

// Get the projects
var projects = service.GetProjects();
var projectGuid = "";
if (projects != null && projects.Count > 0)
{
foreach (var project in projects)
{
if (project.Name != "UnattendedExample") continue;
projectGuid = project.Guid;
break;
}
}
if (string.IsNullOrEmpty(projectGuid))
{
throw new Exception("Can't find the UnattendedExample project. You must upload this project to the server to be able to work with this example.");
}

// Open the first project named UnattendedExample
var projectId = service.OpenProject(sessionId, projectGuid);
if (projectId <= 0) throw new Exception("Couldn't open the project");

Creating a new batch

// Specify a name for the new batch and keep the other properties unchanged
var batch = new FlexiCapture.Batch { Name = "Sample API Batch" };
var batchId = service.AddNewBatch(sessionId, projectId, batch, userId);
if (batchId <= 0) throw new Exception("Couldn't create the batch");

Adding images to the batch

// Open the batch where to add images
service.OpenBatch(sessionId, batchId);

Uploading files smaller than 256 KB

service.AddNewImage(sessionId, batchId, new FlexiCapture.File()
{
Bytes = File.ReadAllBytes(filename),
Name = filename
});

Uploading larger files

Uploading files larger than 256 KB in their entirety in Base64 has the following drawbacks:

·Network load increases by 33%

·Very large requests may be blocked by IIS or by the firewall

·If connection is lost or there are network errors, you will need to resend the file

Uploading files via the file service API is much more efficient.

var doc = new FlexiCapture.Document { BatchId = batchId };
var file = new FlexiCapture.File { Name = filename };
var documentId = service.AddNewDocument(sessionId, doc, file, false, 0);
UploadFile(service, sessionId, projectId, batchId, documentId, filename).Wait();

Uploading a file to the server

private static async Task UploadFile(FlexiCapture.FlexiCaptureWebServiceSoapClient service, int sessionId, int projectId,
int batchId, int documentId, string filename)
{
const int objectType = 0;
var crc = new Crc32();
using (var fs = File.OpenRead(filename))
{

// Uploading file in portions of 1 МВ
var buffer = new byte[0x100000];
var readed = fs.Read(buffer, 0, buffer.Length);
var checksum = crc.Next(buffer, 0, readed);
if (readed < buffer.Length)
{
// Uploading smaller files in their entirety
var resp = await FileRequest(service, "Save", objectType, sessionId, projectId, batchId, 0, documentId, 0, filename, 0,
new ByteArrayContent(buffer, 0, readed));
if (resp.StatusCode != HttpStatusCode.OK) throw new Exception("Server error");
}
else
{
var offset = 0;
while (readed > 0)
{
var action = offset == 0 ? "BeginSaveChunked" : "Append";
await FileRequest(service, action, objectType, sessionId, projectId, batchId, 0, documentId, 0, filename,
offset, new ByteArrayContent(buffer, 0, readed));
offset += readed;
readed = fs.Read(buffer, 0, buffer.Length);
checksum = crc.Next(buffer, 0, readed);
}
var resp = await FileRequest(service, "Commit", objectType, sessionId, projectId, batchId, 0, documentId, 0, filename);
if (resp.StatusCode != HttpStatusCode.OK) throw new Exception("Server error");
}
var response = await FileRequest(service, "Checksum", objectType, sessionId, projectId, batchId, 0, documentId, 0, filename);
var text = await response.Content.ReadAsStringAsync();
if (uint.Parse(text, NumberStyles.HexNumber) != checksum)
{
throw new Exception("An error occurred when uploading the file");
}
}
}
Sending a request to the server together with a file body

private static async Task<HttpResponseMessage> FileRequest(FlexiCapture.FlexiCaptureWebServiceSoapClient service, string action,
int objectType, int sessionId, int projectId, int batchId, int parentId, int objectId, int version, string streamName, int offset, HttpContent file)
{
var creds = CredentialCache.DefaultNetworkCredentials;
if (!string.IsNullOrEmpty(service.ClientCredentials.UserName.UserName))
creds = new NetworkCredential(service.ClientCredentials.UserName.UserName, service.ClientCredentials.UserName.Password);
using (var handler = new HttpClientHandler { Credentials = creds })
using (var client = new HttpClient(handler))
{
var uri = service.Endpoint.Address.Uri;
var content = new MultipartFormDataContent
{
{new StringContent(action), "Action"},
{new StringContent(objectType.ToString()), "objectType"},
{new StringContent(sessionId.ToString()), "sessionId"},
{new StringContent(projectId.ToString()), "projectId"},
{new StringContent(batchId.ToString()), "batchId"},
{new StringContent(parentId.ToString()), "parentId"},
{new StringContent(objectId.ToString()), "objectId"},
{new StringContent(version.ToString()), "version"},
{new StringContent(Convert.ToBase64String(Encoding.Unicode.GetBytes(streamName))), "streamName"},
};
if (offset > 0)
{
content.Add(new StringContent(offset.ToString()), "offset");
}
content.Add(file, "blob", "data.txt");
return await client.PostAsync(uri.OriginalString.Replace("/API/v1/Soap", "/FileService/v1"), content);
}
}
Sending a request to the server without a file body

private static async Task<HttpResponseMessage> FileRequest(FlexiCapture.FlexiCaptureWebServiceSoapClient service, string action,
int objectType, int sessionId, int projectId, int batchId, int parentId, int objectId, int version, string streamName)
{
var creds = CredentialCache.DefaultNetworkCredentials;
if (!string.IsNullOrEmpty(service.ClientCredentials.UserName.UserName))
creds = new NetworkCredential(service.ClientCredentials.UserName.UserName, service.ClientCredentials.UserName.Password);
using (var handler = new HttpClientHandler { Credentials = creds })
using (var client = new HttpClient(handler))
{
var uri = service.Endpoint.Address.Uri;
var content = new FormUrlEncodedContent(new Dictionary<string, string>
{
{"Action", action},
{"objectType", objectType.ToString()},
{"sessionId", sessionId.ToString()},
{"projectId", projectId.ToString()},
{"batchId", batchId.ToString()},
{"parentId", parentId.ToString()},
{"objectId", objectId.ToString()},
{"version", version.ToString()},
{"streamName", streamName},
});
return await client.PostAsync(uri.OriginalString.Replace("/API/v1/Soap", "/FileService/v1"), content);
}
}

Starting and ending batch processing

// Star processing the batch
service.ProcessBatch(sessionId, batchId);
Console.WriteLine("recognition task created, waiting ");

// Wait for the processing to complete
var percentCompleted = 0;
while (percentCompleted < 100)
{
Console.CursorLeft = 0;
Console.Write(percentCompleted + "%");
percentCompleted = service.GetBatchPercentCompleted(batchId);
System.Threading.Thread.Sleep(500);
}
Console.CursorLeft = 0;
Console.WriteLine("complete...");

Getting the results and displaying the captured data

From each document, only three fields are displayed:

·Addressing

·First Name

·Last Name

// Get the results
var documents = service.GetDocuments(sessionId, batchId);
if (documents == null) return;
// XML names required for parsing the XML results
var docs = XName.Get("Documents", "http://www.abbyy.com/FlexiCapture/Schemas/Export/FormData.xsd");
var banking = XName.Get("_Banking_eng", "http://www.abbyy.com/FlexiCapture/Schemas/Export/Banking_eng.xsd");
// Iterate all the results and display the on the screen
foreach (var document in documents)
{
if (document.Id == 0) continue;
// Get the XML file with the recognized data
var attachedFile = service.LoadDocumentResult(sessionId, batchId, document.Id, "Result.xml");
if (attachedFile.Bytes == null) continue;
// Open the results in XML
var xml = XDocument.Load(new MemoryStream(attachedFile.Bytes));
var docsElement = xml.Element(docs); // Container for recognized data
if (docsElement == null) continue;
var result = docsElement.Element(banking);
if (result == null) continue;
// Get the required data
var addressing = result.Element("_Addressing");
var surname = result.Element("_Last_Name");
var name = result.Element("_First_Name");
// Display the data
Console.WriteLine("- " +
(addressing == null ? "" : addressing.Value) + " " +
(name == null ? "" : name.Value) + " " +
(surname == null ? "" : surname.Value)
);
}

Closing the session

service.DeleteBatch(sessionId, batchId);
service.CloseProject(sessionId, projectId);
service.CloseSession(sessionId);


Example of manual processing

Show/Hide Hidden Text

This example shows how you can create an additional stage of manual data processing. For example, this stage can be used by the security department of your company. The security department may check and confirm sending of documents that meet specific conditions for further processing and reject documents that do not meet these conditions.

All confirmed documents are being accompanied by a set of bytes that imitate a digital signature.

You can download the project and materials here: http://help.abbyy.com/

The example code performs the following steps:

·Configures the connection

·Starts working with the project

·Gets and processes the list of tasks

·Processes each task at the service stage

·Uploads the file to the server

·Closes the session

To proceed with this example:

Start UserStageExample.sln in Visual Studio 2013 or newer versions:

1. Enter the URL of the Application Server.

2. Select an authentication type.

3. Click Login.

Configuring the connection

private const string FlexiHandlerPath = "/FlexiCapture12/Server/{0}API/v1/Soap"; // Path to FlexiCapture API
private const string FlexiCaptureAuthPart = "FCAuth/"; // Path to authenticate FlexiCapture
private const string UserStageProjectName = "UserStageExample"; // The name of the project used in this example
private const string UserStageName = "Service"; // The name of the service stage

// Creating new binding
var binding = new BasicHttpBinding();

// The size of a message it too small for FlexiCapture and we need to increase it
binding.MaxReceivedMessageSize = MessageSize;

// Selecting a new connection security mode depending on a protocol
binding.Security.Mode = serverUri.Scheme == Uri.UriSchemeHttps
? BasicHttpSecurityMode.Transport
: BasicHttpSecurityMode.TransportCredentialOnly;

// Selecting the authentication method
binding.Security.Transport.ClientCredentialType = windowsAuth
? HttpClientCredentialType.Windows
: HttpClientCredentialType.Basic;

// Selecting the path to API depending on the authentication method
var externalSuffix = windowsAuth ? string.Empty : FlexiCaptureAuthPart;
var remoteAddress = new EndpointAddress(new Uri(serverUri, string.Format(FlexiHandlerPath, externalSuffix)));

// Creating a SOAP client
_client = new FlexiCapture.FlexiCaptureWebServiceSoapClient(binding, remoteAddress);

// To authenticate FlexiCapture, specify a login and password
if (_client.ClientCredentials != null && !windowsAuth)
{
_client.ClientCredentials.UserName.UserName = login;
_client.ClientCredentials.UserName.Password = password;
}
Starting working with the project
// Open the session
_sessionId = _client.OpenSession(RoleType, WorkstationType);
var projectGuid = string.Empty;

// Find the required project
foreach (var project in _client.GetProjects())
{
if (project.Name == UserStageProjectName)
{
projectGuid = project.Guid;
}
}
if (string.IsNullOrEmpty(projectGuid))
{
MessageBox.Show("The server does not contain the UserStageExample project which is needed for this example");
}

// Open the project
_projectId = _client.OpenProject(_sessionId, projectGuid);

// Find and save the service stage identifier
var stages = _client.GetProcessingStages(_projectId, 0, 0, UserStageName);
if (stages.Count != 1) throw new Exception("Invalid project");
_serviceStageId = stages[0].Id;

// Find and save the external ID of the exceptions stage
stages = _client.GetProcessingStages(_projectId, 0, ExceptionStageType, string.Empty);
if (stages.Count != 1) throw new Exception("Invalid project");
_exceptionsStageId = stages[0].ExternalId;

Getting and processing the list of tasks that are pending at the service stage

// Getting the list of tasks
var tasks = _client.GetAvailableTasksByStageId(_sessionId, _projectId,
new FlexiCapture.stageIds() { _serviceStageId }, false);
var result = new Dictionary<int, Task>();
if (tasks == null || tasks.Count == 0) return result;
foreach (var task in tasks)
{
// For each task an object of the Task type is created
var item = new Task
{
Id = task.Id,
BatchId = task.BatchId
};
// Getting the list of documents of the task
var documents = _client.GetTaskDocuments(task.Id);
if (documents == null || documents.Count == 0) continue;
foreach (var document in documents)
{
// Loading the XML of the task
var file = _client.LoadDocumentResult(_sessionId, document.BatchId, document.Id, "DocumentBody"); // "DocumentBody" - the name of the file that contains recognized data
if (file == null || file.Bytes == null) continue;
// Disassembling XML
var doc = new Document(document.Id, XDocument.Load(new MemoryStream(file.Bytes)));
// Saving the disassembled list of documents
item.Documents.Add(document.Id, doc);
}
result.Add(item.Id, item);
}

Sending the task for further processing

var ids = new FlexiCapture.docIds();
foreach (var rejectedDocument in rejectedDocuments)
{
ids.Add(rejectedDocument.Id);
}
if (ids.Count > 0)
{
_client.CreateTask(_sessionId, batchId, _exceptionsStageId, 0, "Rejection reason", 0, ids, false);
}
_client.OpenBatch(_sessionId, batchId);
var hasDocuments = false;
try
{
var uri = _client.Endpoint.Address.Uri.OriginalString.Replace("/API/v1/Soap", "/FileService/v1");
foreach (var document in acceptedDocuments)
{
hasDocuments = true;
var buffer = new byte[SignatureSize]; // The size of the digital signature added to documents: 1024
_rng.GetBytes(buffer);
//DocumentAttachment: The attachment type (9 - document attachment)
_client.SaveAttachment(_sessionId, DocumentAttachment, document.Id, batchId, _projectId, new FlexiCapture.File
{
Bytes = buffer,
Name = "Signature.dat"
});
document.CreateStamp();
UploadTextFileToServer(new Uri(uri),
_client.ClientCredentials.UserName.UserName,
_client.ClientCredentials.UserName.Password,
document.GetXml(), 0, _sessionId, _projectId,
batchId, 0, document.Id, 0, "DocumentBody"
).Wait();
}
};

Uploading the file to the server

private static async Task<string> UploadTextFileToServer(Uri server, string login, string password,
string stream, int objectType, int sessionId, int projectId, int batchId, int parentId,
int objectId, int version, string streamName)
{
var creds = CredentialCache.DefaultNetworkCredentials;
if (!string.IsNullOrEmpty(login)) creds = new NetworkCredential(login, password);
using (var handler = new HttpClientHandler { Credentials = creds })
using (var client = new HttpClient(handler))
{
var encodedStreamName = Convert.ToBase64String(Encoding.Unicode.GetBytes(streamName));
var content = new MultipartFormDataContent
{
{new StringContent("Save"), "Action"},
{new StringContent(objectType.ToString()), "objectType"},
{new StringContent(sessionId.ToString()), "sessionId"},
{new StringContent(projectId.ToString()), "projectId"},
{new StringContent(batchId.ToString()), "batchId"},
{new StringContent(parentId.ToString()), "parentId"},
{new StringContent(objectId.ToString()), "objectId"},
{new StringContent(version.ToString()), "version"},
{new StringContent(encodedStreamName), "streamName"},
{new ByteArrayContent(Encoding.Unicode.GetBytes(stream)), "blob", "data.txt"}
};
var msg = client.PostAsync(server, content).Result;
return await msg.Content.ReadAsStringAsync();
}
}

Closing the session

_client.CloseProject(_sessionId, _projectId);
_client.CloseSession(_sessionId);


Integrating Web Stations into third-party systems

ABBYY FlexiCapture 12 allows you to integrate its Verification stage into a third-party system, such as Microsoft SharePoint. ABBYY FlexiCapture 12 must be connected to the third-party system by means of Single Sign-On technology.

First, you need to create an <iframe> child element.

·Integrating the verification stage

·Integrating the scanning stage

Once the message from the <iframe> element is processed, the integrated Verification Station can be closed down so that the user can resume his/her work with the third-party system.

note Note: The developer must direct the user from the final page back to the third-party system.


Integrating the verification stage

Show/Hide Hidden Text

The instructions provided in this section assume that Windows authentication is used. Alternatively, you can use FlexiCapture or SAML authentication.

To load the Verification Station GUI and functionality into the <iframe> element, set the value of the src attribute to:

<stationUrl>/WinAuth/Verify?projectId=[project identifier]&roleId=[role identifier]&stageId=[stage identifier]&disableSendToStage=false&hideTaskInfo=false&disableChangeDefinition=false&taskId=[Itask identifier]&loadInColor=true&returnTo=DeadEnd&mode=mini, where:

Name

Obligatory

Description

<stationUrl>

galochka

The address of the Verification Station to be accessed by the third-party system. The default value is <serverName>/FlexiCapture12/Verification.

WinAuth

Windows authentication parameter.

projectId

This parameter is obligatory if taskId is not specified

The ID of the project. If only project ID is specified, a random task will be taken from among the tasks available in this project.

roleId

The ID of the Operator’s role. This parameter is not dependent on any of the other parameters. If no role ID is specified, the top-most role allowed for the user will be used for the task.

stageId

The ID of the stage from which to take the task.

disableSendToStage

If this parameter is set to true, the user will not have the option to send tasks to processing of his choice stage. The default setting is false, i.e. the Send Task to Stage... button is displayed in the GUI.

hideTaskInfo

If this parameter is set to true, the user will not have the option to view the information about the current batch. The default setting is false, i.e. the Batch Information button is displayed in the GUI.

disableChangeDefinition

If this parameter is set to true, the user will not have the option to change page sections, Document Definitions, or recognition settings. The default setting is false, i.e. all the corresponding buttons are displayed in the GUI.

taskId

This parameter is obligatory if projectId is not specified

The ID of the task that requires verification. If this parameter is not specified, a random task that meets the other parameters will open.

loadInColor

Determines the color scheme of the image that is being loaded. If this parameter is set to true, a color image will be loaded. If this parameter is set to false, a black-and-white image will be loaded.

note Note: If this parameter is not specified, the color scheme of the image will be determined by the settings of the Verification Station.

returnTo=DeadEnd

Directs the user to the final page once the task is processed. The user will not be able to continue working with the integrated Verification Station.

mode=mini

Switches the page to minimal mode (the station's header and footer will not be displayed).

Users will interact with the integrated Verification Station in the same manner they interact with non-integrated Verification Stations in the standard processing scenario. A customized menu is used for forwarding tasks to the next stage and for exiting the integrated Verification Station.

You can set up the integrated Verification Station by editing the keys in the <appSettings> section of the Web.config file. To disable a menu item, set the corresponding key to true:

·DisableSendToRescan – sends a task to the Re-scanning stage

·DisableTaskPostponement – postpones a task

·DisableSendToStage – sends a task to a specific stage

·DisableSendToExceptions – sends a task to Exceptions

We recommend disabling the display of the Verification Station header and footer. This will ensure that the user can only access a specific batch and will not see the program features unrelated to the task at hand. This can be achieved by adding the suffix ?mode=mini to the URL or by setting the Headless key to true.

When the user finishes processing the task and exits the integrated Verification Station, the postMessage method is used to pass one of the following messages to the parent element:

·FC_Verification_TaskClosed – The task was closed and sent to the Export stage.

·FC_Verification_TaskSentToStage – The task was sent to another stage.

·FC_Verification_TaskSentToExceptions – The task was sent to Exceptions.

·FC_Verification_TaskPostponed – The task was postponed.

·FC_Verification_TaskSentToRescan – The task was sent to the Re-scanning stage.

·FC_Verification_CantGetTask – The program failed to get the task for some reason.

·FC_Verification_TaskRejected – The task was rejected.

Sample code for receiving a message from the parent element

window.addEventListener("message", receiveMessage, false);

function receiveMessage(event) {

alert("Received event: "+ event.data);

}

Once the message from the <iframe> element is processed, the integrated Verification Station can be closed down so that the user can resume his/her work with the third-party system.


Integrating the scanning stage

Show/Hide Hidden Text

The instructions provided in this section assume that Windows authentication is used. Alternatively, you can use FlexiCapture or SAML authentication.

To load the Scanning Station GUI and functionality, use the <iframe> element.

The following scenarios are supported:

Creating a batch

To create and open a new batch with certain registration parameters, set the value of the src attribute to:

<stationUrl>/WinAuth/Manage/Create?projectId=[Project ID]&batchTypeName=[batch type name]&batchName=[batch name]&regparam=[name:value], where

Name

Obligatory

Description

<stationUrl>

galochka

The address of the Scanning Station to be accessed by the third-party system. The default value is <serverName>/FlexiCapture12/Scanning.

WinAuth

galochka

Windows authentication parameter.

Create

galochka

The name of the command that creates a new batch.

projectId

galochka

The ID of the project where the batch is to be created.

batchTypeName

galochka

The type of the batch to be created.

batchName

A name for the new batch. If no name is specified, the program will select a name based on the settings of the selected batch type.

regparam

A registration parameter in the format "name:value". The regparam registration parameter must be specified in the settings of the batchTypeName batch type on the web station. Otherwise, this parameter will be ignored.

note Note: You can pass more than one registration parameter by joining multiple parameters with the "&" symbol.

Opening a batch

To open an existing batch with certain registration parameters, set the value of the src attribute to:

<stationUrl>/WinAuth/Manage/Open?projectId=[Project ID]&batchName=[new batch name]&regparam=[name:value], where

Name

Obligatory

Description

<stationUrl>

galochka

The address of the Scanning Station to be accessed by the third-party system. The default value is <serverName>/FlexiCapture12/Scanning.

WinAuth

galochka

Windows authentication parameter.

Open

galochka

The name of the command that opens an existing batch.

warning Important! If there is more than one batch in the project, the alphabetically first batch will be taken.

projectId

galochka

The ID of the project that contains the batch to be opened.

batchName

A new name for the batch. Use this parameter if you want to rename the batch.

regparam

A registration parameter in the format "name:value". The regparam registration parameter must be specified in the settings of the batchTypeName batch type on the web station. Otherwise, this parameter will be ignored.

note Note: You can pass more than one registration parameter by joining multiple parameters with the "&" symbol.

warning Important! You can only open a batch that has not yet been uploaded to the server.

Opening a requested batch and creating a new batch if the requested batch does not exist

To open a requested batch and create a new batch if the requested batch does not exist, set the value of the src attribute to:

<stationUrl>/WinAuth/Manage/OpenOrCreate?projectId=[Id проекта]&batchTypeName=[batch type name]&batchName=[batch name]&regparam=[name:value], where

Name

Obligatory

Description

<stationUrl>

galochka

The address of the Scanning Station to be accessed by the third-party system. The default value is <serverName>/FlexiCapture12/Scanning.

WinAuth

galochka

Windows authentication parameter.

OpenOrCreate

galochka

The name of the command that opens a requested batch or creates a new batch if the requested batch does not exist.

projectId

galochka

The ID of the project that contains the batch to be opened/created.

batchTypeName

galochka

The type of the batch to be opened/created.

batchName

A new name for the batch.

Use this parameter if you want to rename the existing batch or assign a name to a new batch.

If this parameter is not used while creating a new batch, the program will select a name based on the settings of the selected batch type.

regparam

A registration parameter in the format "name:value". The regparam registration parameter must be specified in the settings of the batchTypeName batch type on the web station. Otherwise, this parameter will be ignored.

note Note: You can pass more than one registration parameter by joining multiple parameters with the "&" symbol.

warning Important! You can only open a batch that has not yet been uploaded to the server.

Getting a rescanning task

To get a rescanning task, set the value of the src attribute to:

<stationUrl>/WinAuth/Manage/GetRescan?projectId=[Id проекта]&batchName=[new batch name]&regparam=[name:value], where

Name

Obligatory

Description

<stationUrl>

galochka

The address of the Scanning Station to be accessed by the third-party system. The default value is <serverName>/FlexiCapture12/Scanning.

WinAuth

galochka

Windows authentication parameter.

GetRescan

galochka

The name of the command that gets an existing rescanning task.

warning Important! If there is more than one task in the project, the alphabetically first task will be taken.

projectId

galochka

The ID of the project that contains the batch to be rescanned.

batchName

A new name for the batch. Use this parameter if you want to rename the batch to be rescanned.

regparam

A registration parameter in the format "name:value". The regparam registration parameter must be specified in the settings of the batchTypeName batch type on the web station. Otherwise, this parameter will be ignored.

note Note: You can pass more than one registration parameter by joining multiple parameters with the "&" symbol.

When the user is finished working with the batch and exits the integrated Scanning Station, the postMessage method is used to pass the FC_Scanning_TaskClosed message to the parent element. The final page will open. The developer must direct the user from the final page back to the third-party system.

note Note: Use URL encoding if you need to pass non-English (e.g. Japanese) characters as parameter values in the URL.


Ограничения при использовании iFrame

Navigation: Integrating Web Stations into third-party systems >

Return to chapter overview

iFrame restrictions

SameSite updates for cookie files

SameSite is a security feature designed to stop third-party domains from creating cookie files until the user has navigated to their website. This feature helps prevent third parties from using browser cookies to keep track of users online and the websites that they visit. In February 2020, the SameSite security feature created by Google for Chrome 80 and later will undergo several changes. The SameSite attribute for cookie files will have to be set to one of the following three values:

·Strict prevents all cookie files from being sent.

·Lax prevents some types of cookie files from being sent between websites (images and iFrame). This value is specified by default.

·None does not place any restrictions on cookie files.

This means that starting from Chrome 80, you will not be able to use the product in iFrame over the unsecured HTTP protocol. Attempting to do so will result in the following error: "Due to browser policy restrictions, this URL cannot be opened using the insecure HTTP protocol. Please use the secure HTTPS protocol or change your browser policy". The error message will also include the following link to the Chrome website: https://www.chromium.org/updates/same-site. This error can affect Google Chrome and Microsoft Edge. As a workaround, enable the SameSite by default сookies option in your browser settings.

Enabling SameSite by default in Google Chrome

To enable the feature, do the following:

1.Navigate to chrome://flags/

2.Enable the SameSite by default сookies mode.

3.Restart your browser in order for the changes to take effect.

4.Open your website and verify that the development tool console works as intended in your browser.

Enabling SameSite by default in Microsoft Edge

To enable the feature, do the following:

1.Navigate to edge://flags/

2.Enable the SameSite by default сookies mode.

3.Restart your browser in order for the changes to take effect.

4.Open your website and verify that the development tool console works as intended in your browser.

Updates for other browsers

Other browsers such as Firefox will implement the following changes for dealing with cookie files:

·Cookie files without the SameSite attribute will be treated as "SameSite= Lax". If third-party access is required, update your cookies to have the SameSite attribute.

·Cookie files that require third-party access should have the following attribute: "SameSite=None; Secure".


Configuring additional settings and customizing Web Stations

This section provides instructions for customizing the appearance of Web Stations and fine-tuning some of their additional settings.

The user can customize certain elements of the interface of the ABBYY FlexiCapture 12 Web Stations and transitions between Web Stations.

listPicture Customizing Web Stations

listPicture Customization settings

listPicture Web.config file: keys used for configuring Web Stations


Changing the interface language

By default, the Web Stations will have the same interface language as was selected when installing the Application Server. This interface language will be used when a Web Station is first launched on a particular computer. Users will be able to select a different interface language in their browsers. Information about the selected interface language will be saved to a cookie file and this interface language will be used next time the Web Station is launched. You can change the default language for all the Web Stations by modifying the following registry key on the computer where the Application Server is installed: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ABBYY\FlexiCapture\12.0\Fine Objects.

The table below lists the supported interface languages and their corresponding registry key values:

Interface language | Value
English | 0
Russian | 1
German | 2
French | 3
Spanish | 5
Polish | 15
Czech | 16
Hungarian | 17
Japanese | 26
Portuguese (Brazilian) | 27
Korean | 63
Chinese (Simplified) | 64

note Note: If a user clears the cookie files in their browser, the Web Stations on that user's computer will revert to their default interface language.


Customizing Web Stations

Show/Hide Hidden Text

To access the customization view of a Web Station, use the URL below:

http(s)://<server>/Flexicapture12/<station>/WinAuth/Custom
where <server> is the name of a computer where a your web server is installed, <station> is the name of the Web Station, and WinAuth is the Windows authentication parameter.

The customization view is a page with an <iframe> element that opens an embedded version of the corresponding Web Station.

The <iframe> element opens only the workspace of the Web Station, without the header and the footer. The layout of the page can be changed to comply with your company's design guidelines. The page can be additionally customized to include action buttons that will control the contents of <iframe> and web links.

Sample scenarios:

Changing the logo, header, and footer

To change the logo, replace the logo.png file in the customContent directory and, if needed, configure its display in the custom.css file.

note Note: You can also edit the page layout by making changes to Index.cshtml.
Changing links to your company website and other resources

You can add links to third-party resources into Index.cshtml.
Changing the Web Station's icon to be shown in the browser window

To change the icon of the Web Station, replace the icon.ico file.

note Note: If required, modify the icon parameters and the path to the icon in Index.cshtml.
Changing the name of the page to be shown in the browser window

The name of the page can be set in the <title> tag in the Index.cshtml file.
Hiding the drop-down list of languages

To hide the list of languages, remove the corresponding element from Index.cshtml or hide it by modifying the corresponding style in custom.css.

note Note: To set a default language, use the FCUserLang cookie file, where a user interface language can be specified using a standard abbreviation like "en," "ru," etc.
Opening a Web Station

To open a desired Web Station in <iframe>, call one of the following two methods in the onLoad() function in the custom.js file.

·To open the Web Verification Station, call the verify() method.

·To open the Web Scanning Station, call the scan() method.

These methods can also be called from page elements, so as to switch between Web Stations interactively.
Changing the session lifetime

To set the lifetime of an user session, modify the values of the following keys in the web.config file of the corresponding Web Station:

1.Set SessionRefreshInterval to 1000.

2.Set SessionInactiveLifetimeInMinutes to the preferred time in minutes.

If the user remains inactive for the specified period of time, he/she will be logged out and redirected to the login page.

Since the user page uses embedded versions of Web Stations, you can also use the API messages described in Integrating Web Stations into third-party systems.


Customization settings

Files required for customization

A customization template can be found in

C:\inetpub\wwwroot\Flexicapture12\<station>\Views\Custom\Index.cshtml

Other required content files must be loaded into

C:\inetpub\wwwroot\Flexicapture12\<station>\CustomContent

JS and CSS files will be automatically loaded onto the user page.

Customization template

By default, C:\inetpub\wwwroot\Flexicapture12\<station>\CustomContent contains the following files:

·Custom.css – a layout template

·Custom.js – a template for the web page functions

·Icon.ico – an icon for a template page

·Logo.png – a template for a page logo

The C:\inetpub\wwwroot\FlexiCapture12\<station>\Views\Custom\Index.cshtml file contains a layout template for a customized page.

note Note: All the files include detailed comments.

You can modify or delete any of these files.

You can implement any layout of the customization page to comply with your company's design guidelines.


Web.config file: keys used for configuring Web Stations

Show/Hide Hidden Text

The configuration keys described in this section can be used with FlexiCapture 12 Release 2 Update 8 or later.

You can fine-tune Web Stations and customize certain processes by adding or modifying keys in the web.config file as described below.

1.Open the web.config in any text editor.

The folder containing the web.config file for a given Web Station can be found in <IIS Root Directory>\FlexiCapture12\<Station Name>, where <Station Name> is the name of the Web Station.

For example:

·For the Web Login Page, look in
C:\inetpub\wwwroot\FlexiCapture12\Login

·For the Web Verification Station, look in
C:\inetpub\wwwroot\FlexiCapture12\Verification

·For the Web Scanning Station, look in
C:\inetpub\wwwroot\FlexiCapture12\Scanning

·For the Administration and Monitoring Console, look in
C:\inetpub\wwwroot\FlexiCapture12\Monitoring

·For the Web Capture Station, look in
C:\inetpub\wwwroot\FlexiCapture12\Capture

2.In the <appSettings> section, modify or add required keys (the order of keys is unimportant).

Available web.config keys

Web Login Page

Key

Default value

Description

<add key="webpages:Version"
value="2.0.0.0" />

2.0.0.0

ASP.NET service key.

warning Important! Please avoid modifying or deleting this key.

<add key="webpages:Enabled"
value="false" />

false

ASP.NET service key.

warning Important! Please avoid modifying or deleting this key.

<add key="ScanningStationNewUrl"
value="Scanning/" />

Scanning/

This key is used for the HTML5 version of the station.

This key redirects the user from the Web Login Page to the Web Scanning Station.

warning Important! Please avoid modifying or deleting this key.

<add key="MonitoringStationUrl"
value="Monitoring/" />

Monitoring/

This key redirects the user from the Web Login Page to the Administration and Monitoring Console page.

warning Important! Please avoid modifying or deleting this key.

<add key="NoDatabaseUrl"
value="Monitoring/winauth/Main/DBConnection" />

Monitoring/
winauth/Main/
DBConnection

This key redirects the user from the Web Login Page to the Administration and Monitoring Console page, where the user can create a new database or connect to an existing database.

warning Important! Please avoid modifying or deleting this key.

<add key="WebCaptureStationNewUrl"
value="Capture/" />

Capture/

This key is used for the HTML5 version of the station.

This key redirects the user from the Web Login Page to the Web Capture Station.

warning Important! Please avoid modifying or deleting this key.

<add key="ApplicationServer"
value="localhost" />

localhost

Specifies the address of the Application Server. Specify localhost if the station and the Application Server are located on the same computer.

warning Important! Please avoid modifying or deleting this key.

<add key="ScanningStationNewUrlWin"
value="Scanning/WinAuth/" />

Scanning/
WinAuth/

This key is used for the HTML5 version of the station.

This key redirects the user from the Web Login Page to the Web Scanning Station.

warning Important! This key works only if Windows authentication is used to log in.

<add key="VerificationStationNewUrlWin"
value="Verification/WinAuth/" />

Verification/
WinAuth/

This key is used for the HTML5 version of the station.

This key redirects the user from the Web Login Page to the Web Verification Station.

warning Important! This key works only if Windows authentication is used to log in.

<add key="MonitoringStationUrlWin"
value="Monitoring/WinAuth/" />

Monitoring/
WinAuth/

This key redirects the user from the Web Login Page to the Administration and Monitoring Console page.

warning Important! This key works only if Windows authentication is used to log in.

<add key="WebCaptureStationNewUrlWin"
value="Capture/WinAuth/" />

Capture/
WinAuth/

This key is used for the HTML5 version of the station.

This key redirects the user from the Web Login Page to the web Document Capture Station.

warning Important! This key works only if Windows authentication is used to log in.

<add key="ScanStationFCLauncherUrl" value="Downloads/ScanStationInstall/
ScanStationFCLauncher.application" />

Downloads/
ScanStationInstall/
ScanStationFCLauncher
.application

Specifies the path to the folder storing the downloaded and installed Web Scanning Station file.

<add key="CookieTimeout"
value="1200" />

1200

Specifies how long cookie files should be stored (in seconds).

<add key="UseClientCertificate"
value="false" />

false

Sends the client certificate specified in the ClientCertificateThumbprint key to the Application Server (in background mode).

True – The certificate will be sent to the Application Server.

False – No certificate will be sent to the Application Server.

<add key="VerificationStationNewUrl"
value="Verification/" />

Verification/

This key is used for the HTML5 version of the station.

This key redirects the user from the Web Login Page to the Web Verification Station.

<add key="ClientCertificateThumbprint"
value="Certificate Thumbprint" />

Certificate
Thumbprint

Specifies the value of the Certificate Thumbprint property.
Web Verification Station

Key

Default value

Description

<add key="webpages:Version" value="2.0.0.0" />

2.0.0.0

ASP.NET service key.

warning Important! Please avoid modifying or deleting this key.

<add key="webpages:Enabled" value="false" />

false

ASP.NET service key.

warning Important! Please avoid modifying or deleting this key.

<add key="aspnet:MaxJsonDeserializerMembers" value="150000" />

150000

This is a service key. This key determines the maximum number of members that can be restored using JavaScriptSerializer.

warning Important! Please avoid modifying or deleting this key.

<add key="ApplicationServer" value="localhost" />

localhost

Specifies the address of the Application Server. Specify localhost if the station and the Application Server are located on the same computer.

warning Important! Please avoid modifying or deleting this key.

<add key="SessionRefreshInterval" value="60000" />

60000

Specifies how often a session should be refreshed (in milliseconds). Sessions must be refreshed in order to keep them and their licenses active..

<add key="SessionInactiveLifetimeInMinutes" value="120" />

120

Specifies the lifetime of a session (in minutes). If the user is inactive for a period that is longer than the specified lifetime, the session will be terminated and the task will be returned to the queue.

<add key="LoadColorPicturesByDefault" value="false" />

false

This key is responsible for the color scheme in the central portion of the page.

True – The central portion is in color and there is no flag icon in the center menu.

False – The central portion is in black-and-white and there is a flag icon in the center menu.

<add key="ReturnToQueuesAfterTaskClose" value="false" />

false

Specifies whether tasks will be taken from the queue manually or automatically.

True – Tasks will not be taken from the queue automatically. When closing the current task, the user will be redirected to the page where the next task can be chosen.

False – Tasks will be taken from the queue automatically. When the user closes the current task, the next task will be taken from the queue automatically.

<add key="RuleCheckTimeoutInSeconds" value="3000" />

3000

Sets the timeout for checking rules (in seconds). Once the specified time period expires, the task will be canceled and returned into the queue. Any changes made by the operator will be lost.

<add key="LoginStationUrl" value="../Login" />

../Login

Specifies the path to be used for logging in to the station.

note Note: You can use this key to customize the URL or specify the address of your proxy server.

<add key="UseAuthenticationTicket" value="true" />

true

Specifies whether the operator will be able to access the Web Verification Station from the Login page.

True – The operator will be able to access the Web Verification Station without using Windows authentication.

False – Windows authentication will be required in order to access the Web Verification Station.

<add key="ShowSuggestsOnTyping" value="true" />

true

Specifies whether suggestions will be shown to the operator when typing text in fields.

True – When the operator starts typing text in a field, possible values for that field will be displayed.

False – No possible values will be displayed.

<add key="CloneSuggestsForNewInstance" value="true" />

true

Specifies whether suggestions will be shown for a field in a group of fields. When the user creates a new group inside a repeating group, a list of possible values can be shown for the fields with predefined values.

True – Possible values will be displayed.

False – No possible values will be displayed.

<add key="MinimizeInstanceMenu" value="true" />

true

Changes the appearance of the repeating groups/fields menu on the data form.

True – The menu will appear as three vertical dots.

False – The menu will appear as a numbered list.

<add key="DisableSendToRescan" value="false" />

false

Specifies whether the operator will be able to send tasks to the rescanning stage.

True – The operator will not be able to send tasks to the rescanning stage.

False – The operator will be able to send tasks to the rescanning stage.

<add key="DisableTaskPostponement" value="false" />

м

false

Specifies whether the operator will be able to postpone tasks.

True – The operator will not be able to postpone tasks.

False – The operator will be able to postpone tasks.

<add key="DisableSendToStage" value="false" />

false

Specifies whether the operator will be able to send tasks to desired stages.

False – The operator will be able to send a task to a desired stage handled by another operator, specifying its priority and providing a comment.

True – The operator will be able to send a task to a desired stage handled by another operator.

<add key="DisableSendToExceptions" value="false" />

false

Specifies whether the operator will be able to send tasks to the exceptions queue.

False – The operator will be able to send tasks to the exceptions queue.

True – The operator will not be able to send tasks to the exceptions queue.

<add key="DisableReject" value="false" />

false

Specifies whether the operator will be able to reject tasks.

False – The operator will be able to reject tasks and send them back to their original queue.

True – The operator will not be able to reject tasks.

<add key="DisableCustomForm" value="false" />

false

Changes the appearance and structure of the fields on the data form.

False – The appearance and structure of the fields on the data form will be the same as defined in the Document Definition.

True – The default fonts will be used for the fields on the data form and they will be arranged in one column.

<add key="DisableRegionBinding" value="false" />

false

Specifies whether the operator will be able to select a field when drawing a region on an image.

False – When the operator draws a region, a table with suggested fields will appear.

True – The operator will not be able to draw a region unless the operator selects the required field on the data form first.

<add key="CanDownloadBatchResult" value="false" />

false

Specifies whether the operator will be able to download archives export results (for exported batches with "Processed" status).

True – The operator will be able to download batch export results on the Web Verification Station.

False – The operator will not be able to download batch export results.
Web Scanning Station
Key | Default value | Description
<add key="webpages:Version" value="2.0.0.0" /> | 2.0.0.0 | ASP.NET service key. warning Important! Please avoid modifying or deleting this key.
<add key="webpages:Enabled" value="false" /> | false | ASP.NET service key. warning Important! Please avoid modifying or deleting this key.
<add key="aspnet:MaxJsonDeserializerMembers" value="150000" /> | 150000 | This is a service key. This key determines the maximum number of members that can be restored using JavaScriptSerializer. warning Important! Please avoid modifying or deleting this key.
<add key="ApplicationServer" value="localhost" /> | localhost | Specifies the address of the Application Server. Specify localhost if the station and the Application Server are located on the same computer). warning Important! Please avoid modifying or deleting this key.
<add key="SessionRefreshInterval" value="60000" /> | 60000 | Specifies how often a session should be refreshed (in milliseconds). Sessions must be refreshed in order to keep them and their licenses active.
<add key="SessionInactiveLifetimeInMinutes" value="120" /> | 120 | Specifies the lifetime of a session (in minutes). If the user is inactive for a period that is longer than the specified lifetime, the session will be terminated and the task will be returned to the queue.
<add key="LoginStationUrl" value="../Login" /> | ../Login | Specifies the path to be used for logging in to the station. note Note: You can use this key to customize the URL or specify the address of your proxy server.
<add key="UseAuthenticationTicket" value="true" /> | true | Specifies whether the operator will be able to access the Web Scanning Station from the Login page. True – The operator will be able to access the Web Scanning Station without using Windows authentication. False – Windows authentication will be required in order to access the Web Scanning Station.
Administration and Monitoring Console
Key | Default value | Description
<add key="webpages:Version" value="2.0.0.0" /> | 2.0.0.0 | ASP.NET service key. warning Important! Please avoid modifying or deleting this key.
<add key="webpages:Enabled" value="false" /> | false | ASP.NET service key. warning Important! Please avoid modifying or deleting this key.
<add key="ApplicationServer" value="localhost" /> | localhost | Specifies the address of the Application Server. Specify localhost if the Administration and Monitoring Console and the Application Server are located on the same computer. warning Important! Please avoid modifying or deleting this key.
<add key="LoginStationUrl" value="../Login/" /> | ../Login/ | Specifies the path to be used for logging in to the Administration and Monitoring Console. note Note: You can use this key to customize the URL or specify the address of your proxy server.
<add key="LoginRedirectParameter" value="monitoring" /> | monitoring | This key is responsible for the redirect parameter specified in the URL which returns the user to the Administration and Monitoring Console page after the user has been authenticated..
<add key="UseCRReportSystemForCustomReportOnly" value="true" /> | true | Allows creating custom reports using Crystal Reports. This key is not included in the web.config file by default (for details, see About ABBYY FlexiCapture Custom Reports).
<add key="UseClientCertificate" value=" false" /> | false | Sends the client certificate specified in the ClientCertificateThumbprint key to the Application Server (in background mode). True – The certificate will be sent to the Application Server. False – No certificate will be sent to the Application Server.
<add key="ClientCertificateThumbprint" value="Certificate Thumbprint" /> | Certificate Thumbprint | Specifies the value of the Certificate Thumbprint property.
Web Capture Station

Key

Default value

Description

<add key="webpages:Version" value="2.0.0.0" />

2.0.0.0

ASP.NET service key.

warning Important! Please avoid modifying or deleting this key.

<add key="webpages:Enabled" value="false" />

false

ASP.NET service key.

warning Important! Please avoid modifying or deleting this key.

<add key="aspnet:MaxJsonDeserializerMembers" value="150000" />

150000

This is a service key. This key determines the maximum number of members that can be restored using JavaScriptSerializer.

warning Important! Please avoid modifying or deleting this key.

<add key="ApplicationServer" value="localhost" />

localhost

Specifies the address of the Application Server. Specify localhost if the station and the Application Server are located on the same computer.

warning Important! Please avoid modifying or deleting this key.

<add key="SessionRefreshInterval" value="60000" />

60000

Specifies how often a session should be refreshed (in milliseconds). Sessions must be refreshed in order to keep them and their licenses active.

<add key="SessionInactiveLifetimeInMinutes" value="120" />

120

Specifies the lifetime of a session (in minutes). If the user is inactive for a period that is longer than the specified lifetime, the session will be terminated and the task will be returned to the queue..

<add key="LoginStationUrl" value="../Login" />

../Login

Specifies the path to be used for logging in to the station.

note Note: You can use this key to customize the URL or specify the address of your proxy server.

<add key="UseAuthenticationTicket" value="true" />

true

Specifies whether the operator will be able to access the Web Verification Station from the Login page.

True – The operator will be able to access the Web Verification Station without using Windows authentication.

False – Windows authentication will be required in order to access the Web Verification Station.

<add key="LoadColorPicturesByDefault" value="false" />

false

This key is responsible for the color scheme in the central portion of the page.

True – The central portion is in color and there is no flag in the check box in the center menu.

False – The central portion is in black-and-white and there is a flag in the check box in the center menu.

<add key="ShowSuggestsOnTyping" value="true" />

true

Specifies whether suggestions will be shown to the operator when typing text in fields.

True – When the operator starts typing text in a field, possible values for that field will be displayed.

False – No possible values will be displayed.

<add key="CloneSuggestsForNewInstance" value="true" />

true

Specifies whether suggestions will be shown for a field in a group of fields. When the user creates a new group inside a repeating group, a list of possible values can be shown for the fields with predefined values.

True – Possible values will be displayed.

False – No possible values will be displayed.

<add key="RuleCheckTimeoutInSeconds" value="3000" />

3000

Sets the timeout for checking rules (in seconds). Once the specified time period expires, the task will be canceled and returned into the queue. Any changes made by the operator will be lost.

<add key="MinimizeInstanceMenu" value="true" />

true

Changes the appearance of the repeating groups/fields menu on the data form.

True – The menu will appear as three vertical dots.

False – The menu will appear as a numbered list.

<add key="DisableCustomForm" value="false" />

false

Changes the appearance and structure of the fields on the data form.

False – The appearance and structure of the fields on the data form will be the same as defined in the Document Definition.

True – The default fonts will be used for the fields on the data form and they will be arranged in one column.


Custom Reports

This section contains a description of custom reports in ABBYY FlexiCapture.


About ABBYY FlexiCapture Custom Reports

Custom reports are a powerful tool that helps users monitor the ABBYY FlexiCapture system and analyze workflow. A custom report gathers specific user defined statistics and can be viewed through the Administration and Monitoring Console.

By default, standard reports are displayed in Microsoft Report Viewer, which is included in the distribution kit of ABBYY FlexiCapture server components. Custom reports can be created in a number of applications, including Microsoft Visual Studio and Microsoft Report Builder. Data for custom reports can be gathered using these applications, a SQL query or a stored database procedure.

To develop custom reports, you will need to be fairly familiar with the application in which you want to develop them, and be able to create SQL queries and stored procedures for databases running under Microsoft SQL Server.

note Note: You can use Crystal Reports to create custom reports on the Administration and Monitoring Console. This requires Crystal Reports 13.0.11.1467 or later to be installed on the computer with the Application server. To enable Crystal Reports, specify the following key values in the <appSettings> ... </appSettings> tag in the web.config file of the Administration and Monitoring Console:

<add key="UseCRReportSystemForCustomReportOnly" value="true" />

When one of these key values is specified, reports will be generated in the PDF format without being displayed in the preview window (including the reports generated in Microsoft Reports). For more information, see How to create custom reports using Crystal Reports.


New features

Navigation: Custom reports > About ABBYY FlexiCapture Custom Reports >

Return to chapter overview

What's new in this version

The following changes were made to the ABBYY FlexiCapture database:

·Data on elements that constitute a batch is now stored in the BatchItem table.

·Added tables with statistics data: StatisticConnections (user connection statistics) and StatisticProductivity (performance statistics).

·Added the Tenant tenant table containing data on all tenants. Added the TenantId (tenant identifier) column to the BatchType table. Added the TenantId, PasswordHash, PasswordReset and SID columns to the Principal table, which contains data on users and user groups.

·Added the EnableHotFolder column to the Project table. Values in this column enable/disable hot folders in projects.

·Columns that enable setting up SLAs when using multiple tenants were added to the Project, Batch, BatchType and StatisticBatchArchive tables (SLAMinutes, SLAWarningSeconds, SLAViolationSec etc.).

·The TimeoutMinutes and CurrentEditSessionId columns containing database cleanup settings were added to the Session table. Added the EditSession table for storing batch object editing sessions.

·Added the PostponedTaskOwner column containing user identifiers and the EditSessionId column containing editing session identifiers to the Task table.

·The Page, Document, DocumentParameter and EventDocument tables were removed.


Purpose of custom reports

Custom reports are used to select and analyze data that will be used in standard reports of the Administration and Monitoring Console of ABBYY FlexiCapture. Custom reports are developed by users and enabled in the Administration and Monitoring Console. Once they are enabled, the reports can be launched by the Monitoring Operator whenever they are needed.


Enabling custom reports

In order to enable a custom report, place the report (*.rdlc or *.rdl) and the report's xml file in the FlexiCapture12\CustomReports subfolder of the IIS root folder (usually C:\Inetpub\wwwroot\FlexiCapture12\Monitoring\CustomReports), and then enable it through the Administration and Monitoring Console. Examples of custom reports are placed in this folder when FlexiCapture is installed.


Launching custom reports

Custom reports can be launched from the Custom reports menu of the Administration and Monitoring Console. This menu item is available if at least one custom report is connected (two example reports are available immediately after installation).

If all parameters of the report are known, the report is generated after you select the menu item. If not, the Operator must enter the missing parameters. If the report is based on a SQL query or a stored procedure, additional parameters must be entered through the Administration and Monitoring Console.


Creating custom reports

ABBYY FlexiCapture displays standard and custom reports in Microsoft Report Viewer. To learn how to create custom reports in Microsoft Visual Studio and Report Builder, see Creating custom reports using data sets.

The XML Description File article provides details about XML description files for custom reports. These files need to be placed into FlexiCapture's custom report folder together with the custom report file (*.rdl or *.rdlc, see Enabling Custom Reports for details).

note Note: Report information that was gathered using a SQL query or a stored database procedure will be represented as a data set. If you plan to use a stored procedure, make sure you develop it in advance and save it in the database of ABBYY FlexiCapture.

Tip.

1.Try to optimize the speed of query processing and report generation. Queries that take a while to process can slow down the whole system.

2.Try to minimize the amount of entries in your reports. Loading and displaying big reports in the Administration and Monitoring Console takes up a lot of your machine's resources and is time consuming.


Creating a Custom Report

Navigation: Custom reports > Creating custom reports >

Return to chapter overview

Creating custom reports using data sets

Show/Hide Hidden Text

Creating custom reports in Microsoft Visual Studio

1.Create a new Visual Basic Class Library in Microsoft Visual Studio:

a.In the main menu, click File → New → Project.

b.Chose Class Library element in the Templates → Visual C# menu.

2.Add a report to the project:

a.Click Add New Item on the Project menu.

b.In the Add New Item dialog box, select the Report item from the Visual C# Items → Reporting template group.

3.Associate the report with a dataset (in the Report Data pane, click New → Data Set...)

4.Select an existing data set and set its name to RepDataSet.

warning Important! This is the only name that will be used for generating reports from data in the Administration and Monitoring Console.

5.Design the report.

6.Create the *.xml file for your report.

7.Enable your custom report by copying the XML description file and the report file (*.rdlc) to FlexiCapture's report folder in the FlexiCapture12\CustomReports subfolder of the IIS root folder. When you enable your report, it will become available in the Custom reports submenu of the Administration and Monitoring Console.

Creating custom reports in Microsoft Report Builder

1.Start Microsoft Report Builder and create a data source (right-click Data Source in the Report Data pane and click Add Data Source... on the shortcut menu).
Details

1.Enable the Use a connection embedded in my report option.

2.Click ОК.

note Note: You can leave Microsoft SQL Server selected in the Select connection type drop-down list.

2.Create a dataset (right-click Datasets in the Report Data pane and click Add Data Set... on the shortcut menu) and set its name to RepDataSet.

warning Important! This is the only name that will be used for generating reports from data in the Administration and Monitoring Console.
Details

1.Enable the Use a dataset embedded in my report option.

2.Specify the data source you created earlier.

3.Click ОК.

3.Open the properties dialog box of the dataset you created (right-click RepDataSet in the Report Data pane and click Dataset Properties on the shortcut menu).

4.Select the Fields tab, provide descriptions of the dataset's fieldsand specify other report settings.

5.Create the *.xml file for your report.

6.Enable your custom report by copying the XML description file and the report file (*.rdl) to the FlexiCapture's report folder in the FlexiCapture12\CustomReports subfolder of the IIS root folder. When you enable your report, it will become available in the Custom reports submenu of the Administration and Monitoring Console.


XML description file

The XML Description File contains information about a custom report and is used to enable the report in the Administration and Monitoring Console of ABBYY FlexiCapture. Several examples of reports are enabled automatically during installation. You can study their structure and use them as an example for creating your own reports.

The XML Description File includes the following elements:

1.<customreport></customreport>
The main element of the report. Must contain the entire description of a report.
Attributes:

oName the name of the report. It will be displayed in the Administration and Monitoring Console and is a required attribute.

oType the type of your report. This is a required attribute. It can have two values: CrystalReportQuery (for reports based on Crystal Report queries) or DataSetReport (for DataSet based reports).

oDescription the description of the report that will be displayed in the Administration and Monitoring Console. This attribute is optional.

2.<crystalreportfile/>
This is a required element. It has only one attribute, Filename, which must contain the name of the report file (*.rdlc or *.rdl). The report with that name must be placed in the same catalog as the XML Description File.

note Note: Other elements are required only for DataSet based reports.

3.<storedprocedure/>
This element is required for reports based on data extracted by a stored procedure. It has only one attribute, Name, which contains the name of the stored procedure.

4.<sqlText></sqlText>
This element is required for reports based on SQL queries. The contents of the query must be entered between the opening and closing tags.

note Note: If both <storedprocedure/> and <sqlText></sqlText> tags are present in the XML Description File, the DataSet will be created by the stored procedure.

5.<parameters></parameters>
A range of parameters of the stored procedure or SQL Query. All of these elements bust be entered between the tags <parameter> and </parameter>. If no parameters are necessary to compile the DataSet, this element must not be included in the XML Description File.

6.<parameter></parameter>
Describes a parameter of a SQL query or stored procedure, and specifies details relevant to the parameters entry in the Administration and Monitoring Console. Attributes:

oName The name of the parameter. This is a required attribute. It will be transferred to the SQL query or stored procedure.

oType the type of the parameter. This is a required attribute. Possible values: Int, Date, String.

oPrompt the hint that will be displayed when a user enters this parameter. This attribute is optional.

oDefault the default value of the parameter before the user enters a different value. This is an optional attribute. Date type parameters can have the value "now", which corresponds to the current date.

By default, the user enters the values of parameters into an entry field. If the value has to be chosen from a list, add the <possiblevaluelist> element.

7.<possiblevaluelist></possiblevaluelist>
<possiblevaluelistitem /> elements are all of the possible values of a <parameter> element.

8.<possiblevaluelistitem />
Describes one of the possible values of a parameter. Attributes:

ovalue Possible value of a parameter. This attribute is required. Its type must match the type of the parameter.

odisplayvalue a row that will be displayed in the list. This attribute is optional. If this value is absent, the value attribute will be displayed.


Database structure

This section describes database tables and relationships between them.

Objects for Processing | Locks
Workflow | Access Control
Statistics | Event Log
Dictionaries

Objects for Processing

Batch | BatchItem
BatchParameter | BatchType
BatchTypeParameter | BatchTypeTemplate
DocumentSourceImage | Project
Template | TemplateVersion

Locks

EditSession | Lock
Session | TemplateLock

Workflow

ProcessingStage

Task

Access Control

Principal | PrincipalLink
PrincipalPermission | Tenant

Statistics

StatisticBatchArchive | StatisticBatchDayActivity
StatisticBatchDocumentTypeArchive | StatisticBatchParameterArchive
StatisticConnections | StatisticDocuments
StatisticExceptionTask | StatisticProductivity
StatisticTasks |

Event Log

EventLog

DocumentEditingStatistic

Dictionaries

Role | RoleProcessingStage
RoleWorkstationType | WorkstationType

Enumerators

Priority | Task Status
Types of Image Sources | Object Types
User Role Types | Station Types
Processing Stage Types | Event Types


Processing of objects

Show/Hide Hidden Text

Show diagram of relationships

Objects
Batch | BatchItem
BatchParameter | BatchType
BatchTypeParameter | BatchTypeTemplate
DocumentSourceImage | Project
Template | TemplateVersion


Batch

Purpose

Contains a list of batches.

Diagram of relationships between objects to be processed

Diagram of relationships between routing tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Batch identifier.
 | AnalyzedDocumentsCount | int | yes | The number of documents that have been analyzed.
 | AssembledDocumentsCount | int | yes | The number of assembled documents.
 | BatchPurpose | int | no | The purpose of the batch. Possible values: ·0 - batch with data ·1 - batch for training Document Definition matching ·2 - batch for training classifiers
 | BatchTypeId | int | yes | Batch type identifier. Corresponds to the entry identifier in the BatchType table. Has the value "null" for "Default " batches.
 | Comment | nvarchar | no | Batch comment.
 | CreationDate | datetime | yes | Date of batch creation.
 | CreatorId | int | no | The identifier of the user that created the batch.
 | DataVerificationSymbols | int | yes | The total number of characters to be submitted for group verification and the number of fields to be verified during field verification.
 | DocumentsCount | int | yes | The number of documents in the batch.
 | EditedSymbols | int | yes | The number of edited characters.
 | ElapsedProcessingSeconds | int | no | The time remaining or processing the batch, in seconds.
 | ErrorText | nvarchar | no | Description of batch processing errors.
 | ExportedDocumentsCount | int | yes | The number of exported documents.
 | ExternalId | nvarchar | no | External batch identifier.
 | FixedElapsedTimeValue | tinyint | no | Indicates whether ElapsedProcessingSeconds needs to be re-calculated when the batch is moved to a different processing stage. Possible values: ·0 - re-calculate ·1 (default) - do not re-calculate
 | ForcedVerifcationSymbols | int | yes | The number of characters requiring forced verification.
 | IdCounter | int | no | The counter of batch object identifiers.
 | IsDeleted | bit | yes | Deleted batch indicator.
 | LastRoutingDate | datetime | no | The last date when the batch was transferred to a different processing stage.
 | MaxDocumentPriority | int | yes | The maximum priority a document can have in the batch. For possible values, see Priority.
 | Modification | int | yes | The counter of modifications made to the batch for purposes of synchronization during parallel processing.
 | Modified | timestamp | yes | Indicates modified entries.
 | Name | nvarchar | no | The name of the batch.
 | OwnerId | int | no | The identifier of the project owner (for FrontOffice projects). Corresponds to the entry identifier in the Principal table.
 | PagesCount | int | yes | The number of pages in the batch.
 | Priority | int | yes | Batch priority. For possible values, see Priority.
 | ProcessingStageId | int | no | The identifier of the current processing stage of the batch. Corresponds to the entry identifier in the ProcessingStage table.
 | ProjectId | int | yes | The identifier of the project to which the batch belongs. Corresponds to the entry identifier in the Project table.
 | RecognizedDocumentsCount | int | yes | The number of recognized documents.
 | RecognizedSymbols | int | yes | The number of recognized characters.
 | SLABeginOfProcessing | datetime | no | The time when the processing of the batch was started for SLA purposes. By default, this time is the time when the batch was created.
 | SLAEndOfProcessing | datetime | no | The time when the processing of the batch was completed for SLA purposes.
 | SLAExpirationDate | datetime | no | Processing deadline for the batch.
 | Status | int | yes | The status of batch processing. A set of status flags.
 | TotalSymbols | int | yes | The total number of characters in the batch.
 | UncertainSymbols | int | yes | The number of recognized characters that may have been recognized incorrectly.
 | VerificationSymbols | int | yes | The number of recognized characters that require verification.
 | VerifiedDocumentsCount | int | yes | The number of verified documents.
 | WarningText | nvarchar | no | Description of batch processing warnings.

Back to top


BatchItem

Purpose

Stores all objects that constitute a batch.

Diagram of relationships between objects to be processed

List of columns

Key | Name | Type | Required | Description
PK | BatchId | int | yes | Identifier of the batch. Corresponds to the entry identifier in the Batch table.
 | Id | int | yes | Identifier.
 | IsCommited | bit | yes | Indicates that changes have been applied.
 | EditSessionId | int | yes | Identifier of the session during which the changes were made. Corresponds to the entry identifier in the EditSession table.
 | ChildrenOrder | varbinary(max) | no | The sorting order of child elements.
 | DataVerificationSymbols | int | yes | The total number of characters that require group verification and the number of fields that require field verification.
 | DocumentTemplateId | int | yes | Identifier of the Document Definition. Corresponds to the entry identifier in the Template table.
 | DocumentTemplateModificationNumber | int | yes | The modification number of the Document Definition file. Corresponds to the entry identifier in the FileModification field of the TemplateVersion table.
 | DocumentTemplateVersionNumber | int | yes | The version number of the Document Definition.
 | DoubleVerificationSymbols | int | yes | The number of characters that require double verification
 | EditedSymbols | int | yes | The number of edited characters
 | FileVersion | int | no | The version number of the file containing actual data for a batch object.
 | ForcedVerificationSymbols | int | yes | The number of characters that require verification.
 | Hierarchy | hierarchyid | no | The object's place in the object heirarchy
 | IsDeleted | bit | no | Indicates that the object has been removed
 | ItemData | varbinary(max) | no | Location for service storage of fields.
 | ItemIndex | int | no | This field is no longer used.
 | Modified | timestamp | no | Modification counter for synchronization during parallel processing.
 | NewEditSessionId | int | no | Service field
 | NextProcessingStage | int | no | Identifier of the next processing stage.
 | ParentId | int | no | Identifier of the parent object of the BatchItem table.
 | Priority | int | yes | The priority of the document. For a list of possible values, see Priority.
 | PreviousStageId | int | no | Identifier of the processing stage from which the object came.
 | ProcessingStageId | int | no | Identifier of the current processing stage of the object. Corresponds to the entry identifier in the ProcessingStage table.
 | ProhibitedUserId | int | no | Identifier of a user or a group of users who are not permitted to process the document.
 | RecognizedSymbols | int | yes | The number of recognized characters.
 | Status | int | no | The processing status of the batch. A set of system flags.
 | TotalSymbols | int | yes | The total number of characters.
 | Type | int | yes | The type of the object. Possible values: ·0 - document ·1 - page ·20 - a collection of elements note Note: This value is used for elements with ID = 0 (a top-level collection that stores the order of elements in the top-level batch)
 | UncertainSymbols | int | yes | The number of low-confidence characters
 | UserId | int | no | The identifier of the user or group to whom the document is assigned.
 | VerificationSymbols | int | yes | The number of characters requiring verification.


BatchParameter

Purpose

Contains registration parameters of batches and documents.

Diagram of relationships between objects to be processed

List of columns

Key | Name | Type | Required | Description
PK | Id | bigint | yes | Identifier of the registration parameter.
 | BatchId | int | yes | Batch identifier. Corresponds to the entry identifier in the Batch table.
 | Name | nvarchar | no | Name of the registration parameter.
 | ParameterId | int | yes | External identifier of the parameter's type. Corresponds to the value of ExternalId in the BatchTypeParameter table.
 | Value | nvarchar | no | Value of the registration parameter.


BatchType

Purpose

Contains a list of batch types.

Diagram of relationships between objects to be processed

Diagram of relationships between routing tables

Diagram of relationships between access control tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Batch type identifier.
 | Description | nvarchar | no | Description of batch type.
 | FileVersion | int | yes | File version number.
 | IsDeleted | bit | yes | Indicates that a batch has been deleted.
 | Modified | rowversion | yes | Indicates that a batch has been modified.
 | Name | nvarchar | yes | Name of batch type.
 | ProjectId | int | yes | Identifier of the project a batch belongs to. Corresponds to the entry identifier in the Project table.
 | SLAMinutes | int | no | The time limit within which the batch needs to be processed, in minutes. No time limit if unspecified.
 | SLAWatningSeconds | int | no | The time the batch can remain in processing before a warning about long processing times is issued.


BatchTypeParameter

Purpose

Registration parameters of batch types.

Diagram of relationships between objects to be processed

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Identifier of batch type parameter.
 | BatchTypeId | int | yes | Identifier of the batch that the parameter belongs to. Corresponds to the entry identifier in the BatchType table.
 | ExternalId | int | yes | External identifier. Used for matching values of registration parameters to their descriptions.
 | IsRequired | bit | yes | Indicates that the parameter must be specified.
 | Name | nvarchar | yes | Name of the batch type parameter.


BatchTypeTemplate

Purpose

Contains information about relationships between batch types and Document Definitions.

note Note: If this table contains no information about relationships between Document Definitions and a batch type, that batch type will use all of the Document Definitions in the project.

Diagram of relationships between objects to be processed

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Entry identifier.
 | BatchTypeId | int | no | Batch type identifier. Corresponds to the entry identifier in the BatchType table.
 | ProjectId | int | yes | Project identifier.
 | TemplateId | int | yes | Document Definition identifier. Corresponds to the entry identifier in the Template table.


DocumentSourceImage

Purpose

Shortcuts to image file that are attached to documents.

Diagram of relationships between objects to be processed

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Identifier of attached file.
 | BatchId | int | no | Identifier of the batch. Corresponds to the entry identifier in the Batch table.
 | DocumentId | int | yes | Identifier of a document. Corresponds to the entry identifier in the BatchItem table.
 | FilePath | nvarchar | yes | Path to the image file.


Project

Purpose

Contains a list of Recognition Server projects.

Diagram of relationships between objects to be processed

Diagram of relationships between routing tables

Diagram of relationships between access control tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Project identifier.
 | CreationDate | datetime | yes | The date of the creation of a project.
 | EnableHotFolder | tinyint | yes | Indicates whether hot folders are enabled for the project. The default value is 0.
 | FileVersion | int | yes | Version of the project file.
 | Flags | int | yes | Flags that describe a project's status.
 | Guid | uniqueidentifier | yes | Unique identifier of a project.
 | LinkedGuid | uniqueidentifier | no | Unique identifier of a parent project (for test copies).
 | Name | nvarchar | no | Project name.
 | OwnerId | int | no | Identifier of the owner of a project (for test copies). Corresponds to the entry identifier in the Principal table.
 | SLAMinutes | int | no | The time limit within which the batch needs to be processed, in minutes. No time limit if unspecified.
 | SLAWarningSeconds | int | no | The time before a warning about long processing times is issued for the batch.
 | TenantId | int | no | Identifier of the tenant.


Template

Purpose

Contains a list of Document Definitions.

Diagram of relationships between objects to be processed

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Identifier of a Document Definition.
 | GUID | uniqueidentifier | yes | Unique identifier of a Document Definition.
 | IsDeleted | bit | yes | Indicates that a Document Definition has been deleted.
 | IsDisabled | bit | yes | Indicates that a Document Definition has been disabled.
 | Modified | timestamp | yes | Document modification tag.
 | ProjectId | int | yes | Identifier of the project to which a Document Definition belongs to. Corresponds to the entry identifier in the Project table.
 | TemplateIndex | int | yes | Index number of a Document Definition in a project. If a Document Definition is deleted, the index numbers of other definitions remain the same.


TemplateVersion

Purpose

Contains information about Document Definition versions.

Diagram of relationships between objects to be processed

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Entry identifier.
 | FileModification | int | yes | Modification number of the Document Definition file.
 | IsFlexibleMultipage | bit | yes | Tag of a flexible multi-page Document Definition.
 | Name | nvarchar | yes | Name of a Document Definition.
 | TemplateId | int | yes | Identifier of a Document Definition. Corresponds to an entry identifier in the Template table.
 | Version | int | yes | Version number of a Document Definition.


Locks

Show/Hide Hidden Text

Show diagram of relationships

Locks
EditSession | Lock
Session | TemplateLock


EditSession

Purpose

Stores all batch object editing sessions.

Diagram of relationships between lock tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Identifier of the batch object editing session.
 | BatchId | int | yes | Identifier of the batch. Corresponds to the entry identifier in the Batch table.
 | TaskId | int | no | Identifier of the task. Corresponds to the entry identifier in the Task table.
 | ParentSessionId | int | no | Identifier of the parent session.


Lock

Purpose

Contains information about locked objects.

Diagram of relationships between lock tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Identifier of the lock.
 | LockType | int | yes | Lock type. Currently not in use, its value is set to 0.
 | Modified | timestamp | no | Modification counter for synchronization during parallel processing
 | ObjectType | int | yes | Locked object type. Possible values are listed in Object Type.
 | ObjectId | int | yes | Identifier of the locked object.
 | SessionId | int | yes | Identifier of the session during which the lock was created.


Session

Purpose

Contains information about current work sessions of users. Also used for managing resources allocated for sessions and locks.

Diagram of relationships between lock tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Identifier of a connection session.
 | CreationDate | datetime | yes | Date and time of the creation of a session.
 | CurrentEditSessionId | int | no | Identifier of the current editing session from the EditSession table
 | CurrentTaskId | int | no | Identifier of the current task.
 | CurrentTaskStartTime | datetime | no | Date and time when processing of the current task was started.
 | InstanceId | int | yes | Identifier of the process to which a session belongs.
 | LastAccess | datetime | yes | Date and time of the last query to the server.
 | RoleId | int | no | User role type. Possible values are listed in the User Role Types table.
 | TimeoutMinutes | int | no | The time a session can remain inactive before it is closed, in minutes.
 | UserId | int | yes | Identifier of the user that created the session. Corresponds to the identifier in the Principal table.
 | WorkStation | nvarchar | yes | Name of the computer from which the session was created.
 | WorkstationType | int | no | Type of workstation from which the session was created. Standard values are listed in the Station Types table.


TemplateLock

Purpose

Contains information about editable Document Definitions.

Diagram of relationships between lock tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Identifier of a Document Definition lock.
 | CreationDate | datetime | yes | Date and time of the creation of a lock.
 | TemplateId | int | yes | Identifier of a Document Definition. Corresponds to and entry identifier in the Template table.
 | UserId | int | yes | Identifier of the user that is editing a Document Definition. Corresponds to an entry identifier in the Principal table.
 | Workstation | nvarchar | yes | Name of the workstation from which a lock was created.


Routing

Show/Hide Hidden Text

Show diagram of relationships

Routing

ProcessingStage

Task


ProcessingStage

Purpose

Contains a list of processing stages.

Diagram of relationships between routing tables

Diagram of relationships between access control tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Identifier of a processing stage.
 | BatchTypeId | int | no | Batch type identifier. Corresponds to the entry identifier in the BatchType table.
 | CleanupDocuments | bit | yes | Indicates that documents have been automatically deleted during the "Processed" stage.
 | CleanupDocumentsDelay | int | yes | Delay (in hours) before documents are automatically deleted during the "Processed" stage.
 | DocumentsPerTask | int | yes | Maximum amount of documents in a task created for the stage.
 | Enabled | bit | yes | Indicates that the stage was included in the workflow.
 | ExternalId | int | yes | Stage identifier for synchronization with client applications. Unique in a batch type.
 | IsExceptionStage | bit | yes | Indicator of the Exceptions stage. The default value is 0.
 | Name | nvarchar | yes | Name of processing stage.
 | ParentId | int | no | Identifier of the parent processing stage.
 | PredefinedType | int | yes | The base type of a processing stage. Matches the processing stage type for predefined processing stages. For custom stage types, describes the predefined stage type that was used as a template during their creation.
 | ProjectId | int | no | Project identifier. Corresponds to the entry identifier in the Project table.
 | StageOrder | int | yes | The stage's processing order number.
 | Type | int | yes | Type of processing stage. Values for standard stage types are listed in Processing stage types.
 | WaitAllBatchDocs | bit | yes | Indicates that a batch must be processed completely during a certain stage before being transferred to the next stage.

Back to top


Task

Purpose

Contains a list of tasks.

Diagram of relationships between routing tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Identifier of a task.
 | BatchId | int | no | Batch identifier. Corresponds to the entry identifier in the Batch table.
 | EditSessionId | int | yes | Identifier of the editing session. Is the same as the record identifier in the EditSession table
 | Attributes | int | yes | Flags that describe a task's status.
 | Comment | nvarchar | no | Comment on a task.
 | CreationDate | datetime | yes | Date and time of the creation of a task.
 | CreatorId | int | yes | Identifier of the user that created a task.
 | IsManuallyCreated | bit | yes | Indicates that a task was created by an Operator.
 | IterationCounter | int | yes | Not used.
 | ModificationDate | datetime | yes | Date and time of the last status change of a task.
 | PostponedTaskOwner | int | no | Identifier of the user that postponed the dask. Is the same as the record identifier in the Principal table.
 | Priority | int | yes | Priority of a task. Possible values are listed in the Priority table.
 | ProcessingStageId | int | yes | Identifier of the processing stage during which a task was created. Corresponds to an entry identifier in the ProcessingStage table.
 | Progress | int | yes | Not used.
 | ProhibitedUserId | int | yes | Identifier of a user or user group that is prohibited from processing a task.
 | ProjectId | int | yes | Project identifier.
 | State | int | yes | Status of a task. Possible values are listed in the Task Status table.
 | UserId | int | no | Identifier of a user or user group to whom the task was assigned. Corresponds to an entry identifier in the Principal table.

Back to top


Access control

Show/Hide Hidden Text

Show diagram of relationships

Users
Principal | PrincipalLink
PrincipalPermission | Tenant


Principal

Purpose

Contains information about users and user groups.

Diagram of relationships between lock tables

Diagram of relationships between access control tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Entry identifier.
 | Email | nvarchar | no | User's email address.
 | FullName | nvarchar | no | User's full name.
 | IsSystemAdministrator | tinyint | yes | Indicates that a user is a System Administrator. This role is given to a user who created a database.
 | Name | nvarchar | yes | Name of user or user group.
 | PasswordHash | varchar | no | The hash sum of the user's password.
 | PasswordReset | tinyint | no | Indicates that the password was reset.
 | SID | nvarchar | no | Security identifier of the imported users and groups
 | TenantId | int | no | Identifier of the Document Definition. Corresponds to the entry identifier in the Tenant table.
 | Type | int | yes | Entry type. Possible values: ·0 – user ·1 – user group


PrincipalLink

Purpose

Contains information about relationships between entries of the Principal table.

Diagram of relationships between access control tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Entry identifier.
 | OwnerId | int | yes | Identifier of a parent group.
 | PrincipalId | Int | yes | Identifier of a user or a user group.


PrincipalPermission

Purpose

Contains permissions for users or user groups. Allows connections with certain role types. Access blocks are not used in this version.

Diagram of relationships between access control tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Entry identifier.
 | BatchTypeId | int | no | Batch type identifier. Corresponds to the entry identifier in the BatchType table. ·"0" means permissions are granted for "Default " type batches. ·"Null" means that permissions are granted for all types of packets.
 | IsAllowed | bit | yes | Indicates that access is allowed. Currently access blocks are not used, instead permissions are issued to all users that require access.
 | PrincipalId | int | yes | User identifier. Corresponds to the entry identifier in the Principal table.
 | ProjectId | int | no | Batch type identifier. Corresponds to the entry identifier in the Project table. The value "null" gives access permissions to all projects.
 | RoleType | int | yes | Role types for which a user or user group has permissions. Possible values are listed in User Role Type.


Tenant

Purpose

Stores a list of all tenants.

Diagram of relationships between access control tables

Список столбцов

Key | Name | Type | Required | Description
PK | Id | int | yes | Record identifier.
 | CanUseCommonLicense | tinyint | yes | Indicates whether the tenant is permitted to use the main license. The default value is 1.
 | Description | nvarchar | no | A description of the tenant.
 | LicenseNumber | nvarchar | no | The serial number of the tenant license.
 | Name | nvarchar | yes | The name of the tenant.


Statistics.htm

Navigation: Custom reports > Database structure >

Return to chapter overview

Statistics

Show/Hide Hidden Text

After a batch has been processed, information about its processing is stored in statistics tables. This information is used in reports and is available after a batch is deleted from the database. Statistic data is organized according to dates, projects, processing stage types, batches, users and users roles in order to minimize its size.

Show diagram of relationships

Statistics
StatisticBatchArchive | StatisticBatchDayActivity
StatisticBatchDocumentTypeArchive | StatisticBatchParameterArchive
StatisticConnections | StatisticDocuments
StatisticExceptionTask | StatisticProductivity
StatisticTasks |


StatisticBatchArchive

Purpose

Contains information about packets for which statistic data was gathered.

Diagram of relationships between statistics tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Batch identifier.
 | BatchTypeId | int | no | Identifier of the batch's type.
 | BatchTypeName | nvarchar | no | Name of the batch's type.
 | Date | datetime | yes | Date and time when the processing of the batch was completed.
 | Name | nvarchar | yes | Batch name.
 | SLAViolationSec | int | no | The time elapsed since the time limit for processing the batch was reached, in seconds.
 | ProjectId | int | yes | Project identifier.


StatisticBatchDayActivity

Purpose

Contains hourly statistics for batch processing during specific stages.

Diagram of relationships between statistics tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Entry identifier.
 | BatchId | int | no | Batch identifier. Corresponds to the entry identifier in the StatisticBatchArchive table.
 | DocumentsIn | int | no | Amount of documents that were routed to the processing stage.
 | DocumentsOut | int | no | Amount of documents that were routed from the processing stage.
 | Hour | int | no | A number between 0 and 23 that indicates the hour for which statistics were collected.
 | PagesIn | int | no | Amount of pages that were routed to the processing stage.
 | PagesOut | int | no | Amount of pages that were routed from the processing stage.
 | ProcessingStageType | int | yes | The type of processing stage for which statistics were collected. Values for standard processing stages are listed in the Processing Stage Types table.


*StatisticBatchDocumentTypeArchive

Navigation: Custom reports > Database structure > Statistics >

Return to chapter overview

StatisticBatchDocumentTypeArchive

Purpose

Contains a list for every batch of document types for which statistics were gathered. A document type is all document to which the same Document Definition is applied and has the same name as the definition.

Diagram of relationships between statistics tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Batch identifier.
 | BatchId | int | yes | Batch identifier. Corresponds to the entry identifier in the StatisticBatchArchive table.
 | Documents | int | no | Amount of document of a given type.
 | DocumentType | nvarchar | no | Document type (the name of the Document Definition).
 | Pages | int | no | Amount of pages in documents of a given type.


StatisticBatchParameterArchive

Purpose

Contains information about parameters of batches for which statistics were gathered.

Diagram of relationships between statistics tables

List of columns

Key | Name | Type | Required | Description
PK | Id | bigint | yes | Entry identifier.
 | BatchId | int | no | Batch identifier. Corresponds to the entry identifier of an entry in the StatisticBatchArchive table.
 | BatchParameterName | nvarchar | yes | Name of the parameter.
 | BatchParameterValue | nvarchar | yes | Value of the parameter.


StatisticConnections

Purpose

Stores FlexiCapture user connection statistics. Performance indicators are recorded every 10 minutes.

Diagram of relationships between statistics tables

Список столбцов

Key | Name | Type | Required | Description
PK | Id | int | yes | Identifier of the record.
 | AllTenantsCount | int | no | The total number of tenants.
 | CreationDate | datetime | yes | The time when the indicators were recorded. Example: The value 2016-03-29 04:40:00 indicates that indicators were recorded for the period between 2016-03-29 04:30:00 and 2016-03-29 04:40:00.
 | Interval | smalldatetime | yes | Specifies the end of the 10-minute interval between indicator records.
 | RoleType | int | no | The type of the role
 | SessionsCount | int | no | The number of connections made by users with this type of role.
 | TenantId | int | no | Identifier of the tenant. Corresponds to the entry identifier in the Tenant table.


StatisticDocuments

Purpose

Contains entries about documents of a specific type that were edited by a user.

Diagram of relationships between statistics tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Entry identifier.
 | AllAssemblingErrorCount | int | no | Reserved
 | AllDocErrorsCount | int | no | Reserved
 | AllFieldsCount | int | no | Reserved
 | AllFieldErrorsCount | int | no | Reserved
 | AllSymbolsCount | int | no | Reserved
 | CorrectedAssemblingErrorCount | int | no | Amount of corrected document assembly errors.
 | CorrectedDocErrorsCount | int | no | Amount of corrected rule errors.
 | CorrectedFieldErrorsCount | int | no | Amount of corrected formatting errors.
 | CorrectedFieldsCount | int | no | Amount of corrected field.
 | CorrectedLayoutErrorCount | int | no | Reserved
 | CorrectedPageOrderCount | int | no | Reserved
 | CorrectedSymbolsCount | int | no | Amount of corrected characters (includes removal of characters and addition of new characters).
 | CorrectedTypeErrorCount | int | no | Reserved
 | DocumentsCount | int | no | Amount of edited documents of the chosen type.
 | DocumentTypeId | int | yes | Document type identifier. Corresponds to the entry identifier in the StatisticBatchDocumentTypeArchive table.
 | Seconds | int | no | Total time (in seconds) spent on editing the documents in the batch.
 | StatisticTasksId | int | yes | Identifier of task entries in the StatisticTasks table.
 | VerifiedFieldsCount | int | no | Amount of confirmed fields.
 | VerifiedSymbolsCount | int | no | Amount of confirmed characters.

Back to top


StatisticExceptionTask

Purpose

Contains detailed data about tasks processed in the Exceptions stage.

Diagram of relationships between statistics tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Entry identifier.
 | Comment | nvarchar | no | Comment on the task.
 | CreatorFullName | nvarchar | no | Full name of the user that created the task.
 | CreatorRoleId | int | yes | Identifier of the role of the user that processed the task. Possible values are listed in the User Role Types table.
 | CreatorUserId | int | yes | Identifier of the user that created the task.
 | Date | datetime | no | Date and time of the creation of the task.
 | DocumentCount | int | no | Amount of documents in the task.
 | GetTaskDate | datetime | no | Date and time when the processing of the task was started.
 | PageCount | int | no | Amount of pages in the task.
 | ReturnDate | datetime | no | Date and time when the task was returned from the Exceptions stage.
 | ReturnStageTo | int | no | The type of the processing stage that the task was routed to from the Exceptions stage. Values for standard processing stages are listed in the Processing Stage Types table.
 | RoleId | int | no | Identifier of the role of the user that processed the task. Possible values are listed in the User Role Types table.
 | StageFrom | int | no | Type of processing stage from which the task was routed. Values for standard processing stages are listed in the Processing Stage Types table.
 | StatisticTasksId | int | yes | Entry identifier of a record of tasks in the StatisticTasks table.
 | TaskId | int | no | Task identifier.
 | TimeOutSeconds | int | yes | Delay (in seconds) before the processing of a task in the Exceptions stage is started.
 | UserId | int | no | Identifier of the user that processed the task.
 | WorkTimeSeconds | int | yes | Time (in seconds) spent on processing the task in the Exceptions stage.

Back to top


StatisticProductivity

Purpose

Stores performance statistics. Performance indicators are recorded every 10 minutes. Performance is determined using summary indicators for a period of time.

Diagram of relationships between statistics tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | The identifier of the record.
 | BatchTypeId | int | yes | The identifier of the batch type. Corresponds to the entry identifier in the BatchType table. The null value indicates that the batch has the Default type.
 | CreationDate | datetime | yes | The time when the performance indicators were recorded.
 | Interval | smalldatetime | yes | Specifies the end of the 10-minute interval between recordings of performance indicators. Example: The value 2016-03-29 04:40:00 means that the performance indicators were recorded for the period from 2016-03-29 04:30:00 to 2016-03-29 04:40:00.
 | ProcessedBatchs | int | yes | The number of processed batches.
 | ProcessedDocs | int | yes | The number of processed documents.
 | ProcessedPages | int | yes | The number of processed pages.
 | ProcessingStageId | int | yes | The identifier of the processing stage. The identifier of a non-existent Input stage is 0 and the identifier of a non-existent Output stage is -1 (these stages have no queues).
 | ProjectId | int | yes | The identifier of the project to which the batch belongs. Corresponds to the entry identifier in the Project table.
 | QueueBatchs | int | yes | The number of batches in the queue.
 | QueueDocs | int | yes | The number of documents in the queue.
 | QueuePages | int | yes | The number of pages in the queue.
 | TenantId | int | no | The identifier of the tenant. Corresponds to the entry identifier in the Tenant table.

Back to top


StatisticTasks

Purpose

Contains statistics related to a specific batch for one day.

Diagram of relationships between statistics tables

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Entry identifier.
 | BatchId | int | yes | Batch identifier. Corresponds to the entry identifier in the StatisticBatchArchive table.
 | CanceledTasks | int | yes | Amount of canceled tasks.
 | CompletedTasks | int | yes | Amount of completed tasks.
 | Date | datetime | yes | The date for which statistics were gathered.
 | ExceptionTasks | int | yes | Amount of tasks that were sent to the exceptions stage.
 | PostponedTasks | int | yes | Amount of postponed tasks.
 | ProcessedDocuments | int | yes | Amount of processed documents.
 | ProcessedPages | int | yes | Amount of processed pages.
 | ProcessingStageType | int | yes | Processing stage type. Standard processing stage types are listed in the Processing Stage Types table.
 | ProjectId | int | yes | Project identifier.
 | RoleId | int | yes | Identifier of the user's role. Possible values are listed in the User Role Types table.
 | Seconds | int | yes | Time (in seconds) spent on processing the batch.
 | ToExceptionDocumentCount | int | no | The number of documents moved to the Exceptions stage.
 | ToExceptionPageCount | int | no | The number of pages moved to the Exceptions stage.
 | UserFullName | nvarchar | yes | Name of the user that is processing the task.
 | UserId | int | yes | Identifier of the user that is processing the task.
 | Workstation | nvarchar | no | The name of the computer that is processing the task.

Back to top


Event Log

Show/Hide Hidden Text

Show diagram of relationships

EventLog

EventLog

DocumentEditingStatistic


EventLog

Purpose

Contains information about system events.

Diagram of relationships between Event log tables

List of columns

Key | Name | Type | Required | Description
PK | Id | bigint | yes | Task identifier.
 | BatchId | int | no | Batch identifier.
 | AssemblingErrorDocCount | int | no | Amount of documents with assembly errors.
 | Comment | nvarchar | no | Comment on the event.
 | Date | datetime | yes | Date and time of the event.
 | Details | nvarchar | no | Event description. Used for event types 10, 11 and 12.
 | DocumentCount | int | no | Amount of documents that are related to the event.
 | DocumentId | int | no | Document identifier.
 | EventType | int | yes | Event type. Possible values are listed in Event type.
 | PageCount | int | no | Amount of pages that area related to the event.
 | ProjectId | int | no | Project identifier.
 | RoleId | int | no | Type of user role. Possible values are listed in User Role Type.
 | RuleErrorDocCount | int | no | Amount of documents with rule errors.
 | RuleWarningDocCount | int | no | Amount of documents with rule warning.
 | SecondsCount | int | no | Amount of time in seconds that it took to process the event.
 | SessionId | int | no | Session identifier.
 | StageFrom | int | no | Processing stage from which the object was routed. Corresponds to the PredefinedType field of the ProcessingStage table.
 | StageFromId | int | no | Processing stage from which the object was routed. Corresponds to the Id field of the ProcessingStage table.
 | StageTo | int | no | Processing stage to which the object was routed. Corresponds to the PredefinedType field of the ProcessingStage table.
 | StageToId | int | no | Processing stage to which the object was routed. Corresponds to the Id field of the ProcessingStage table.
 | TaskId | int | no | Task identifier.
 | UncertainSymbolsCount | int | no | Amount of recognized symbols that may have been recognized incorrectly.
 | UserId | int | no | User identifier.
 | Workstation | nvarchar | no | Name of station that created the event.

Back to top


DocumentEditingStatistic

Purpose

Contains statistics of changes in a document made by a user.

Diagram of relationships between Event log tables

List of columns

Key | Name | Type | Required | Description
PK | Id | bigint | yes | Entry identifier.
 | AssemblingErrorsIn | int | yes | Amount of errors made during the assembly of a document by the time it enters a particular processing stage.
 | AssemblingErrorsOut | int | yes | Amount of errors made during the assembly of a document by the time its processing during a particular stage has been completed.
 | CorrectedSymbols | int | yes | Amount of corrected symbols.
 | DocErrorsIn | int | yes | Amount of rule errors in a document when it enters a certain stage.
 | DocErrorsOut | int | yes | Amount of rule errors in a document when it leaves a certain stage.
 | EventId | bigint | yes | Event identifier. Corresponds to the entry identifier in the EventLog table.
 | FieldErrorsIn | int | yes | Amount of formatting errors in a document when it enters a particular processing stage.
 | FieldErrorsOut | int | yes | Amount of formatting errors in a document after processing of the document during a particular stage has been completed.
 | FieldsForVerificationIn | int | yes | Amount of fields that have to be verified when the document enters a particular processing stage.
 | FieldsForVerificationOut | int | yes | Amount of fields that still have to be verified after processing of the document during a particular stage has been completed.
 | ProcessingStageId | int | yes | Identifier of the processing stage during which the document was edited.
 | SecondsCount | int | yes | Amount of time in seconds spent on editing the document.
 | SymbolsForVerificationIn | int | yes | Amount of symbols that have to be verified when the document enters a particular processing stage.
 | SymbolsForVerificationOut | int | yes | Amount of symbols that still have to be verified after processing of the document during a particular stage has been completed.
 | VerifiedFieldsIn | int | yes | Amount of fields that have been verified when the document enters a particular processing stage.
 | VerifiedFieldsOut | int | yes | Amount of fields that have been verified in a document when its processing during a particular stage has been completed.

Back to top


Navigation: Custom reports > Database structure >

Return to chapter overview

Dictionaries

Role | RoleProcessingStage
RoleWorkstationType | WorkstationType


Role

Purpose

Contains information about user roles.

Diagram of relationships between access control tables

List of dictionaries

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Entry identifier.
 | Attributes | int | yes | Reserved.
 | Name | nvarchar | yes | Name of the role.
 | ProjectId | int | no | Project identifier. Corresponds to the entry identifier in the Project table.
 | Type | int | yes | User role type. Possible values are listed in the User Role Type table.


RoleProcessingStage

Purpose

Table of relationships between roles and processing stages.

Diagram of relationships between access control tables

List of dictionaries

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Entry identifier.
 | ProcessingStageId | int | yes | Processing stage identifier. Corresponds to the entry identifier in the ProcessingStage table.
 | RoleId | int | yes | Role identifier. Corresponds to the entry identifier in the Role table.


RoleWorkstationType

Purpose

Contains information about relationships between roles and station types.

Diagram of relationships between access control tables

List of dictionaries

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Entry identifier.
 | RoleId | int | yes | Role identifier. Corresponds to the entry identifier in the Role table.
 | WorkstationType | int | yes | Station type identifier. Corresponds to the entry identifier in the WorkstationType table.


WorkstationType

Purpose

Contains a list of available station types.

Diagram of relationships between access control tables

List of dictionaries

List of columns

Key | Name | Type | Required | Description
PK | Id | int | yes | Entry identifier.
 | Name | nvarchar | yes | Name of the station type.
 | ProjectId | int | no | Project identifier. Corresponds to the entry identifier in the Project table.
 | Type | int | yes | Station type. Standard values are listed in the Station Types table.


Enumerators

Predefined values of various fields are listed in this section.

Priority | Task Status
Types of Image Sources | Object Types
User Role Types | Station Types
Processing Stage Types | Event Types


Priority

Purpose

Describes possible priority values.

List of enumerators

Possible values

Value | Description
0 | Lowest
1 | Low
2 | Normal
3 | High
4 | Highest
5 | Extra-High


Task status

Purpose

Describes possible document processing task statuses.

List of enumerators

Possible values

Value | Description
0 | Currently being created.
1 | Ready for processing.
2 | Under processing.
4 | Postponed.


Types of image sources

Purpose

Descries the types of possible sources of document images.

List of enumerators

Possible values

Value | Description
0 | File
1 | Scanner
2 | Custom
3 | Unknown


Object types

Purpose

Lists possible types of objects.

List of enumerators.

Possible values

Value | Description
0 | Batch
1 | Document
2 | Project


User role types

Purpose

Describes possible user roles.

List of enumerators

Possible values

Value | Description
1 | Scanning Operator
2 | Data Verification Operator
3 | Verification Operator
6 | Senior Verification Operator
7 | Processing Server
8 | Project Settings Editor
9 | Monitoring Operator
10 | Administrator
11 | Processing Station
12 | External User
13 | Web Capture Operator


Station types

Purpose

Describes predefined station types.

List of enumerators

Possible values

Value | Description
1 | Scanning station
2 | Data Verification station
3 | Verification station
4 | Processing Server
5 | Project Setup station
6 | Processing station
7 | Remote Data Verification Station
8 | Remote Verification Station
9 | Monitoring console
10 | User station
11 | Web Capture Station
12 | Web Verification Station
13 | Web Scanning Station
-1 | Unknown


Processing stage types

Purpose

Describes possible processing stage types.

List of enumerators

Possible values

Value | Description
100 | Importing
150 | Rescanning
200 | Recognition
250 | Unattended Processing
300 | Document Assembly Check
390 | Data Verification Preprocessing
400 | Data Verification
410 | Data Verification Postprocessing
490 | Verification Preprocessing
500 | Verification
510 | Verification Postprocessing
600 | Batch Integrity Check
700 | Export Confirmation
800 | Export
900 | Processed
950 | User Request Processing
1000 | Exceptions


Event types

Purpose

Describes possible event types.

List of enumerators

Possible values

Value | Description
0 | A session was opened.
1 | A session was closed.
2 | A document was added.
3 | A document was deleted.
4 | A changed document was saved.
5 | A document was moved to a different processing stage.
6 | A task was created.
7 | A user has received a task.
8 | A completed task was returned.
9 | A task was canceled.
10 | An error was logged.
11 | A warning was logged.
12 | Notification.
13 | The processing of a task ended.
14 | A task was postponed.
15 | A task was moved to the processing stage.
16 | A user has moved a batch to the processing stage.
17 | A user was added.
18 | A user was deleted.
19 | Changes were made to a project (Document Definitions, batch types, import profiles, etc.).
20 | The list of roles available to a user was changed.
21 | The event log was cleared.
22 | A user group was added.
23 | A user group was deleted.
24 | A batch was created.
25 | A batch was deleted.
26 | A tenant was created.
27 | A tenant was deleted.
28 | A postponed task was returned to the queue.
29 | A batch was imported.
30 | The processing of a batch ended.
31 | A batch was queued for processing.
32 | Merge stages.


Examples of custom reports

When FlexiCapture is installed, several examples of custom reports are enabled in the Administration and Monitoring Console (i.e. placed into the custom report folder of FlexiCapture in the root folder of IIS, which is usually located at C:\Inetpub\wwwroot\FlexiCapture12\Monitoring\CustomReports). There are two examples:

·A report based on a DataSet created by a stored procedure

·A report based on a DataSet created by and SQL query


Stored procedure

The example of a custom report based on a stored procedure includes the following files:

·SampleSPTextCustomReportRussian.xml – an xml file with a description of the report.

·SampleDataSetReportRussian.rpt – a file that contains the report. This file is the same for reports based on stored procedures and SQL queries.

This report returns the first 100 records from the event log.


SQL query

The sample report based on a SQL query contains the following files:

·SampleSQLTextCustomReportRussian.xml – an XML file with a description of the report.

·SampleDataSetReportRussian.rpt – a file that contains the report. This file is the same for reports based on stored procedures and SQL queries.

This report returns the first 100 records from the event log.


Appendix

Using scripts in ABBYY FlexiCapture

Supported recognition languages

Fonts for correct characters rendering

Supported text types

Supported barcode types

Supported input formats

Export file formats

Date formats

Third-party technologies


Supported recognition languages

FlexiCapture supports over 200 recognition languages. For languages marked with [image] , dictionaries are provided. For languages marked with [image] , ICR is available.

Abkhaz | Hani | Old German
Adyghe | Hausa | Old Italian
Afrikaans | Hawaiian | Old Slavonic
Agul | Hebrew | Old Spanish
Albanian | Hungarian | Ossetian
Altai | Icelandic | Papiamento
Arabic (Saudi Arabia) | Ido | Pinyin
Armenian (Eastern) | Indonesian | Polish
Armenian (Grabar) | Ingush | Portuguese
Armenian (Western) | Interlingua | Portuguese (Brazilian)
Avar | Irish | Quechua (Bolivia)
Aymara | Italian | Rhaeto-Romanic
Azeri (Cyrillic) | Japanese | Romanian
Azeri (Latin) | Japanese (Modern) | Romanian (Moldova)
Bashkir | Jingpo | Romany
Basque | Kabardian | Rundi
Belarusian | Kalmyk | Russian
Bemba | Karachay-balkar | Russian (Old Spelling)
Blackfoot | Karakalpak | Russian with accent
Breton | Kashubian | Rwanda
Bugotu | Kawa | Sami (Lappish)
Bulgarian | Kazakh | Samoan
Burmese | Khakass | Scottish Gaelic
Buryat | Khanty | Selkup
Catalan | Kikuyu | Serbian (Cyrillic)
Cebuano | Kirghiz | Serbian (Latin)
Chamorro | Kongo | Shona
Chechen | Korean | Slovak
Chinese Simplified | Korean (Hangul) | Slovenian
Chinese Traditional | Koryak | Somali
Chukchee | Kpelle | Sorbian
Chuvash | Kumyk | Sotho
Corsican | Kurdish | Spanish
Crimean Tatar | Lak | Sunda
Croatian | Latin | Swahili
Crow | Latvian | Swazi
Czech | Latvian Gothic | Swedish
Dakota | Lezgin | Tabasaran
Danish | Lithuanian | Tagalog
Dargwa | Luba | Tahitian
Dungan | Macedonian | Tajik
Dutch | Malagasy | Tatar
Dutch (Belgian) | Malay (Malaysian) | Thai
English | Malinke | Tok Pisin
Eskimo (Cyrillic) | Maltese | Tongan
Eskimo (Latin) | Mansi | Tswana
Esperanto | Maori | Tun
Estonian | Mari | Turkish
Even | Maya | Turkmen (Cyrillic)
Evenki | Miao | Turkmen (Latin)
Faroese | Minangkabau | Tuvinian
Farsi | Mohawk | Udmurt
Fijian | Mongol | Uighur (Cyrillic)
Finnish | Mordvin | Uighur (Latin)
French | Nahuatl | Ukrainian
Frisian | Nenets | Uzbek (Cyrillic)
Friulian | Nivkh | Uzbek (Latin)
Gagauz | Nogay | Vietnamese
Galician | Norwegian (Bokmal) | Welsh
Ganda | Norwegian (Nynorsk) | Wolof
Georgian | Nyanja | Xhosa
German | Occidental | Yakut
German (Luxembourg) | Occitan | Yiddish
German (New Spelling) | Ojibway | Zapotec
Greek | Old English | Zulu
Guarani | Old French |


Fonts required for correct rendering of characters of supported data types in the FormReader editor

Navigation: Appendix >

Return to chapter overview

Fonts for correct characters rendering

Fonts required for correct rendering of characters of supported languages in the ABBYY FlexiCapture editor:

Language | Font
With dictionary support
Armenian (eastern, western, Grabar) | Arial Unicode MS(2)
Tatar | MS Core Fonts 2.82(1) (Arial, Courier New and Times New Roman)
Without dictionary support
Abkhazian | Arial Unicode MS(2)
Adygei | Arial Unicode MS(2), Lucida Sans Unicode(3)
Aghul | Arial Unicode MS(2), Lucida Sans Unicode(3)
Altaic | Arial Unicode MS(2), Lucida Sans Unicode(3)
Avar | Arial Unicode MS(2), Lucida Sans Unicode(3)
Azerbaijani (Cyrillic), Azerbaijani (Latin) | MS Core Fonts 2.82(1) (Arial, Courier New and Times New Roman)
Bashkir | Arial Unicode MS(2), Palatino Linotype(2)
Buryat | MS Core Fonts 2.82(1) (Arial, Courier New and Times New Roman)
Chechen | Arial Unicode MS(2), Lucida Sans Unicode(3)
Chukchi | Arial Unicode MS(2), Lucida Sans Unicode(3)
Chuvash | Arial Unicode MS(2)
Dargin | Arial Unicode MS(2), Lucida Sans Unicode(3)
Dungan | MS Core Fonts 2.82(1) (Arial, Courier New and Times New Roman)
Gagauz | Arial Unicode MS(2)
Hausa | Arial Unicode MS(2), Lucida Sans Unicode(3)
Ingush | Arial Unicode MS(2), Lucida Sans Unicode(3)
Kabardian | Arial Unicode MS(2), Lucida Sans Unicode(3)
Kalmyk | MS Core Fonts 2.82(1) (Arial, Courier New and Times New Roman)
Karakalpak | MS Core Fonts 2.82(1) (Arial, Courier New and Times New Roman)
Kazakh | MS Core Fonts 2.82(1) (Arial, Courier New and Times New Roman)
Khakas | Arial Unicode MS(2)
Khanty | Arial Unicode MS(2)
Koryak | Arial Unicode MS(2), Lucida Sans Unicode(3)
Kyrgyz | MS Core Fonts 2.82(1) (Arial, Courier New and Times New Roman)
Lak | Arial Unicode MS(2), Lucida Sans Unicode(3)
Lezgin | Arial Unicode MS(2), Lucida Sans Unicode(3)
Mansi | Arial Unicode MS(2), Lucida Sans Unicode(3)
Mari | Arial Unicode MS(2)
Mongol | MS Core Fonts 2.82(1) (Arial, Courier New and Times New Roman)
Nenets | MS Core Fonts 2.82(1) (Arial, Courier New and Times New Roman)
Ossetic | Arial Unicode MS(2)
Russian (old spelling) | Arial Unicode MS(2), Palatino Linotype(2)
Tabassaran | Arial Unicode MS(2), Lucida Sans Unicode(3)
Tajik | Arial Unicode MS(2), Palatino Linotype(2)
Turkmen | MS Core Fonts 2.82(1) (Arial, Courier New and Times New Roman)
Tuvan | MS Core Fonts 2.82(1) (Arial, Courier New and Times New Roman)
Udmurt | Arial Unicode MS(2)
Uzbek (Cyrillic) | MS Core Fonts 2.82(1) (Arial, Courier New and Times New Roman)
Yakut | Arial Unicode MS(2)
Zulu | Arial Unicode MS(2), Lucida Sans Unicode(3)

(1)http://www.microsoft.com/

(2) MS Office 2000

(3) Windows NT 4.0


Supported text types

ABBYY FlexiCapture supports the following text types:

Text type | Description
Typographic, laser and ink-jet printers | Texts printed at a print shop, on a laser printer, or on an ink-jet printer.
Typewriter | Typewritten texts.
Matrix printer | Texts printed on a dot-matrix printer.
Index | A special set of characters that includes only digits written in ZIP-code style. They look as follows:
OCR-A | A monospaced font designed for Optical Character Recognition. Largely used by banks, credit card companies, and similar businesses. It may look as follows:
OCR-B | A font designed for Optical Character Recognition. It may look as follows:
MICR E-13B | A special set of numeric characters printed with special magnetic ink. MICR (Magnetic Ink Character Recognition) characters are found in a variety of places, including personal checks. It may look as follows:
MICR CMC-7 | A special MICR barcode font (CMC-7). It may look as follows:


Supported barcode types

ABBYY FlexiCapture supports the following barcode formats:

·Australia Post

·Aztec

·Codabar

·Codabar with checksum

·Code 128

·Code 32

·Code 39

·Code 39 with checksum

·Code 39 with asterisk

·Code 93

·DataMatrix

·EAN 13

·EAN 8

·IATA 25

·Industrial 25

·Intelligent Mail

·Interleaved 25

·Interleaved 25 with checksum

·Japan Post

·Matrix 25

·MaxiCode

·Patch Code

·PDF 417

·Postnet

·QRCode

oQR code (Version 1-40)

oMicro QR Code (Version M1-M4)

·UCC-128

·UPC A

·UPC E


Supported input formats

Show/Hide Hidden Text
Common office files
Document Type | Supported File Extensions
Text documents | *.doc, *.docx, *.rtf, *.htm/*.html, *.txt, *.odt
Spreadsheets | *.xls, *.xlsx, *.ods
Presentations | *.ppt, *.pptx, *.odp

note Note: Microsoft Office 2010 and earlier versions cannot be used to convert *.odt, *.ods and *.odp files.
Image files
Format | Supported File Extensions
Adobe PDF | *.pdf note Note: The visual quality of PDF files containing vector graphics may deteriorate because PDFs are rasterized and bitmap images are placed into output files.
DCX | *.dcx
DjVu | *.djvu; *.djv
GIF | *.gif
JBIG2 | *.jb2; *.jbig2
JPEG | *.jpg; *.jpeg
JPEG 2000 | *.jp2; *.j2k; *.jpf; *.jpx; *.jpc
Microsoft HD Photo | *.wdp; *.wmp; *.hdp
PCX | *.pcx
PNG | *.png
TIFF | *.tif; *.tiff note Note: TIFF files with alpha channels and JPEG compression are not supported.
WIC-compatible | *.ARW; *.CR2; *.CRW; *.dds; *.dng; *.ERF; *.ico; *.icon; *.KDC; *.MRW; *.NEF; *.NRW; *.ORF; *.PEF; *.RAF; *.RAW; *.RW2; *.RWL; *.SR2; *.SRW
Windows Bitmap | *.bmp; *.dib; *.rle
XPS | *.xps


Export file formats

Show/Hide Hidden Text

Data export formats

Format

Description

Comment

XLS

Microsoft Office Excel Workbook

Supported versions:

·5.0/95 [image] Supported code pages

oWindows Tatar

oWindows Armenian

oWindows Bashkir

oMathematical symbols

oWindows Thai (874)

oJapanese (Shift-JIS)

oWindows Central Europe (1250)

oWindows Cyrillic (1251)

oWindows Western Europe (1252)

oWindows Greek (1253)

oChinese Simplified (GB2312)

oWindows Turkish (1254)

oWindows Hebrew (1255)

oKorean (Johab)

oWindows Arabic (1256)

oWindows Baltic (1257)

oWindows Vietnamese (1258)

oKorean

oChinese Traditional (Big5)

·97-2003

·97-2003 (compatible with 5.0/95)

XLSX

Microsoft Office Excel Workbook

None.

DBF

DBase file

Supported code pages

oDOS Multilingual Latin 1 (850)

oDOS Latin 2 (852)

oDOS Cyrillic (855)

oDOS Turkish (857)

oDOS United States (437)

oDOS Hebrew (862)

oDOS Russian (866)

oDOS Tatar

oDOS Modern Greek (869)

oDOS Armenian

oWindows Bashkir

oWindows Thai (874)

oArabic Transparent ASMO (720)

oJapanese (Shift-JIS)

oDOS Baltic (775)

oChinese Simplified (GB2312)

oWindows Vietnamese (1258)

oDOS Greek (737)

oKorean

oChinese Traditional (Big5)

XML

XML Document

Supported encodings:

·UTF-8 without BOM

·UTF-8

·UTF16 little endian

·UTF16 big endian

TXT

Plain text

Supported encodings for TXT and CSV:

·UTF-8 without BOM

·UTF-8

·UTF16 little endian

·UTF16 big endian

·ANSI [image] Supported code pages

oWindows Tatar

oWindows Armenian

oWindows Bashkir

oMathematical symbols

oWindows Thai (874)

oJapanese (Shift-JIS)

oWindows Central Europe (1250)

oWindows Cyrillic (1251)

oWindows Western Europe (1252)

oWindows Greek (1253)

oChinese Simplified (GB2312)

oWindows Turkish (1254)

oWindows Hebrew (1255)

oKorean (Johab)

oWindows Arabic (1256)

oWindows Baltic (1257)

oWindows Vietnamese (1258)

oKorean

oChinese Traditional (Big5)

·DOS [image] Supported code pages

oDOS Multilingual Latin 1 (850)

oDOS Latin 2 (852)

oDOS Cyrillic (855)

oDOS Turkish (857)

oDOS United States (437)

oDOS Hebrew (862)

oDOS Russian (866)

oDOS Tatar

oDOS Modern Greek (869)

oDOS Armenian

oWindows Bashkir

oWindows Thai (874)

oArabic Transparent ASMO (720)

oJapanese (Shift-JIS)

oDOS Baltic (775)

oChinese Simplified (GB2312)

oWindows Vietnamese (1258)

oDOS Greek (737)

oKorean

oChinese Traditional (Big5)

CSV

Comma Separated Values File

Image export formats

Format

Colors

Additional options

TIFF

Full color/
grayscale/
black-and-white

·Several compression schemes will be available if you select the TIFF format. To select a scheme, select Custom from the Quality drop-down list, and then select a compression scheme from the drop-down list that appears on the right.

oThe following options are available for color and grayscale images: Zip, Lzw, Packbits, Jpeg and None.

oThe following options are available for black-and-white images: CCITT4Fax, Zip, Lzw, Packbits and None.

·If you select the Jpeg scheme, you will also be able to select a quality setting between 1% and 100%.

JPEG

Full color/
grayscale

None.

PDF, PDF/A

Full color/
grayscale/
black-and-white

·Standard allows you to select the version of the format standard. By default, the version of the standard is detected automatically. For PDF/A the following standard versions are available: 1a, 1b, 2a, 2b, 2u, 3a, 3b, 3u.

·The Version drop-down list lets you select the format version. The Auto setting selects the version automatically and is enabled by default.

·Use MRC enables Mixed Raster Content compression, decreasing the size of the output files.

note Note: This option is only available for the Grayscale and Full color color types. When you use this option, the quality of fields with the Do not recognize option enabled may be reduced when they are exported.

·Fast Web View makes the first page in documents with multiple pages faster to load.

·Create searchable PDF For details, see the Creating searchable PDF files section of the Processing PDF files article.

·Enable tagged PDF adds tags to output PDF files (when the Create searchable PDF option is enabled).

BMP

Full color/
grayscale/
black-and-white

None.

JPEG2000

Full color/
grayscale

None.

PCX packbits

Grayscale/
black-and-white

None.

PNG

Full color/
grayscale/
black-and-white

None.


Date_format.htm

Navigation: Appendix >

Return to chapter overview

Date formats

Show/Hide Hidden Text

The format of dates (such as batch creation dates, event dates in the event log, and the license expiration date) in ABBYY FlexiCapture depends on:

·the region and language settings of the operating system,
or

·the user interface language of ABBYY FlexiCapture

You can change the region and language settings of your operating system using the options in the Clock, Language and Region group in the Control Panel. To change the user interface language in ABBYY FlexiCapture, select the desired language from the drop-down list in the upper right corner of the page.

warning Important! You can select either British (United Kingdom) or American (United States) English for the user interface. Note that the British UI uses the European day-month-year date format, while the American UI uses the month-day-year format.

In some parts of the UI, dates always appear in the universal year-month-day format regardless of the settings.

Details on dated events

License Manager

Date | Depends on region settings | Depends on UI language | Uses universal format
License expiration date | galochka |  |

Administration and Monitoring Console

Date | Depends on region settings | Depends on UI language | Uses universal format
Batch creation date |  | galochka |
Session start date and date of last session activity |  | galochka |
Event dates in event log |  | galochka |
Error dates in error log |  | galochka |
Dates in report filter settings |  | galochka |
Date of last log cleanup |  | galochka |
Dates in display filter settings |  | galochka |
Date of last update |  | galochka |
Date of request for permissions |  | galochka |

Web Scanning Station

Date | Depends on region settings | Depends on UI language | Uses universal format
Dates in registration parameters |  |  | galochka
Creation dates in batch view |  | galochka |
Dates in generated batch names |  |  | galochka

FrontOffice

Date | Depends on region settings | Depends on UI language | Uses universal format
Dates in registration parameters |  |  | galochka
Creation dates in the batch view |  | galochka |
Dates in generated batch names |  |  | galochka

Scanning Station

Date | Depends on region settings | Depends on UI language | Uses universal format
Dates in registration parameters |  |  | galochka
Dates in generated batch names |  |  | galochka
Batch export date in batch properties | galochka |  |

Project Setup Station

Date | Depends on region settings | Depends on UI language | Uses universal format
Date created in properties of document or page | galochka |  |
Event dates in event log | galochka |  |
Dates in batch filter | galochka |  |
Last updated date for FlexiLayout in FlexiLayout editor | galochka |  |
Dates in server project selection dialog box | galochka |  |
Date constraints in data type properties | galochka |  |
Batch creation dates | galochka |  |
Dates in names of exported files |  |  | galochka

Verification Station

Date | Depends on region settings | Depends on UI language | Uses universal format
Dates in batch filter | galochka |  |
Columns in queue view | galochka |  |
Dates in batch view. Batch creation dates | galochka |  |

Processing Server Monitor

Date | Depends on region settings | Depends on UI language | Uses universal format
Start and finish dates of tasks | galochka |  |
Event dates in event log | galochka |  |

Processing Station

Date | Depends on region settings | Depends on UI language | Uses universal format
Event dates in event log | galochka |  |


Alphabet used in regular expressions

Name | Conventional designation | Usage example
Any character | * | "c"*"t" allows such words as cat, cot, etc.
Letter | C | C"ot" allows such words as Rot, pot, cot, Dot, mot, etc.
Uppercase letter | A | A"ot" allows such words as Rot, Cot, Mot, Dot, etc.
Lowercase letter | a | a"ot" allows such words as rot, cot, mot, dot, etc.
Letter or number | X | X allows any standalone number or letter.
Number | N | N"th" allows such words as 5th, 4th, 6th, etc.
String | " " | "cot"
Or | | | "pl"("o"|"a")"t" allows words "plot" and "plat".
Character from group | [] | [tm]"ot" allows words "tot" and "mot".
Character not from group | [^] | [^t]"ot" allows words "cot", "lot", etc., but does not allow the word "tot".
Space (within group) | \s | [A\s] allows only the letter A or a space.
Any number of repetitions (applies to the expression or subexpression on the left) | {-} | [AB74]{-} allows any combinations of characters A, B, 7, 4 of any length.
Number of repetitions n | {n} | N{2}"th" allows such words as 25th, 84th, 11th, etc.
From n to m repetitions | {n-m} | N{1-3}"th" allows such words as 5th, 84th, 111th, etc.
From 0 to n repetitions | {-n} | N{-2}"th" allows such words as 84th, 5th, etc.
From n repetitions and more | {n-} | N{2-}"th" allows such words as 25th, 834th, 311th, 34576th, etc.
Subexpression | () |
Hyphen symbol | [\-] |
Slash symbol | [\\] |

Examples of regular expressions:

1.Postal code: [0-9]{6}
An sample value: "142172"

2.Zip code (USA): [0-9]{5}("-"[0-9]{4}){-1}
Sample values: "55416", "33701-4313"

3.Income: N{4-8}[,]N{2}
Sample values: "15000,00", "4499,00"

4.Month in the numerical form: ((|"0")[1-9])|("10")|("11")|("12")
Sample values: "4", "05", "12"

5.Fraction: ("-"|)([0-9]{1-})(|(("."|",")([0-9]{1-})))
Sample values: "1234,567", "0.99", "100,0", "-345.6788903"

6.E-mail: [A-Za-z0-9_]{1-}(("."|"-")[A-Za-z0-9_]{1-}){-3}"@"[A-Za-z0-9_]{1-}(("."|"-")[A-Za-z0-9_]{1-}){-4}"."([A-Za-z]{2-4}|"asia"|"museum"|"travel"|"example"|"localhost")
Sample values: "support@abbyy.com", "my-name@company.org.ru", "info@gallery.museum"


Develop_solutions.htm

Navigation: Appendix >

Return to chapter overview

Protecting Document Definitions and additional modules

Show/Hide Hidden Text

You can develop solutions based on ABBYY FlexiCapture for sale to third parties. A solution is a Document Definition and may include the following additional components:

·A FlexiLayout created in FlexiLayout Studio

·A rule module or a special data checking algorithm that uses rules to check data

·An export module or a custom export procedure

You can protect your solution from unlicensed use using a Developer's License and a unique solution identifier. Only users with a User's License will be able to make use of your solution.

Protecting Document Definitions

1.Send a message describing your solution and listing its components to the ABBYY office in your region.

2.Depending on the type of the solution you are developing, the ABBYY office will provide you with unique identifiers for your solution's components, and in some cases a developer's license. The unique identifiers can be included in the source code of your solution's components and checked against the identifiers specified in a User's License.

3.Start ABBYY FlexiCapture, open the Document Definition editor, click Document Definition Properties... on the Document Definition menu in the editor, select the General tab and enter the unique solution identifier you received from the ABBYY office.

4.When selling your solution to a client, ask the ABBYY office for a User's License that includes the unique solution identifier. Without this license, your client will not be able to use the Document Definition or FlexiLayout to process documents.

Protecting individual components

Any component can be developed and protected independently from a complete solution.

If you want to protect a FlexiLayout, you will need a Developer's License. For details, see the Projects → Protection features for FlexiLayouts and Сlassifiers article of ABBYY FlexiLayout Studio help.

Export modules and rule modules are integrated into a Document Definition using a script. You will not need a Developer's License to protect these modules. If your solution allows using modules with any Document Definitions, you can protect them by including a unique identifier check in the module's code.

note Note: We recommend developing an external library in the *.dll format and integrating it with ABBYY FlexiCapture. This will make the source code unavailable to users.

To do this, use the IsModuleAllowedByLicense method in your module to check whether the user's license allows using the module:

IsModuleAllowedByLicense ( authorId : string, moduleName : string ) : bool

In the code sample above, authorId is the unique identifier of the developer, and moduleName is the unique identifier of the solution.

Code samples

The following code sample illustrates how a method can check for a parameter in a license:

private bool CheckLicense()
{
if (FCTools.IsModuleAllowedByLicense("ABBYY RU", "ModuleName") == false)
{
FCTools.ShowMessage("Your license does not allow the use of this module", true);
return false;
}
else
{
// FCTools.ShowMessage("License is OK", false);
return true;
}
}

You can call the license check method in an export script as follows:

public void ExportDocument(ref IExportDocument docRef, ref FCTools FCTools )
{
if (CheckLicense() == true)
{
…
exportImages(docRef, FCTools, exportFolder);
// export information about the document
exportDocInfo(docRef, sw);
// export fields
exportFields(docRef.Children, sw, "");
}
}

If the license does not include a module with the name ModuleName and the author ABBYY RU, exporting documents will result in an error.


Glossary

Show/Hide Hidden Text

A

ABBYY FlexiCapture

A software solution for single-flow input of data from various document types structured (fixed forms), semi-structured (flexible forms and documents) and unstructured (free-format documents).

ABBYY FlexiLayout Studio

A program allowing you to create a FlexiLayout of the document structure, which can then be used for automatic document recognition.

ABBYY FormDesigner

ABBYY FormDesigner is used to design layouts of machine-readable forms. Once replicated and filled out, these forms can be processed with the ABBYY FlexiCapture automated form input system. Form layout design is an important stage, since the quality of the designed layout (its machine readability) determines the effectiveness of all subsequent processing stages: scanning, recognition, verification, and export.

ABBYY FlexiCapture for Invoices

An ABBYY FlexiCapture is an easy-to-use, intelligent software solution for processing invoices.

ADF

Automatic Document Feeder. A device for automatic document feeding that enables you to scan any number of documents without performing additional manual operations.

Administrator

A user of ABBYY FlexiCapture who is authorized to configure the program for document input: creating and editing Document Definitions and import profiles.

Alphabet

A set of characters used in the language being described.

Anchor

A static element in the form of a black square, rectangle, cross or corner intended for Document Definition matching.
Details...

Anchors are special elements of form design, which are used by the system to perform matching after scanning (eliminates skewing, compensates linear and nonlinear defects of scanning, calculates the location of blocks). The most reliable anchors are black squares that are normally located in the corners of a form. If no special anchors are present on the image, other static elements can be used to match the Document Definition: separators, i.e. vertical or horizontal lines, such as table lines, frames, etc., or clear static text, namely: form header, field signatures, explanatory information, etc. The option Use for Document Definition matching must be enabled for static elements used for Document Definition matching.

Anchor barcode

A static element representing a barcode that is not intended for data extraction. An anchor barcode can be used for Document Definition matching or identification.

Anchor text

A static element representing a text that is present on a blank form and is not intended for data extraction. This may be any explanatory text or header. Anchor text can be used for Document Definition matching or identification.

Angle

An anchor shaped as an angle.

Annex

Pages that do not contain fields, but are included in document assembly. No data is extracted from these pages, but they may be saved as images or PDF searchable files.

Assembly error

This error occurs when a document that was created during document assembly contains pages from other documents, when its own pages are in the wrong order, or when the values of key fields in the document's pages do not match.

Auto-learning

The ability of ABBYY FlexiCapture to automatically learn to detect new fields and identify document types.

B

Barcode

A machine-readable form element represented as alternating white and black bars of a certain length, which encode digital information. A barcode in a document may be used to extract information (barcode field) or to match and identify a Document Definition (anchor barcode).

Barcode field

A Document Definition field containing a barcode intended for recognition.

Barcode recognition

Conversion of a graphic barcode image to numbers or text.

Batch type

The property of a batch that defines how documents in the corresponding batches are to be processed.

Black-and-white line form

A form in which borders of information fields are formed by ordinary lines that do not disappear during scanning.

Black square

An anchor shaped as a black square.

Brightness

A threshold of light sensitivity that determines at which point the scanner detects grayscale halftones as white.

C

Checkmark

A machine-readable form element that is filled with a mark (tick, cross, dot, inked out, etc.) by the person filling out a form.

Checkmark field

A Document Definition field containing a checkmark.

Checkmark group

An element of a machine-readable form uniting several checkmarks located nearby. One or several checkmarks can be selected in a checkmark group.

Checkmark group field

A Document Definition field containing a checkmark group.

Classifier

A project created in FlexiLayout Studio and intended for preliminary identification of pages prior to applying Document Definitions as well as for selecting the matching FlexiLayout or layout alternative.

Classifier F-measure

A combined measure of precision and recall for document classification. It is expressed as a number between 0 and 1 or as a percentage between 0% and 100%.

F-measure for a category is calculated as (β^2 + 1) * P * R / (β^2 * P + R), where P is the precision for the category, R is the recall for the category, and β is a free parameter which determines the relative weighting of precision and recall for the given model. Maximum value = 1 (100%) when P = R = 1 (100%).

F-measure for a test or training batch is calculated as (β^2 + 1) * P * R / (β^2 * P + R), where P is the precision for the test or training batch, R is the recall for the test or training batch, and β is a free parameter which determines the relative weighting of precision and recall for the given model.

Code page

A table of values that describes the character set for a particular language.

Color background form

A form in which all information fields are white rectangles against a color background that disappears during scanning.

Contrast

Ratio between the brightness of the darkest and lightest areas on an image.

Control

A text, field or button element on the data form.

Corrected checkmark

A checkmark that was selected mistakenly and then inked out. If the option Allow corrections is enabled for the checkmark field, the program will recognize the inked out checkmark as unselected.

Cross

An anchor shaped as a cross.

Custom data type

User-defined data type.

D

Database lookup

Matching recognized data against corresponding database records.

Data set

Data used for automated document checks. A data set may be stored as a table in ABBYY FlexiCapture and synchronized according to a schedule or retrieved from an external source.

Data type

A field attribute describing known constraints of possible field values. It is used during field recognition to reduce the number of possible recognition variants.
Details...

One of the field's characteristics is a data type: number, date, text, last name, given name, address, etc. A data type defines the set of words that can occur in the given field. Data type is an important recognition parameter that affects recognition quality. A correctly specified data type can significantly reduce the number of incorrectly recognized characters.

Description file

An auxiliary file that defines how a batch is formed when images are being added from a Hot Folder.

Dictionary

A list of words used to determine a specific data type.
Details...

A dictionary is specified when creating a data type. As a result, the data type attached to a field determines the dictionary used during recognition and verification. In addition to the existing predetermined data types with ready dictionaries, the program allows you to attach data types created on the basis of custom dictionaries. You can type in dictionary data manually or load them from a file.

Document

A combination of one or several page images and data extracted from them.

Document batch

A combination of documents grouped by the user. A batch normally contains the stack of documents scanned in a single pass or imported from a particular folder.

Document class

A set of documents or pages that share several common characteristics.

Document data

Data captured after processing (recognition, verification and editing of recognition results) of document page images.

Document Definition

A Document Definition defines the principles of identification and processing of a particular type of document and contains:

·The document structure, i.e. a description of the allowable order of pages for documents of this type, which defines how documents should be assembled

·Definitions of document sections

·A list of rules that field data should satisfy

·The locations of fields and their signatures in the data window (data form view)

·Document export settings

·Document processing settings

Document Definition identification

A process of selecting the required Document Definition with the help of identifiers.

Document Definition matching

A process of selecting a Document Definition and matching its fields against an image.

Document Definition publication

Allowing access to a new Document Definition version once it has been edited. A published version participates in the processing of documents from work batches, while an unpublished, local version can participate only in the processing of Document Definitions from test batches.

Document Definition Section

A component of a Document Definition. Corresponds to one or several pages containing a logically complete set of fields. Fields within one section can continue from one page to the next (for example, multipage tables), while field sets from various sections do not intersect.

A section definition can be flexible or fixed.

Document identification

The process of assigning documents to one of several predetermined document types.

Document set

A set of logically related documents that are used for a specific purpose. For instance, a business process may be initiated by a set of documents provided by an applicant consisting of a filled out application form and some accompanying documents. Depending on the information provided by the applicant on the application form, some of the accompanying documents may be optional while others must be enclosed with the application.

Document text

All of the text from the document that was captured from the document during preliminary recognition, before the FlexiLayout is applied. You may choose to save this text (requires additional space on the hard disk) so that it can be used during verification.

Document type

A number of documents that have several characteristics in common and play a specific role in business processes.

Some examples of document types are invoices, contracts and passports.

Document variant

A number of documents belonging to the same type that share several characteristics.

Examples of document variants include invoices from different vendors and credit statements from the same bank.

Dot-matrix printer

A type of recognizable text that represents a text printed with a dot-matrix printer.

dpi

Dots per inch. Number of dots per inch; a measurement unit of image resolution.

E

Entity

A field or a group of fields containing information that needs to be extracted by means of NLP technology. Examples of entities include: people, companies, places, amounts, and dates.

Environment variable

A string that is used to store text, e.g. system settings. Environment variables may be used to store database connection strings and variables that are used when specifying the names of exported files.

Error / warning

The error / warning occurs when data extracted from one or more fields does not satisfy rules that are applied during automatic checks or does not match the specified format. There are two different types of errors and warnings:

·single-field error / warning are generated by rules and formats that affect one fields;

·multi-field error / warning are generated by rules that affect multiple fields.

Explanatory text

A machine-readable form element that represents a descriptive text (form name, field names, explanations to fields, etc.).

Export

A process of transferring processed data to an external information system or file.

Export profile

A set of settings that determines what is done with processed data: the format of output files, the output path, export conditions, etc.

External database

A text file or an ODBC-compatible database that stores reference data. Reference data may include the possible values of captured fields or information required for capturing fields.

F

Field

A document element intended for data extraction. Fields may be simple (without an internal structure) or composite, such as the table field where each cell can be viewed as a separate subordinate field of the table.

Field region

An image region highlighted in the Document Definition and intended for data extraction.

Field verification

A verification mode whereby recognized characters are submitted for verification within the context of a field.
Details...

In the field verification mode, uncertain characters are checked within the context of the entire field. Fields with the option Send to field verification enabled are submitted for field verification. We recommend submitting for field verification those fields whose values range is known or can be determined easily. Examples of such fields are country or city names: we know what values this field can have.

Field with several instances

A field used to describe several objects of the same type (recurring objects). In essence, these multiple objects are one and the same field and share the same properties. Fields with several instances are used to avoid the need to create several identical fields. Fields with several instances are exported to separate files or database tables.

Field with several regions

A field consisting of several regions on the image. Such regions may be located at a distance from one another and even on different pages. Values from all regions belonging to the same field are combined and exported together as one field. Normally used for objects located on several pages, such as large tables.

Field without a region

A field detected in a Document Definition but not having a region on the image.

Fixed form

A document with fixed information fields whose formatting, number and layout are strictly defined and do not change from one document instance to another.

Fixed Document Definition

A definition of a document or its section designed for processing fixed forms. Fields in a fixed Document Definition have fixed locations.

FlexiLayout

Description of the semi-structured document structure. This description is designed with ABBYY FlexiLayout Studio and exported to ABBYY FlexiCapture. File format *.afl. FlexiLayout is a kind of instruction for detecting and identifying fields in a flexible form.

FlexiLayout variant

A FlexiLayout for a document variant that was either developed specifically for this document variant or was trained on this document variant. Used in conjunction with a generic FlexiLayout.

Flexible Document Definition

A definition of a document or its section designed for processing semi-structured documents. Created by attaching a FlexiLayout. Fields in such a Document Definition do not have fixed locations. They are detected with the help of a FlexiLayout.

Form

A document comprising one or several pages designed to be filled out by a person by hand or using any other printing technique.

Framed text

Type of text marking where a frame delimits the text.

Show...

Framed text over a comb

Type of text marking where text is delimited by a frame with a bottom boundary shaped as a comb.
Show...

G

Gray background form

A form in which all information fields are white rectangles against a gray background that disappears during scanning.

Group verification

A verification mode whereby identically recognized characters are submitted for verification in groups. Details...

Fields for which the option Send to group verification is enabled are submitted for group verification. We recommend submitting characters from number fields as well as checkmarks for group verification.

H

Handprinted text

A type of recognizable text that represents a text printed by hand in distinct type.

Hot folder

A folder on the hard drive of a local or remote computer, which is used for importing images. It is normally used for periodically recurring image uploads without the user's involvement.

I

Identifier

A static element used for certain selection of a Document Definition from among several Document Definitions with identical locations of anchors. The option Use for Document Definition identification must be enabled in the properties of such static elements.

Identity provider

A third-party system, such as Azure AD, OneLogin or Okta, that manages identity information and provides authentication services to its clients, enabling an end-user to access all authorized resources in his/her local area network by entering their credentials only once.

Ignored character

A character occurring inside words (for example, a bullet) or a soft hyphen character (tabulation, etc.) whose presence does not prevent the program from attributing the word to a recognizable data type.
Details...

These characters are excluded from words, i.e. the words are attributed to particular data type without these characters.

Image

An electronic image of a scanned page from a hardcopy document.

Image despeckling

Removal of noise from the image. Noise can appear during scanning, and it is recommended that it be removed to enable better data recognition. During despeckling, the program also removes background dots or boundary lines of raster forms.

Image import

A process of adding images to a batch for processing. Import can be performed by adding images from files, from a scanner or using import profiles.

Image rotation

Rotation of an image around its center.

Import profile

A combination of settings used to add images to a batch: import source, image processing options, Hot Folder cleanup options, etc.

Incorrectly recognized character

Status automatically assigned to a character in the process of recognition if it has been recognized with a considerable degree of uncertainty.

Index field

A field whose value is used to index documents for sorting and search purposes.

Inverted image

An image with light-colored text against a dark background.

Invoice

A document that lists goods that have been supplied, their quantity, price, characteristics (such as color, weight, etc.), shipment conditions, and details of the parties. Invoices can be processed by means of a separate solution, ABBYY FlexiCapture for Invoices.

ICR, Intelligent Character Recognition

This refers to technologies or systems designed for mass processing of documents filled with handprinted letters and numbers, i.e. recognition of handprinted characters.

K

Key field

A field that enables automatic checking of page assembly into documents. The values of key fields must be identical on all pages of the same document.

L

Language (local)

A field property that determines the writing language and relevant sets of regional parameters (such as the date or address writing style).

Layout

The location of fields on a document image. Layouts can be generated automatically or created manually.

Letters in frames

Type of text marking where every character is delimited by a frame; frames are not isolated from one another.
Show...

Letters in isolated frames

Type of text marking where every character is delimited by a frame; frames are isolated from one another.
Show...

Letters over a comb

Type of text marking where a "comb" delimits the text.
Show...

M

Machine-printed text

A type of recognizable text that has been printed using typographic equipment or a laser or ink-jet printer with a minimum resolution of 300 dpi.

Machine-readable form

A form designed especially for automated input. It contains work elements (anchors, barcodes, lines, etc.) that are required to process it successfully.

Manual entry field

A Document Definition field containing unrecognizable text (for example, text consisting of fused letters) that has to be entered from the keyboard.

MRC (Mixed Raster Content)

A compression method used for images that contain both text and raster fragments. The image is analyzed into fragments and an optimal compression algorithm is selected for each. This approach provides better compression ratios while maintaining the visual quality of images.

Monospaced text

Type of text marking where each letter is located within a frame of the same height and width, but the frame border disappears during scanning.

Multipage document

A document made up of several pages.

Multitenancy

A feature allowing several independent users to use ABBYY FlexiCapture. The data of each tenant is completely isolated from other tenants and the system allocates a portion of its resources to each tenant.

N

NER (Named Entity Recognition)

An information extraction task that seeks to locate and classify named entity mentions in unstructured text.

NLP (Natural Language Processing)

A subfield of artificial intelligence and computational linguistics that studies computer analysis and synthesis of natural languages. One application of NLP is information extraction. Other uses of NLP include machine translation, chatbots, document classification, and sentiment analysis.

NLP model

A mechanism that determines what entities and segments should be extracted form texts and how. The subject area and the extraction algorithm are selected when training an NLP model.

O

OCR (Optical Character Recognition)

Optical recognition of printed texts.

OMR (Optical Mark Recognition)

This technology enables ABBYY FlexiCapture to both recognize ordinary marks (ticks, crosses, etc.) on forms with a high degree of certainty and to correctly identify marks that were made by mistake and then inked out.

Operator

A user of ABBYY FlexiCapture who is tasked with document entry: adding images, performing recognition and verification, exporting recognized data.

Operator role

The property of a user account in ABBYY FlexiCapture, which determines what data are accessible to the user and what actions can be performed on these data.

Overlay

The process of combining a scan of a filled-out form with an image of a blank example of the same form in the Document Definition editor.

P

Page

Image of a paper document page and results of its processing.

Page layout

A scheme showing the location of fields on an image.

Page orientation

Page location relative to the standard alignment: top to bottom, left to right. Page orientation can be determined automatically during page image recognition; to this end ABBYY FlexiCapture allows you to specify possible orientations.

Picture

An element of a machine-readable form that is not subject to recognition but intended for export in the form of a graphic object (for example, a file).

Picture field

A Document Definition field containing a picture.

Precision

A characteristic that lets the user evaluate the automatic classification quality. It is calculated by dividing the number of correctly identified class A documents by the total number of all documents identified as class A (both correctly and incorrectly).

Prerecognition

Full-text recognition of document images to facilitate field detection by means of a Document Definition.

Processing power

The average number of pages, documents or batches processed during a specific period of time.

Processing stage

A workflow stage where certain actions are performed on a document or batch (either automatically or by an Operator). See Processing stages and queues.

Prohibited character

A character that you are certain will not occur in the data being recognized.
Details...

Specifying such characters may considerably increase the speed and quality of recognition. For example, when recognizing texts with only uppercase letters, specify all lowercase letters as prohibited characters.

Project

A project is a single environment uniting the document batches and settings required to process them, such as Document Definitions, import profiles, etc.

Q

Queue

Documents grouped into tasks and/or batches, waiting to be processed at a certain processing stage. See Processing stages and queues.

R

Raster form

A form in which information fields are represented as white rectangles against a gray background consisting of raster lines or rectangles delimited by raster lines.

Raster line

A line consisting of equally spaced dots.

Recall

A characteristic that lets the user evaluate the automatic classification quality. It is calculated by dividing the number of correctly identified class A documents by the total number of all class A documents.

Recognition

A process of matching image elements against specific characters.

Recognition

Language that ABBYY FlexiCapture bases on when recognizing.

Reference classes

A reference class is a class that has been assigned to a document by an expert during manual classification. Both a section of a document, as well as a document variant, can be a reference class.

Reference layout

A user-created layout that is used as a reference for automatically created layouts. This comparison serves to evaluate how well the program detects field regions.

Resolution

Image parameter. Resolution is measured in dots per inch (dpi).

Result classes

A result class is a class that has been assigned to a document during an automatic classification.

Rule validation

An automatic check of recognized data against preset rules. See Rule validation.

Rules

Certain conditions imposed on data in fields and automatically checked by the program.

S

Scanning

A process of getting an electronic image of a paper form using a scanner.

Segment

A text fragment consisting of one or more paragraphs that contains data that needs to be extracted. A segment can also be a field that needs to be extracted (for example, conditions for terminating an agreement).

Segmentation

The process of identifying segments. Segmentation precedes information extraction and is useful in the case of large documents, as it narrows down a search for entities to specific text fragments.

Section

A logically distinct part of a document that contains a set of extractable fields. Sections are used for various purposes during the recognition process, such as assembling documents from pages. Sections can include a single page or multiple pages and can be fixed or flexible.

Semi-structured document

Document containing a set of information fields whose design, number and layout may vary significantly in different instances of the document. See What types of documents can be processed with ABBYY FlexiCapture.

Separator

A machine-readable form element representing a vertical or horizontal line.

Service field

A field that does not have a region on the document image. The values of service fields are determined automatically based on data from the source indicated in their properties.

Set of allowable characters

A set of characters occurring in the data type being recognized.
Details...

This set is determined by the data type. That is, the type of data attached to a field determines the set of characters used during recognition.

In addition to selecting characters included in this set, you may configure additional parameters restricting this set. For example, you may specify:

·Characters that you know will not occur when a given field is recognized prohibited characters (for example, you may specify all lowercase letters as prohibited for a field where only uppercase characters may occur).

·Characters that may occur inside words without affecting their verification ignored characters (for example, hyphens, stress marks, etc.).

Simple text

A type of text marking where text is inserted in a block without any delimiters.

Single-flow data input

Automated data extraction from analog (printed) and digital (scanned image) documents.

Single-flow document input

Automated conversion of hardcopy documents into electronic form.

SLA (service level agreement)

An agreement governing the provision of IT services. In ABBYY FlexiCapture 12, an SLA agreement governs the deadlines for processing batches.

Static elements

Unrecognizable elements intended for Document Definition matching and identification. Such elements are: anchors, anchor text, separators, anchor barcodes.

Summary section

The summary section is a Document Definition section that displays of all the main fields in a document set. This makes it much easier for Operators to review documents in a set because they will be able to see all of the errors and low-confidence data in one place and only open the documents that need to be reviewed instead of opening each document.

T

Table

Data arranged in a two-dimensional grid that is not necessarily visible. The program processes tables consisting of columns with same-type data and repeating rows.

Table field

A Document Definition field containing a table. It is a composite field, with every table column representing a set of fields of the same type: text, checkmarks, barcodes or pictures.

Task

A set of documents from the same batch to be processed together. Depending on the project settings and the processing stage, a task may contain different numbers of documents. If a processing stage requires a batch to be processed in its entirety, the whole batch is included in the task. When verification tasks are formed automatically, each task contains 10 documents (if a batch contains fewer than 10 non-verified documents, they are all processed as one task).

Tenant

An isolated instance of ABBYY FlexiCapture that can be used independently from other users.

Test batches

Document batches designed for Document Definition testing and configuration. Local copies of document batches are used to process test batches.

Text field

A machine-readable form element designed for text entry when filling out a form.

Text field marking

A graphic element delimiting a text field: frame, comb, line.

Text marking

The design of a page region intended for text input.

Text orientation

Direction of text in a field relative to the page.

Text recognition (OCR, ICR)

Conversion of a graphic image to text.

Text sample

A file containing samples of all alphabet characters.

Training [Document Definition]

A feature in ABBYY FlexiCapture for Invoices that allows users to train the program to capture data from specific kinds of invoices. Training improves the quality of data capture and can be done either when setting up the program or while processing invoices.

Training batches

A batch of documents used for training and testing a Document Definition for a specific document variant. Training a Document Definition on a training batch creates a FlexiLayout variant. See also document batch, document variant, FlexiLayout variant.

Typewriter

A type of recognizable text that represents a text printed with a typewriter.

U

Underlined text

Type of text marking where underlining delimits the text.
Show...

User dictionary

An auxiliary dictionary created by the user which contains words not included in the built-in dictionaries. Built-in dictionaries can be supplemented with a user dictionary to improve the quality of data capture. Typically, a user dictionary will contain specialized terms, abbreviations, company names, etc.

Unrecognizable region

An image region excluded from recognition. An unrecognizable region is required to exclude a region with explanatory text or picture that complicates field recognition.

Unstructured document

A document containing information presented in a free form. Examples of such documents are contracts, letters, orders, graphs.

V

Vendor

A legal or physical person that sells goods or services. Vendors issue invoices for their goods and services. Data from invoices can be captured by means of ABBYY FlexiCapture for Invoices.

Verification

Verification consists in checking that the data have been recognized, pages have been assembled into documents correctly, and rules returned no errors. Verification is done on the Data Verification Station (where recognition accuracy is verified) and on the Verification Station (where all types of checks can be performed).

W

Work batches

Document batches intended for data input. Only published Document Definitions are used for processing work batches.

Writing style

A manner of writing that is specific to a particular group. For example, the American manner of writing numbers.
Details...

This option is used for configuring the writing style of handprinted letters in forms. The choice of a writing style depends on the area where form processing takes place (Russia, Germany, the Czech Republic, the USA, etc.).

X

XFD

XML Form Definition (*.xfd) a special file format of a form designed with ABBYY FormDesigner. An XML Form Definition format file is used to create Document Definitions in ABBYY FlexiCapture.


Patents

U.S. Patent Nos. 5,490,216, 5,625,465, 5,768,416 and 6,094,505


Third-party technologies

© 1984-2011 Adobe Systems Incorporated and its licensors. All rights reserved.

Protected by U.S. Patents 5,929,866; 5,943,063; 6,289,364; 6,563,502; 6,639,593; 6,754,382; Patents Pending.

Adobe, the Adobe logo, Acrobat, the Adobe PDF logo, Distiller and Reader are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries.

Portions of this computer program are copyright © 2008 Celartem, Inc. All rights reserved.

Portions of this computer program are copyright © 2011 Caminova, Inc. All rights reserved.

Portions of this computer program are copyright © 2013 Cuminas, Inc. All rights reserved.

DjVu is protected by U.S. Patent No. 6,058,214. Foreign Patents Pending.

Powered by AT&T Labs Technology.

PixTools © 1994-2007 EMC Corporation. All rights reserved.

WIBU, CodeMeter, SmartShelter, SmartBind are registered trademarks of Wibu-Systems.

Portions of this software are copyright © 2012 University of New South Wales. All rights reserved.

© 2001-2006 Michael David Adams

© 1999-2000 Image Power, Inc.

© 1999-2000 The University of British Columbia

This software is based in part on the work of the Independent JPEG Group.

© 1991-2013 Unicode, Inc. All rights reserved.

The Unicode Word Mark and the Unicode Logo are trademarks of Unicode, Inc.

Portions of this software are copyright © 1996-2002, 2006 The FreeType Project (www.freetype.org). All rights reserved.

© ParaType, 2003

EMC2, EMC, Captiva, ISIS and PixTools are registered trademarks, and QuickScan is a trademark of EMC Corporation.

Kodak is a registered trademark of Eastman Kodak Company.

.NET, Access, Active Directory, ActiveX, Aero, Excel, Hyper-V, InfoPath, Internet Explorer, JScript, Microsoft, Office, Outlook, PowerPoint, SharePoint, Silverlight, SQL Azure, SQL Server, Visual Basic, Visual C++, Visual C#, Visual Studio, Windows, Windows Azure, Windows Power Shell, Windows Server, Windows Vista, Word are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

Oracle and Java are registered trademarks of Oracle and/or its affiliates.

All other trademarks are the property of their respective owners.

The TWAIN Toolkit is distributed as is. The developer and distributors of the TWAIN Toolkit expressly disclaim all implied, express or statutory warranties including, without limitation, the implied warranties of merchantability, noninfringement of third party rights and fitness for a particular purpose. Neither the developers nor the distributors will be liable for damages, whether direct, indirect, special, incidental, or consequential, as a result of the reproduction, modification, distribution or other use of the TWAIN Toolkit.

JasPer License Version 2.0

© 2001-2006 Michael David Adams

© 1999-2000 Image Power, Inc.

© 1999-2000 The University of British Columbia

All rights reserved.

Permission is hereby granted, free of charge, to any person (the "User") obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

1.The above copyright notices and this permission notice (which includes the disclaimer below) shall be included in all copies or substantial portions of the Software.

2.The name of a copyright holder shall not be used to endorse or promote products derived from the Software without specific prior written permission.

THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. NO ASSURANCES ARE PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.


Technical support

Should you have any questions about using ABBYY FlexiCapture, please consult the detailed description of functionality in the Help Topics and User Guide supplied with ABBYY FlexiCapture. You may also browse the technical support section on our Website www.abbyy.com where you may find an answer to your question.

To provide expert advice, our technical support service requires the following information:

·Last name, first name, patronymic

·Organization name

·Phone number (fax, e-mail address)

·Serial number of your installation package

·Build (see Help → About ABBYY FlexiCapture)

note Note: To find out the current version of the web station and the server, click the ABBYY logo in the bottom right corner of the page.

·General description of the problem with the full error message text (if available)

·PC and processor type

·Windows OS version

·Other information you consider important


End-User License Agreement (EULA)

ABBYY® FlexiCapture®

Important! Read the following terms carefully before installing, copying and/or otherwise using ABBYY® FlexiCapture® (hereinafter referred to as “the SOFTWARE”). Installing, copying or otherwise using the SOFTWARE indicates Your acceptance of these terms.

This End-User License Agreement (hereinafter referred to as the "EULA") is a legal agreement between You, the end user, who obtained or is using the SOFTWARE, on the one hand and ABBYY, on the other.

This EULA comes into effect when You demonstrate Your consent to be bound by its terms by selecting the “I accept the terms of the license agreement” button followed by selecting the “Next” button and installing the SOFTWARE, or when You install, copy or start using the SOFTWARE in any manner. Any such act is deemed to demonstrate Your acknowledgment that You have read this EULA, that You understand it and agree to be bound by its terms. If You do not agree to the terms of this EULA, do not use the SOFTWARE and disable, remove it from Your system, and destroy any copies of the SOFTWARE in Your possession. This EULA is binding for the entire period that You use the SOFTWARE unless otherwise stated in this EULA or in a separate written agreement with ABBYY.

The SOFTWARE is protected by copyright laws and international treaty provisions and some portions are protected by patent and trade secret laws. The SOFTWARE is licensed to You under this EULA, not sold to You. You agree that this EULA is enforceable like any written negotiated agreement signed by You. This EULA is enforceable against You.

If a separate written agreement with regard to the SOFTWARE has been concluded with ABBYY, then, in the event of any discrepancy between that agreement and this EULA, the terms of the separate agreement shall prevail over any inconsistent term in this EULA. Any terms and conditions contained in Your purchase orders or other documents shall not modify this EULA or expand ABBYY’s obligations hereunder. The EULA may be available in different languages. There may be inconsistencies or differences in interpretation between the English version of the EULA and those EULAs made available in other languages. For the sake of uniformity and to avoid any ambiguity, the English version of the EULA shall govern in all disputes, claims or proceedings to interpret, enforce or otherwise relating to the EULA.

Definitions

"ABBYY" means

ABBYY USA Software House Inc., registered at 890 Hillview Court, Suite 300, Milpitas, California, 95035, USA, when article 15.1 of this EULA applies;

ABBYY Japan Co., Ltd., registered at 2-5-14 Shin-Yokohama, Kohoku-ku, Yokohama-shi, Kanagawa-ken 222-0033, Japan, when article 15.2 of this EULA applies;

ABBYY Europe GmbH, registered at Landsberger Str. 300, 80687 Munich, Germany, when article 15.3 of this EULA applies;

ABBYY UK Ltd., registered at Centrum House, 36 Station Road, Egham, Surrey, TW20 9LF, United Kingdom, when article 15.4 of this EULA applies;

ABBYY PTY Ltd., registered at Citigroup Building’, Level 13, 2-26 Park Street, Sydney NSW 2000, Australia, when article 15.5 of this EULA applies;

ABBYY Production LLC, registered at ul. Otradnaya dom 2B, korpus 6, office 14, 127273, Moscow, Russia, when article 15.6 of this EULA applies;

and ABBYY Solutions Ltd., registered at Michail Karaoli 2, Egkomi CY 2404, Nicosia, Cyprus, in all other cases.

“ABBYY Partner” means an entity or individual that is authorized by ABBYY to resell and distribute licensed copies of the SOFTWARE to End Users, either directly or through one or more sub-resellers or sub-distributors.

“Computer” means a specific physical device or virtual machine that may consist of one or more CPU (central processing unit) cores and running a specified operating system. Any changes to the configuration or composition of the Computer could result in the Computer being treated as a different Computer for licensing purposes.

“Intellectual Property Rights” means all intellectual and industrial property rights and includes rights to (i) inventions, discoveries, and letters patent, including applications therefor, reissues thereof, and continuation and continuations in part; (ii) copyrights; (iii) designs and industrial designs; (iv) trademarks, service marks, trade dress and similar rights; (v) know-how, trade secrets, and confidential information; (vi) integrated circuit topography rights and rights in mask works; and (vii) other proprietary rights.

“License” means the non-exclusive limited right granted to You by ABBYY to install and use the functionality of the SOFTWARE in accordance with the terms and conditions of this EULA.

“SOFTWARE” means ABBYY FlexiCapture including any and all of the software components embedded in it or made available online or in other ways, including, but not limited to, executable, help, demo, sample, and other files; libraries, databases, samples, associated media (images, photos, animations, audio components, video components, music, etc.), printed materials, and other software components.

“Station” means a part of the SOFTWARE, that can be installed as a separate SOFTWARE application, or as a thin browser-based client, or as a mobile app, and solves one or more tasks constituting the functionality of the SOFTWARE.

“You”, “Your” and “End User” refer to and include any person and/or any entity that obtained this SOFTWARE for his/her or its own use and not for purposes of further resale and any actual user of the SOFTWARE.

1. License Grant

1.1 Subject to the terms and conditions of this EULA, ABBYY grants to You a limited, non-exclusive License to install and use the functionality of the SOFTWARE subject to all restrictions (limitations) and the scope of the License as may be provided by, this EULA, the software and/or hardware license keys provided by ABBYY (“License Key”), the SOFTWARE, and/or a separate written agreement between You and ABBYY or an ABBYY Partner, and/or the documentation accompanying the purchase. In this case, the separate written agreement between You and the ABBYY Partner may not exceed the scope of the license granted and restrictions specified in this EULA and/or in the separate agreement with ABBYY, and/or impose additional duties on ABBYY. The ABBYY Partner’s documentation accompanying the purchase of the SOFTWARE may not contradict the terms of the EULA, the separate agreement with ABBYY and ABBYY’s written instruments concerning the terms of use and/or purchase of the SOFTWARE.

All of the provisions stated herein apply to both the SOFTWARE as a whole and to all of its separate components and end-user documentation with the exception of the third party software included in the SOFTWARE, which is covered by its own license terms as specified in article 14. Any issue with respect to the scope of Your License shall be construed in favour of the restrictions on the scope of Your License. Restrictions on Your use of the SOFTWARE and the scope of Your License may include, but are not limited to, the following:

1.1.1. Number of Stations. The types of Stations and permitted number of their installations may be limited.

1.1.2. Processing volume. The number of volume units (e.g. pages, words, symbols) that may be processed with the SOFTWARE may be limited in one or more ways, such as limitations on the number of volume units that may be processed within particular time periods, such as monthly or annually, or on the overall number of volume units that may be processed. The size of a page or other volume unit may also be limited.

1.1.3 Duration. Use of the SOFTWARE may be limited to a specific period of time, and the SOFTWARE may not be used after the expiration of such time period.

1.1.4 If You licensed the SOFTWARE on a subscription basis, Your rights to use the SOFTWARE are limited to the subscription period. After the expiration of Your subscription period, the functionality of the SOFTWARE will be no longer available until You make a payment to extend Your subscription period. You may extend Your subscription period at any time during the subscription period. If You extend Your subscription period, you may continue using the SOFTWARE until the end of Your extended subscription period.

Additional terms and conditions of use of the SOFTWARE on a subscription basis may be set forth in a separate agreement between You and ABBYY or an ABBYY Partner, which you shall accept before obtaining (purchasing) the SOFTWARE on a subscription basis.

1.1.5 Features, Add-ons, and Custom Components. The use of particular features, add-ons, and/or custom components of the SOFTWARE may be limited by License Key and/or written agreement between You and ABBYY or an ABBYY Partner, and/or the documentation accompanying the purchase.

1.1.6 Processing Power. The number of CPU (central processing unit) cores of the Computers which can be utilized by the SOFTWARE may be limited by License Key and/or written agreement between You and ABBYY or an ABBYY Partner, and/or the documentation accompanying the purchase.

1.2 All rights not expressly granted to You by the EULA are reserved by ABBYY. This EULA does not grant You any rights in connection with any trademarks of ABBYY.

1.3 If Article 15.6 applies and You are a natural person, You may use the SOFTWARE worldwide. If You are an entity, You can obtain (purchase) the SOFTWARE in the countries listed in the Article 15.6. only if You or Your branch and/or representative offices are registered in these countries, unless otherwise agreed in a separate written agreement between You and ABBYY. The employees of the entity or of its branch and representative offices may use the SOFTWARE worldwide, provided the SOFTWARE has been obtained and installed in the country where the entity or its branch and representative offices are registered.

1.4. Any use of the SOFTWARE or its component parts outside of or in contravention of the terms and conditions of this EULA shall constitute a breach of ABBYY’s and/or third parties’ Intellectual Property Rights and shall give cause for the revocation of all rights to use the SOFTWARE granted to You under this EULA.

1.5 If You deploy or use the SOFTWARE in a virtual environment, including, without limitation, by means of VMware, Citrix or ghosting, the access to or use of the SOFTWARE may in no way exceed the restrictions on the SOFTWARE, or the scope of the License that has been granted. For instance, one and the same License Key may not be used to permit use or access to the SOFTWARE in a virtual environment by a number of Computers that is greater than the number of Computers for which a License has been properly obtained, nor may the SOFTWARE be used to process more than the total number of pages that has been permitted.

1.7 If You use the SOFTWARE by means of a Web browser, You may simultaneously access the SOFTWARE by as many stationsas permitted by the scope of Your License and specified in the License Key.

1.8 You may receive the SOFTWARE on more than one medium (multiple-media SOFTWARE), including downloads over the Internet. Regardless of the quantity or type of media You receive, You are only licensed to use the SOFTWARE in accordance with the scope of Your License.

2. Limitations of Use

2.1 All terms of use and limitations governing the use of the SOFTWARE are stated in this EULA, unless additional terms of use or limitations are stipulated in a separate written agreement between You and ABBYY or an ABBYY Partner or in other documentation accompanying the SOFTWARE, provided that the ABBYY Partner’s agreement and documentation may not impose additional duties on ABBYY.

2.2 You may not perform or make it possible for other persons to perform any activities included in the list below:

2.2.1 Reverse engineer, disassemble, decompile (i.e. reproduce and transform the object code into source code) or otherwise attempt to derive the source code for the SOFTWARE or any part, except, and only to the extent, that such activity is expressly permitted by applicable law notwithstanding this limitation. If applicable law prohibits the restriction of such activities, any information so discovered must not be disclosed to third parties except as such disclosure is required by law and such information must be promptly disclosed to ABBYY. All such information shall be deemed to be confidential and proprietary information of ABBYY.

2.2.2 Modify, adapt (including any changes for the purpose of enabling the SOFTWARE to run on Your hardware), or make any changes to the object code of the SOFTWARE, applications and databases contained in the SOFTWARE other than those provided for by the SOFTWARE and described in the documentation.

2.2.3 Correct errors in the SOFTWARE or translate the SOFTWARE without the prior written consent of ABBYY.

2.2.4 Rent, lease, sublicense, assign or transfer any rights granted to You by this EULA and other rights related to the SOFTWARE to any other person or authorize all or any portion of the SOFTWARE to be copied onto other Computers (except as described in article 2.5) unless otherwise authorized in writing by ABBYY.

2.2.5 Make it possible for any person not entitled to use the SOFTWARE to access and/or use the SOFTWARE, including without limitation in a multi-user system, virtual environment, or via the Internet.

2.2.6 Remove, change or obscure any copyright, trademark or patent notices that appear on the SOFTWARE as delivered to You.

2.3 You may not use the SOFTWARE to provide paid or free services based on the SOFTWARE functionality (including recognition, conversion, document capture and classification) and/or to provide the results or access to the results acquired through the use of the SOFTWARE as a part of another service that has the SOFTWARE functionality (including recognition, conversion, document capture and classification) as its component to any third party unless You have entered into a separate written agreement with ABBYY.

2.4 You may not bypass the SOFTWARE’s user interface that is provided with the SOFTWARE, or use the SOFTWARE in aggregate with any other software unless you have entered into a separate written agreement with ABBYY.

2.5 You may only make a one-time permanent transfer of this SOFTWARE directly to another end user. If You are an entity, such a transfer requires written approval by ABBYY. Such transfer must include all of the SOFTWARE (including all copies, component parts, the media and printed materials, and any updates) and this EULA. Such transfer may not be by way of consignment or any other indirect transfer. The transferee of such one-time transfer must agree to comply with the terms of this EULA, including the obligation to not further transfer this EULA and SOFTWARE. You must uninstall the SOFTWARE from Your Computer or from Your local area network in the event of such SOFTWARE transfer.

3. Pre-release, Trial or Demo SOFTWARE

3.1 If the SOFTWARE You have received with this License is a pre-commercial release or Beta-Release Software, provided for a trial or for demonstration, verification or testing purposes, has limited or less than full functionality, labeled “Not for Resale”, “Trial”, “Demo” or was provided at no charge (“Restricted Software”), then this article 3 shall apply until such time that You obtain (purchase) a License for the full version of the SOFTWARE. To the extent that any provision in this is in conflict with any other term or condition in this EULA, this article shall supersede such other term(s) and condition(s) with respect to the Restricted Software, but only to the extent necessary to resolve the conflict.

3.2 THE RESTRICTED SOFTWARE IS PROVIDED TO YOU “AS IS” AND WITHOUT WARRANTY OR INDEMNITY (EXPRESS, IMPLIED OR STATUTORY) OF ANY KIND. THE RESTRICTED SOFTWARE DOES NOT REPRESENT FINAL SOFTWARE FROM ABBYY, AND MAY CONTAIN BUGS, ERRORS AND OTHER PROBLEMS THAT COULD CAUSE SYSTEM OR OTHER FAILURES AND DATA LOSS. TO THE GREATEST EXTENT ALLOWABLE UNDER APPLICABLE LAWS, NO WARRANTY SHALL APPLY TO THE RESTRICTED SOFTWARE, AND FOR CLARITY YOU ACKNOWLEDGE THAT ABBYY DISCLAIMS ANY WARRANTY OR LIABILITY OBLIGATIONS TO YOU OF ANY KIND INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, NON-INFRINGEMENT, QUIET ENJOYMENT, AND FITNESS FOR A PARTICULAR PURPOSE. WHERE LIABILITY CANNOT BE EXCLUDED BUT MAY BE LIMITED, ABBYY’S TOTAL LIABILITY AND THAT OF ITS PARTNERS SHALL BE LIMITED TO THE SUM OF FIFTY UNITED STATES DOLLARS (U.S. $50) OR THE TOTAL AMOUNT YOU PAID FOR THE SOFTWARE, WHICHEVER IS GREATER.

3.3 Restricted Software may have limited functionality, such as having functionality for a limited period of time, and upon expiration of permitted functionality (“time-out”), Your access and ability to use the Restricted Software may be disabled. Upon a time-out, Your rights under the EULA shall terminate, unless You obtain a new License from ABBYY.

3.4 Restricted Software for which there has not been a commercial release.

3.4.1 Restricted Software for which there has not been a commercial release constitutes the Confidential Information of ABBYY.

3.4.2 As to Restricted Software for which there has not been a commercial release, ABBYY does not promise or guarantee, has no express or implied obligation, and You acknowledge that ABBYY has not promised or guaranteed, that such software will be further developed, or that a commercial version will be announced or made available in the future. ABBYY may not introduce a software product similar to or compatible with such software. Accordingly, You acknowledge that any use, research or development that You perform regarding such software is done entirely at Your own risk.

3.4.3 You agree to provide feedback to ABBYY regarding testing and use of the Restricted Software, including error or bug reports (“Feedback”), and to entirely transfer and grant to ABBYY all rights in such Feedback, including without limitation, the rights to use, publish and disseminate the Feedback. All Feedback constitutes the confidential information of ABBYY.

3.4.4 Confidentiality of Restricted Software for which there has not been a commercial release and its Results:

You agree not to disclose accompanying written, oral or electronic information divulged to You by ABBYY related to the Restricted Software for which there has not been a commercial release. Any information about the quality of such Restricted Software or the quality of the results acquired through the use of such Restricted Software, Feedback, and any information about bugs, errors and other problems discovered by You in the Restricted Software for which there has not been a commercial release are the confidential information of ABBYY.

3.4.5 You shall not disclose confidential information. The term “disclose” means to display, describe, copy, lease, loan, rent, assign, transfer or provide access, over a network or otherwise, to confidential information reproduced in any form, including oral communications, to any third party.

3.4.6 You shall take all reasonable steps to prevent the disclosure of confidential information and to keep it confidential.

3.4.7 You shall promptly inform ABBYY if You become aware of any disclosure of confidential information. If You are in breach of the terms and conditions set forth in articles 3.4.4-3.4.6 above, You shall compensate ABBYY for any loss resulting from such breach.

3.4.8 Upon receipt of a later version of Restricted Software or a commercial release of such software, whether as a stand-alone product or as part of a larger product, You agree to return or destroy all earlier versions of the Restricted Software received from ABBYY.

3.4.9 If You have been provided the Restricted Software pursuant to a separate written agreement, Your use of the SOFTWARE is also governed by such agreement. To the extent that any term or condition of a separate written agreement, such as the Mutual Non-Disclosure Agreement, are in conflict with any term or condition of this EULA, a separate written agreement shall supersede such other term(s) and condition(s) with respect to the SOFTWARE, but only to the extent necessary to resolve the conflict.

4. Not-for-resale SOFTWARE

4.1 If the SOFTWARE is labeled "Not for Resale" or "NFR," then, notwithstanding other articles of this EULA, You may only use such SOFTWARE for demonstration, verification or testing purposes.

5. Updates

5.1 If the SOFTWARE is labeled as an update, You must own a license for the previous version of the SOFTWARE identified by ABBYY as being eligible for this update in order to use the SOFTWARE.

5.2 The SOFTWARE labeled as an update replaces and/or supplements the product that formed the basis for Your eligibility for the update.

5.3 You may only use the resulting updated product in accordance with the terms of the EULA supplied with the update.

5.4 You acknowledge that any obligation ABBYY may have to support the version of the SOFTWARE being updated shall end upon the availability of the update.

6. Technical Support and Maintenance

6.1 You may be provided with ABBYY technical support and/or maintenance related to the SOFTWARE ("Support Services") subject to conditions of the current ABBYY support policy; however, You may be entitled to a different level of Support Services than is stated in the ABBYY support policy in accordance with a written agreement executed with ABBYY with respect to such Support Services. Also You may be entitled to certain support services by an ABBYY Partner in accordance with an agreement between You and the ABBYY Partner with respect to such support services under the stipulation that the ABBYY Partner’s agreement may not impose additional duties on ABBYY.

6.2 General terms and conditions of the ABBYY support policy are published on the ABBYY Web site www.abbyy.com. ABBYY reserves the right to change the support policy at any time without any prior notice.

6.3 In addition to the general terms and conditions, ABBYY may have specific support policies in specific regions which may be regulated by separate agreements.

6.4 Any supplementary software code and any SOFTWARE component provided to You as part of Support Services is to be considered a part of the SOFTWARE and subject to the terms and conditions of this EULA.

6.5 To be eligible for Support Services,You shall have a valid Support and Maintenance Agreement. If You have no valid Support and Maintenance Agreement, ABBYY reserves the right to withhold delivery of Support Services.

7. Ownership.

7.1 No title to any of ABBYY’s Intellectual Property Rights (including the SOFTWARE and any ABBYY patents, trademarks, or copyrights) is transferred to You. You shall not, in any way, during or after the term of the Agreement, make any use of or claim any right to any name, logo, trademark, pattern, or design owned by ABBYY, or any name, logo, trademark, pattern, or design resembling them.

7.2 No title to any of Your Intellectual Property Rights (including the application and any of Your patents, trademarks, or copyrights) is transferred to ABBYY.

7.3 The SOFTWARE contains valuable trade secrets and confidential information belonging to ABBYY and third parties and is protected by copyright laws, including, without limitation, by United States Copyright Law, laws of Russian Federation, international treaty provisions, and the applicable laws of the country in which it is being used or obtained.

7.4 All title and rights in and to the content that is not contained in the SOFTWARE, but may be accessible through the use of the SOFTWARE, are the property of the respective content owners and may be protected by applicable copyright or other intellectual property laws and international treaties. This EULA does not grant You any Intellectual Property Rights.

8. Limited Warranty: Disclaimers

8.1 If required by the legislation of the country in which You obtained (purchased) the SOFTWARE, ABBYY warrants that the media on which the SOFTWARE is furnished will be free from defects in materials and workmanship under normal use only and only for the minimal guarantee term determined by the legislation of the country in which You obtained (purchased) the SOFTWARE starting from the date You obtained (purchased) the SOFTWARE. If the SOFTWARE was obtained (purchased) in the countries enumerated in article 15.6. this period will constitute thirty (30) days starting from the date You obtained (purchased) the SOFTWARE.

8.2 EXCEPT AS EXPRESSLY PROVIDED IN THIS ARTICLE 8 (LIMITED WARRANTY, DISCLAIMERS), AND EXCEPT FOR ANY WARRANTY, CONDITION, REPRESENTATION, OR TERM TO THE EXTENT TO WHICH THE SAME CANNOT OR MAY NOT BE EXCLUDED OR LIMITED BY LAW APPLICABLE TO YOU IN YOUR JURISDICTION, THE SOFTWARE, (INCLUDING ANY THIRD PARTY SOFTWARE CONTAINED THEREIN), INCLUDING, WITHOUT LIMITATION, ANY SOFTWARE DOCUMENTATION, UPGRADES AND UPDATES IS BEING DELIVERED TO YOU “AS IS” AND ABBYY MAKES NO WARRANTIES, CONDITIONS, REPRESENTATIONS OR TERMS (EXPRESS OR IMPLIED WHETHER BY STATUTE, COMMON LAW, CUSTOM, USAGE OR OTHERWISE) AS TO ANY MATTER, INCLUDING WITHOUT LIMITATION ANY WARRANTIES OF NON-INFRINGEMENT OF THIRD PARTY RIGHTS, MERCHANTABILITY, INTEGRATION, SATISFACTORY QUALITY, OR FITNESS FOR ANY PARTICULAR PURPOSE, OR THAT THE SOFTWARE WILL CARRY NO ERRORS, MEET YOUR REQUIREMENTS, OR THAT THE SOFTWARE WILL FUNCTION PROPERLY WHEN USED IN CONJUNCTION WITH ANY OTHER SOFTWARE OR HARDWARE. ABBYY DOES NOT AND CANNOT WARRANT THE PERFORMANCE OR RESULT YOU MAY OBTAIN BY USING THE SOFTWARE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE LIES WITH YOU. FURTHERMORE ABBYY MAKES NO WARRANTIES FOR ANY THIRD PARTY SOFTWARE PRODUCTS WHICH MAY BE SUPPLIED WITHIN THE SOFTWARE.

9. Limitation of Liability

9.1 IN NO EVENT WILL ABBYY BE LIABLE TO YOU FOR ANY DAMAGES, BUSINESS INTERRUPTION, LOSS OF DATA OR INFORMATION OF ANY KIND, BUSINESS OR OTHERWISE, CLAIMS OR COSTS WHATSOEVER, OR ANY CONSEQUENTIAL, INDIRECT, INCIDENTAL, SPECIAL OR PUNITIVE DAMAGES, OR ANY LOST PROFITS OR LOST REVENUE RESULTING FROM AND/OR RELATING TO THE USE OF THE SOFTWARE, OR DAMAGES CAUSED BY POSSIBLE ERRORS OR MISPRINTS IN THE SOFTWARE, EVEN IF ABBYY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS, OR FOR ANY CLAIM BY ANY THIRD PARTY. THE FOREGOING LIMITATIONS AND EXCLUSIONS APPLY TO THE EXTENT PERMITTED BY APPLICABLE LAW IN YOUR JURISDICTION. ABBYY’S SOLE AND AGGREGATE LIABILITY UNDER OR IN CONNECTION WITH THE SOFTWARE SHALL BE LIMITED TO THE PURCHASE PRICE ORIGINALLY PAID FOR THE SOFTWARE, IF ANY.

10. Warranty Exclusion and Limitations for Users Residing in Germany or Austria

10.1 If You obtained Your copy of the SOFTWARE in Germany or Austria, and You usually reside in such country, then, in accordance with German law, ABBYY warrants that the SOFTWARE provides the functionalities set forth in its documentation included in the SOFTWARE (the "agreed upon functionalities") for the limited warranty period following receipt of the SOFTWARE copy when used on the recommended hardware configuration. As used in this article, "limited warranty period" means two (2) years if You are a consumer, and one (1) year if not. Non-substantial variation from the agreed upon functionalities shall not be considered and does not establish any warranty rights. This limited warranty does not apply to the SOFTWARE provided to You free of charge, for example, updates, pre-release versions, "Trial" versions, product samples, "Not for resale" ("NFR") copies of the SOFTWARE, or to SOFTWARE that has been altered by You, to the extent such alterations caused a defect. To make a warranty claim, during the limited warranty period You must return, at our expense, the SOFTWARE and proof of purchase to the location where You obtained it. If the functionalities of the SOFTWARE vary substantially from the agreed upon functionalities, ABBYY is entitled (by way of re-performance and at its own discretion) to repair or replace the SOFTWARE. If this fails, You are entitled to a reduction of the purchase price (reduction) or to cancel the purchase agreement (rescission). For further warranty information, please contact ABBYY Europe GmbH, Landsberger Str. 300, 80687 Munich, tel.: +49 89 69 3333-0, e-mail: support@abbyy.com.

10.2 If You obtained Your copy of the SOFTWARE in Germany or Austria, and You usually reside in such country, then:

10.2.1 Subject to the provisions in article 10.2.2, ABBYY’s statutory liability for damages shall be limited as follows: (i) ABBYY shall be liable only up to the amount of damages as typically foreseeable at the time of entering into the purchase agreement in respect of damages caused by a slightly negligent breach of a material contractual obligation and (ii) ABBYY shall not be liable for damages caused by a slightly negligent breach of a non-material contractual obligation.

10.2.2 The limitation of liability set forth in article 10.2.1 shall not apply to any mandatory statutory liability, in particular, to liability under the German Product Liability Act, liability for assuming a specific guarantee or liability for culpably caused personal injuries.

10.2.3 You are required to take all reasonable measures to avoid and reduce damages, in particular to make backup copies of the SOFTWARE and Your Computer data subject to the provisions of this EULA.

11. Warranty Exclusion and Limitations for Users Residing in Australia

11.1 If you obtained Your copy of the SOFTWARE in Australia, and You usually reside in such country then:

11.1.1 ABBYY’s goods come with guarantees that cannot be excluded under the Australian Consumer Law. You are entitled to a replacement or refund for a major failure and for compensation for any other reasonably foreseeable loss or damage. You are also entitled to have the goods repaired or replaced if the goods fail to be of acceptable quality and the failure does not amount to a major failure.

11.1.2 Where ABBYY provides any additional express warranty or warranties with the SOFTWARE, the benefits given to you by such warranty or warranties are in addition to and do not replace your other rights and remedies under the Australian Consumer Law. To make a warranty claim, You must return, at Your expense, the SOFTWARE and proof of purchase to the location where You obtained it, or, where return is not possible, make the SOFTWARE available for inspection by ABBYY or its representative. No claim will be valid under the warranty unless the SOFTWARE has been tested and deemed defective by ABBYY pursuant to the terms of the warranty. If the SOFTWARE is determined to be defective (in the discretion of ABBYY), ABBYY is entitled (at its own discretion) to repair or replace the SOFTWARE. For further warranty information, please contact ABBYY PTY Ltd.: ‘Citigroup Building’ Level 13, 2 Park Street, SYDNEY NSW 2000 Australia, tel.: +61 (02) 9004 7401; e-mail: support@abbyy.com.

11.1.3 Subject to Your rights arising under the Competition and Consumer Act 2010 (Cth) or other similar consumer legislation, You agree that ABBYY will not be liable in respect of any claim by You (whether contractual, tortious, statutory or otherwise) for any direct, special, incidental, indirect or consequential damages or injury including, but not limited to, any loss of profits, contracts, revenue or data arising out of or in connection with the provision of the SOFTWARE or the provision of any other goods or services under this EULA or any other written agreement executed between You and ABBYY or an ABBYY Partner and whether as a result of any breach or default by ABBYY or any negligence of ABBYY. The maximum liability of ABBYY and that of its Partners under this EULA and any other written agreement executed between You and ABBYY or an ABBYY Partner for any and all breaches, and any negligence in relation to such agreements, will be limited to the sum of fifty United States Dollars (U.S. $50) or the total amount You paid for the SOFTWARE, whichever is greater.

11.1.4 If the Competition and Consumer Act 2010 (Cth) (or analogous legislation) applies and permits the limitation of liability for breach of warranty implied by statute, the liability of ABBYY is limited, at the option of ABBYY, to:

11.1.4.1 In the case of goods, any one or more of the following: (i) the replacement of the goods or the supply of equivalent goods; (ii) the repair of the goods; (iii) the payment of the cost of replacing the goods or of acquiring equivalent goods; or (iv) the payment of the cost of having the goods repaired; and

11.1.4.2 In the case of services: (i) the supplying of the services again; (ii) or the payment of the cost of having the services supplied again.

11.1.5 Any of the terms and conditions of this EULA which limit or exclude any term, condition or warranty, express or implied, or the liability of ABBYY will apply to the extent permitted by Australian law and will not be construed as excluding, qualifying or limiting Your statutory rights or remedies arising by virtue of the breach of any implied term of this EULA where such exclusion, qualification or limitation would be prohibited by statute.

11.1.6 If You are a consumer (as defined in the Competition and Consumer Act 2010 (Cth)), then nothing in this EULA restricts, limits or modifies Your rights or remedies against ABBYY for the failure of a statutory guarantee under the Australian Consumer Law where such restriction, limitation or modification would be prohibited by the Competition and Consumer Act 2010 (Cth).

12. Additional Limitations for SOFTWARE obtained in the USA

Government Use. The Licensed Software and related documentation are "Commercial Items", as that term is defined at 48 C.F.R. §2.101, consisting of "Commercial Computer Software" and "Commercial Computer Software Documentation", as such terms are used in 48 C.F.R. §12.212 or 48 C.F.R. §227.7202, as applicable. Consistent with 48 C.F.R. §12.212 or 48 C.F.R. §227.7202-1 through 227.7202-4, as applicable, the Commercial Computer Software and Commercial Computer Software Documentation are being licensed to U.S. Government end users (a) only as Commercial Items and (b) with only those rights as are granted to all other end users pursuant to the terms and conditions herein. Unpublished rights reserved under the copyright laws of the United States.

13. Export rules

You agree that You shall not export or re-export the SOFTWARE in violation of any export provisions in the laws of the country in which this SOFTWARE was purchased or otherwise acquired. In addition, You represent and warrant that You are not prohibited under applicable laws from receiving the SOFTWARE.

14. Third-party software

14.1 Embedded Fonts. Font programs are subject to copyright, and the copyright owner may impose conditions under which a font program can be used. One of the conditions may be that you need a licensed copy of the font program to embed the font into a PDF file. In no event shall ABBYY be liable for any damages arising out of or in connection with your use of embedded fonts.

14.2 Datalogics Software and Adobe Products

14.2.1 Copyright 2000 - 2012 Datalogics, Inc.

Copyright 1984 - 2012 Adobe Systems Incorporated and its licensors. All rights reserved.

14.2.2 The term " Datalogics Software and Adobe Products" means Datalogics Software and third party products (including Adobe Products) and related documentation, and any upgrades, modified versions, updates, additions, and copies thereof.

14.2.3 You acknowledge and agree that third party licensors are the owners of certain proprietary information and intellectual property rights included in the Host Products and the Documentation. Such third party licensors are third party beneficiaries entitled to enforce ABBYY’s rights and your obligations hereunder and to seek appropriate legal and equitable remedies, including but not limited to, damages and injunctive relief, for your breach of such obligations.

14.2.4 License Grant and Restrictions. ABBYY grants you a non-exclusive right to use the Datalogics Software and Adobe Products under the terms of this EULA. You may make one backup copy of the Datalogics Software and Adobe Products, provided the backup copy is not installed or used on any computer.

14.2.5 Intellectual Property Rights. The Datalogics Software and Adobe Products incorporated into the SOFTWARE are owned by Datalogics, Adobe and third parties and their suppliers, and their structure, organization and code are the valuable trade secrets of Datalogics, Adobe and third parties and their suppliers. The Datalogics Software and Adobe Products are also protected by United States Copyright law and International Treaty provisions. You may not copy the Datalogics Software and Adobe Products, except as provided in this EULA. Any copies that you are permitted to make pursuant to this EULA must contain the same copyright and other proprietary notices that appear on or in the Datalogics Software and Adobe Products. You agree not to modify, adapt, translate, reverse engineer, decompile, disassemble or otherwise attempt to discover the source code of the Datalogics Software and Adobe Products. Except as stated above, this EULA does not grant you any intellectual property rights in the Datalogics Software and Adobe Products.

14.2.6 Font License. You may embed copies of the font software into your electronic documents for purpose of printing, viewing and editing the document. No other embedding rights are implied or permitted under this license.

14.2.7 Warranty. ABBYY AND ITS SUPPLIERS DO NOT AND CANNOT WARRANT THE PERFORMANCE RESULTS YOU MAY OBTAIN BY USING THE SOFTWARE.

14.2.8 Export Rules. You agree that the Datalogics Software and Adobe Products will not be shipped, transferred or exported into any country or used in any manner prohibited by the United States Export Administration Act or any other export laws, restrictions or regulations (collectively the “Export Laws”). In addition, if the Datalogics Software and Adobe Products are identified as export-controlled items under the Export Laws, you represent and warrant that you are not a citizen, or otherwise located within, an embargoed nation and that you are not otherwise prohibited under the Export Laws from receiving the Datalogics Software and Adobe Products. All rights to use the Datalogics Software and Adobe Products are granted on condition that such rights are forfeited if you fail to comply with the terms of this EULA.

14.2.9 Governing Law. This EULA will not be governed by the conflict of law rules of any jurisdiction or the United Nations Convention on Contracts for the International Sale of Goods, the application of which is expressly excluded.

14.2.10 General Provisions. This EULA shall not prejudice the statutory rights of any party dealing as a consumer.

14.2.11 Trademarks. Trademarks appearing herein are either registered trademarks or trademarks of their respective owners in the United States and/or other countries.

14.3 Pixtran (pixtools)

14.3.1 Distribution of any Application shall be pursuant to a written end-user license which

a. grants the end-user only a right to use the Application,

b. protects EMC’s and EMC’s licensors’ intellectual property rights in the Software under all legal theories applicable to the geography where the Application is to be used,

c. provides proper attribution of copyrights to EMC and its licensors, and

d. makes no representations or warranties on behalf of EMC to such end- users. All rights not expressly granted herein are reserved by EMC.

14.4 Cuminas DjVu 3

14.4.1 Portions of this computer program are copyright © 2008 Celartem, Inc. All rights reserved. Portions of this computer program are copyright © 2011 Caminova, Inc. All rights reserved. Portions of this computer program are copyright © 2013 Cuminas, Inc. All rights reserved. DjVu is protected by U.S. Patent No. 6,058,214. Foreign Patents Pending. Powered by AT&T Labs Technology..

14.4.2 You, as the End-User, have the right to use DjVu SDK as part of the SOFTWARE for the entire period of such SOFTWARE copyright or for another lesser term of use, stated in the EULA.

14.4.3 You may not perform or make it possible for other persons to perform reverse engineer, disassemble, decompile (i.e. reproduce and transform the object code into source code) or otherwise attempt to derive the source code for the SOFTWARE or any part, except, and only to the extent, that such activity is expressly permitted by applicable law notwithstanding this limitation. If applicable law prohibits the restriction of such activities, any information so discovered must not be disclosed to third parties with the exception that such disclosure is required by law and such information must be promptly disclosed to ABBYY. All such information shall be deemed to be confidential and proprietary information of ABBYY.

14.4.4 ABBYY MAKES NO WARRANTIES, CONDITIONS, REPRESENTATIONS OR TERMS (EXPRESS OR IMPLIED WHETHER BY STATUTE, COMMON LAW, CUSTOM, USAGE OR OTHERWISE) AS TO ANY MATTER, INCLUDING WITHOUT LIMITATION NON-INFRINGEMENT OF THIRD PARTY RIGHTS, MERCHANTABILITY, INTEGRATION, SATISFACTORY QUALITY, OR FITNESS FOR ANY PARTICULAR PURPOSE, OR THAT THE SOFTWARE WILL CARRY NO ERRORS, MEET YOUR REQUIREMENTS, OR THAT THE SOFTWARE WILL FUNCTION PROPERLY WHEN USED IN CONJUNCTION WITH ANY OTHER SOFTWARE OR HARDWARE. ABBYY DOES NOT AND CANNOT WARRANT THE PERFORMANCE OR RESULT YOU MAY OBTAIN BY USING THE SOFTWARE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE LIES WITH YOU. FUTHERMORE ABBYY MAKES NO WARRANTIES FOR ANY THIRD PARTY SOFTWARE PRODUCTS WHICH MAY BE SUPPLIED WITHIN THE SOFTWARE.

14.4.5 IN NO EVENT WILL ABBYY BE LIABLE TO YOU FOR ANY DAMAGES, BUSINESS INTERRUPTION, LOSS OF DATA OR INFORMATION OF ANY KIND, BUSINESS OR OTHERWISE, CLAIMS OR COSTS WHATSOEVER, OR ANY CONSEQUENTIAL, INDIRECT, INCIDENTAL DAMAGE, OR ANY LOST PROFITS OR LOST SAVINGS RESULTING FROM AND/OR RELATING TO THE USE OF THE SOFTWARE, OR DAMAGES CAUSED BY POSSIBLE ERRORS OR MISPRINTS IN THE SOFTWARE, EVEN IF AN ABBYY REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS, OR FOR ANY CLAIM BY ANY THIRD PARTY. THE FOREGOING LIMITATIONS AND EXCLUSIONS APPLY TO THE EXTENT PERMITTED BY APPLICABLE LAW IN YOUR JURISDICTION. ABBYY’S SOLE AND AGGREGATE LIABILITY UNDER OR IN CONNECTION WITH THIS EULA SHALL BE LIMITED TO THE PURCHASE PRICE ORIGINALLY PAID FOR THE SOFTWARE, IF ANY.

14.4.6 Limitations for SOFTWARE obtained at the USA.

14.4.6.1 Government Use. If use is made of the SOFTWARE by the United States Government or any US Government agency, the following additional terms shall apply: (1) Restricted Computer Software, as defined in the Rights in Data-General clause at Federal Acquisition Regulations 52.227-14; and (2) any use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (с)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013.

14.4.6.2 Export rules. You agree that You shall not export or re-export the SOFTWARE in violation of any export provisions in the laws of the country in which this SOFTWARE was purchased or otherwise acquired. In addition, You represent and warrant that You are not prohibited under applicable laws from receiving the SOFTWARE.

14.4.7 Third-Party Code:

14.4.7.1 Oniguruma Copyright © 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

14.4.7.2 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

14.4.7.3 MD5 A portion of this software is derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm. Mersenne Twister Copyright © 2006,2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima University. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the Hiroshima University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

14.4.7.4 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

14.5 WIBU SDK

14.5.1 WIBU, CodeMeter, SmartShelter, SmartBind are registered trademarks of Wibu-Systems.

14.5.2 German export regulations apply in the event of an export of Wibu-Systems products.

14.6 HDPhotoDPK

14.6.1 The technologies of Microsoft Corporation or their parts (hereinafter referred to as the "Microsoft Technologies") listed hereof are used in the SOFTWARE. The Microsoft Technologies are distributed under the Microsoft Software License Terms accompanying the Microsoft Technologies.

14.6.2 Technologies of Microsoft Corporation used in the SOFTWARE:

14.6.2.1 MICROSOFT HD PHOTO 1.O DEVICE PORTING KIT (A.K.A. MICROSOFT WINDOWS MEDIA PHOTO 1.0 DEVICE PORTING KIT)

14.6.3 © 2005-2006 Microsoft Corporation. All rights reserved. Microsoft is either registered trademark or trademark of Microsoft Corporation in the United States and/or other countries.

14.6.4 The Microsoft Technologies are licensed, not sold. This EULA only gives You some rights to use the Microsoft Technologies. Microsoft reserves all other rights. Unless applicable law gives You more rights despite this limitation, You may use the Microsoft Technologies only as expressly permitted in the Microsoft Software License Terms and in this EULA. In doing so, You must comply with any technical limitations in the Microsoft Technologies that only allow You to use it in certain ways. You may not:

14.6.4.1 use the Microsoft Technologies for any other purpose than the one intended. The Microsoft Technologies’ purpose is for the implementation of HD Photo encoders and/or decoders in XML Paper Specification products that comply with and support the HD Photo 1.0 file format (a.k.a. the Windows Media Photo 1.0 file format) as defined in the specification(s) provided in the Microsoft Technologies.

14.6.4.2 publish the Microsoft Technologies for others to copy;

14.6.4.3 rent, lease or lend the Microsoft Technologies;

14.6.4.4 transfer the Microsoft Technologies or this Microsoft Software License Terms to any third party other than as expressly permitted thereunder.

14.6.4.5 Export restrictions. The Microsoft Technologies are subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the Microsoft Technologies. These laws include restrictions on destinations, end users and end use. For additional information, see www.microsoft.com/exporting

14.7 Microsoft Visual C++ 2015 Runtime Library, Microsoft Visual C++ 2015 OMP Library

14.7.1. The technologies of Microsoft Corporation used in the SOFTWARE:

- Microsoft Visual C++ 2015 Runtime Library

- Microsoft Visual C++ 2015 OMP Library

© Microsoft Corporation. All rights reserved. Microsoft and Visual Studio are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

14.7.2. The Microsoft Technologies are licensed, not sold. The Microsoft Software License Terms and this EULA only give You some rights to use the Microsoft Technologies. Microsoft reserves all other rights. Unless applicable law gives You more rights despite this limitation, You may use the Microsoft Technologies only as expressly permitted in the Microsoft Software License Terms and in this EULA. In doing so, You must comply with any technical limitations in the Microsoft Technologies that only allow You to use it in certain ways. For more information, see www.microsoft.com/licensing/userights. You may not:
• work around any technical limitations in the Microsoft Technologies;
• reverse engineer, decompile or disassemble the Microsoft Technologies, or otherwise attempt to derive the source code for the software except, and solely to the extent: (i) permitted by applicable law, despite this limitation; or (ii) required to debug changes to any libraries licensed under the GNU Lesser General Public License which are included with and linked to by the Microsoft Technologies;
• remove, minimize, block or modify any notices of Microsoft or its suppliers in the Microsoft Technologies;
• use the Microsoft Technologies in any way that is against the law;
• share, publish, rent or lease the Microsoft Technologies, or provide the Microsoft Technologies as a stand-alone hosted solution for others to use.

14.7.3. Export restrictions. Microsoft technologies, online services, professional services and related technology are subject to U.S. export jurisdiction. You must comply with all applicable international and national, laws including the U.S. Export Administration Regulations, the International Traffic in Arms Regulations, Office of Foreign Assets Control sanctions programs, and end-user, end use and destination restrictions by the U.S. and other governments related to Microsoft products, services and technologies. For additional information, see www.microsoft.com/exporting.

14.8 Mapifolders

14.8.1. To support the Microsoft Outlook integration, the technologies of Microsoft Corporation or their parts (hereinafter referred to as the "Microsoft Technologies") are used. The Microsoft Technologies are distributed under the Microsoft Software License Terms accompanying the Microsoft Technologies.

14.8.2. Technologies of Microsoft Corporation used in the SOFTWARE:

MICROSOFT Outlook 2010: MAPI Header Files

© 2009-2010 Microsoft Corporation. All rights reserved. Microsoft is either registered trademark or trademark of Microsoft Corporation in the United States and/or other countries.

14.8.3. The Microsoft Technologies are licensed, not sold. The Microsoft Software License Terms and this EULA only give You some rights to use the Microsoft Technologies. Microsoft reserves all other rights. Unless applicable law gives You more rights despite this limitation, You may use the Microsoft Technologies only as expressly permitted in the Microsoft Software License Terms and in this EULA. In doing so, You must comply with any technical limitations in the Microsoft Technologies that only allow You to use it in certain ways. You may not:

work around any technical limitations in the Microsoft Technologies;

reverse engineer, decompile or disassemble the Microsoft Technologies, except and only to the extent that applicable law expressly permits, despite this limitation;

make more copies of the Microsoft Technologies than specified in the Microsoft Software License Terms and this EULA or allowed by applicable law, despite this limitation;

publish the Microsoft Technologies for others to copy; rent, lease or lend the Microsoft Technologies; or use the Microsoft Technologies for commercial software hosting services. 14.8.4. Export restrictions. The Microsoft Technologies are subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the Microsoft Technologies. These laws include restrictions on destinations, end users and end use. For additional information, see www.microsoft.com/exporting

14.9 Intel® Parallel Studio XE Composer Edition for C++

The Materials of the Software Intel® Parallel Studio XE Composer Edition for C++ (hereinafter - Materials) are not designed, intended, or authorized for use in any type of a system or application in which the failure of the Materials could create a situation where personal injury or death may occur (e.g., medical systems, life sustaining or lifesaving systems). Should You use the Materials for any such unintended or unauthorized use, You hereby indemnify, defend, and hold Intel and its officers, subsidiaries and affiliates harmless against all claims, costs, damages, expenses, and reasonable attorney fees arising out of, directly or indirectly, such use and any claim of product liability, personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Intel was negligent regarding the design or manufacture of the Materials.

14.10. Microsoft Outlook 2010 SDK

14.10.1. To support the Microsoft Outlook integration, the technologies of Microsoft Corporation or their parts (hereinafter referred to as the "Microsoft Technologies") listed in paragraph 2 are used. The Microsoft Technologies are distributed under the Microsoft Software License Terms accompanying the Microsoft Technologies.

14.10.2. Technologies of Microsoft Corporation used in the SOFTWARE:

MICROSOFT Outlook 2010: MAPI Header Files

© 2009-2010 Microsoft Corporation. All rights reserved. Microsoft is either registered trademark or trademark of Microsoft Corporation in the United States and/or other countries.

14.10.3. The Microsoft Technologies are licensed, not sold. The Microsoft Software License Terms and this EULA only give You some rights to use the Microsoft Technologies. Microsoft reserves all other rights. Unless applicable law gives You more rights despite this limitation, You may use the Microsoft Technologies only as expressly permitted in the Microsoft Software License Terms and in this EULA. In doing so, You must comply with any technical limitations in the Microsoft Technologies that only allow You to use it in certain ways. You may not:

work around any technical limitations in the Microsoft Technologies;

reverse engineer, decompile or disassemble the Microsoft Technologies, except and only to the extent that applicable law expressly permits, despite this limitation;

make more copies of the Microsoft Technologies than specified in the Microsoft Software License Terms and this EULA or allowed by applicable law, despite this limitation;

publish the Microsoft Technologies for others to copy;

rent, lease or lend the Microsoft Technologies; or

use the Microsoft Technologies for commercial software hosting services.

14.10.4. Export restrictions. The Microsoft Technologies are subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the Microsoft Technologies. These laws include restrictions on destinations, end users and end use. For additional information, see

www.microsoft.com/exporting

15. Governing Law

15.1 If the SOFTWARE was obtained in the United States, Canada, Mexico, Belize, Costa Rica, El Salvador, Guatemala, Honduras, Montserrat, Nicaragua, Panama, Turks and Caicos Islands, Virgin Islands, or Taiwan, this EULA shall be governed by and construed in accordance with the laws of the State of California, United States of America. With respect to any dispute which may arise in connection with this EULA and/or this SOFTWARE, You consent to the exclusive jurisdiction and venue of the federal and/or state courts in the county of Santa Clara in the state of California. For the avoidance of doubt if the SOFTWARE was obtained in the United States, You obtained (purchased) the SOFTWARE from ABBYY USA Software House, Inc.

15.2 If the SOFTWARE was obtained in Japan, this EULA shall be governed by and construed in accordance with the laws of Japan and the parties accept the exclusive jurisdiction of the Tokyo District Court of Japan.

15.3 If the SOFTWARE was obtained in Austria, Belgium, Bulgaria, Croatia, the Czech Republic, Denmark, Finland, France, Hungary, Italy, Germany, Luxembourg, the Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden, Latvia, Lithuania, Estonia or any other member state of the European Union, that is not directly mentioned in article 15.4 of this EULA, or in Switzerland, Norway, Iceland or Liechtenstein, Albania, Bosnia and Herzegovina, Georgia, Iraq, Israel, the Republic of North Macedonia, Turkey, Serbia, Montenegro, Moldova and Ukraine this EULA shall be governed by and construed in accordance with the substantive law of Germany. The courts of Munich shall have exclusive jurisdiction over all disputes relating to this EULA.

15.4 If the SOFTWARE was obtained in the United Kingdom of Great Britain and Northern Ireland, the Republic of Ireland, the Cayman Islands, Gibraltar, Guernsey, the Isle of Man, Jersey, and the British Virgin Islands this EULA shall be governed by and construed in accordance with the Laws of England and Wales and the parties accept the exclusive jurisdiction of the courts of England and Wales.

15.5 If the SOFTWARE was obtained in Australia, New Zealand, Papua New Guinea, Christmas Island, Cocos (Keeling) Islands, Cook Islands, Fiji, Niue, Norfolk Island, Tokelau this EULA shall be governed by and construed in accordance with the Laws of the State of New South Wales, Australia and the parties accept the exclusive jurisdiction of the State and Federal Courts in the State of New South Wales.

15.6 If the SOFTWARE was obtained in Russia, Belarus, Kazakhstan, or any other country of the CIS, except for Moldova this EULA shall be governed by and construed in accordance with the substantive law in force in the Russian Federation.

15.7 If article 15.6 applies and You are an entity or a sole proprietor (a person who is in business by himself/herself without the use of a company structure or partners and bears alone full responsibility for the actions of the business) the Arbitrazh Court of Moscow, the Russian Federation, shall have exclusive jurisdiction over all disputes relating to this EULA. If article 15.6 applies and You are an individual person, the Butyrsky District Court of Moscow, the Russian Federation, shall have exclusive jurisdiction over all disputes relating to this EULA.

15.8 In the cases described in articles 15.1 - 15.6, this EULA will not be governed by the conflict of law rules of any jurisdiction or the United Nations Convention on Contracts for the International Sale of Goods, the application of which is expressly excluded.

15.9 If the SOFTWARE was obtained (purchased) in a country other than the countries specified in articles 15.1 - 15.6, this EULA shall be governed by and construed in accordance with the substantive law of the country in which You obtained (purchased) the SOFTWARE.

16. Termination

16.1 Unless otherwise agreed with ABBYY in a separate written agreement or except as otherwise provided by the EULA or the documentation for the SOFTWARE, this EULA is effective in perpetuity from the date which You first demonstrate Your acceptance as provided at the beginning of the EULA or as long as it is permitted under applicable law. To the extent that applicable law requires the statement of an expiration period for this EULA, this EULA will last as long as permitted, but in any event, at least as long as the duration of the SOFTWARE copyright and in this case shall automatically expire without further notice when such time period elapses.

16.2 Without prejudice to any other rights, ABBYY may terminate this EULA if You fail to comply with the terms and conditions of this EULA. In such an event, You must destroy all copies of the SOFTWARE, all of its component parts and remove the SOFTWARE from Your Computers.

16.3 You may terminate this EULA by destroying all copies of the SOFTWARE, all of its component parts and removing the SOFTWARE.

16.4 Such termination does not relieve You of Your obligation to pay for the SOFTWARE. The Definitions and articles 2, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 and article 3.4.4 shall survive the termination or expiration of this EULA, howsoever caused, but this shall not imply or create any continued right to use the SOFTWARE after termination or expiration of this EULA.

17. Miscellaneous

17.1 In the course of activation, installation, operation, registration and/or technical support and maintenance of the SOFTWARE You may be asked to provide ABBYY with certain personal information (such as but not limited to Your name, company name (if applicable), email address, phone number) and technical information (such as but not limited to characteristics of Your hardware, third party software, Serial number of Your SOFTWARE). You may choose not to provide us with Your personal and/or technical information, in which case You may not be able in the future to obtain technical support or maintenance of the SOFTWARE available to ABBYY customers who provide their personal and/or technical information, if provision of personal and/or technical information is essential to provide You with technical support or maintenance of the SOFTWARE or is a requirement of such technical support or maintenance of the SOFTWARE and it does not contradict applicable law. For example, to provide you with technical support, ABBYY needs to process your email or phone number to communicate with you. You agree that Your personal and/or technical information may be processed (including but not limited to collected and/or otherwise used) by ABBYY and/or its affiliates or ABBYY Partners in compliance with applicable law provided that the confidentiality of the data and data security is maintained if it is required by applicable law. To know more about personal data processing, please see Privacy Policy located at http://www.abbyy.com/privacy.

17.2 You acknowledge that the SOFTWARE may have periodic Internet connection with an ABBYY server to check the status of the SOFTWARE or download additional content, information or components. Such information can be used for security (e.g. fraud prevention) and statistical (e.g. billing and analytical) purposes. ABBYY will take reasonable steps with the goal that no personal information about You or Your Computer will be transferred during such connections.

17.3 ABBYY may send You e-mails containing product and company news, information about special offers, advices on product usage and other product and company-related information provided You consent to receive such information. You may remove Your e-mail address from ABBYY’s mailing list at any time by clicking on the unsubscribe link located at the bottom of each email.

17.4 If any claims or lawsuits are brought against You in connection with Your use of the SOFTWARE, You shall inform ABBYY in writing about them promptly and whenever practicable within three (3) business days from the moment You learn of them. You shall take all necessary actions to enable ABBYY to take part in the proceedings or hearings of or take over the defense of said claims or lawsuits in court or arbitration, and shall provide ABBYY with Your full cooperation and all information ABBYY deems useful or necessary for the defense of settlement of the corresponding claims or lawsuits, promptly upon (and whenever practicable no later than seven (7) days from the moment of) the receipt of an inquiry from ABBYY.

17.5 Unless otherwise agreed by the parties, the Software licensed under this EULA requires the payment of consideration. Consideration under this EULA is the price of the License established by ABBYY or an ABBYY Partner and payable in accordance with the payment procedures established by them, or may be included in value of equipment or hardware obtained by You or is part of the consideration payable by You for the full version of the SOFTWARE.

17.6 If any part of this EULA is found void or unenforceable, it will not affect the validity of the balance of the EULA, which shall remain valid and enforceable according to its terms.


Prohibit sending documents from one stage to any stage other than the specified stage

Show/Hide Hidden Text

This section describes how you can use roles to prohibit an Operator from sending documents from stage A to any stages other than B.

If stage B is Exceptions

To allow an Operator to send documents to the Exceptions stage, simply include this stage in the routing schema on the Workflow tab of the Project Properties dialog box (click Project → Project Properties...) or on the Workflow tab of the Batch Type Properties dialog box (click Project → Batch Types..., select the desired batch type, and click Edit...).
If stage B is Rescanning

Use the Advanced routing schema. First, open the properties of stage A and select the item that allows sending documents to the Rescanning stage:

1.For batches of the Default type, click Project → Project Properties... For other batch types:

oClick Project → Batch Types...

oSelect the batch type which you want to make accessible or inaccessible

oClick Edit...

2.Click the Workflow tab.

3.In the Schema field, select Advanced.

4.From the list, select the stage from which documents should be sent.

5.Click Edit....

6.In the Workflow Stage Properties dialog box, click the Exit Routes tab.

7.Select the Allow operator to send tasks to rescanning stage item.

8.Click OK to save the changes.

Now you need to prohibit an Operator from sending documents to any stage. Create an appropriate role and assign it to the Operator in the Administration and Monitoring Console:

1.Click Project → Project Properties...

2.Click the User Roles tab.

3.Click New...

4.Provide a name for the role in the corresponding field.

5.Clear the Send tasks to any available stage item. Clear or select any other items depending on which permissions you need to grant to the Operator.

6.Click OK to save the changes.

7.Assign the role to the Operator for the corresponding batch type in the Administration and Monitoring Console.
If stage B is neither Exceptions nor Rescanning

In this case you need to create a role that is not permitted to send documents to any stage. Next, in the properties of stage A explicitly allow the Operator to send documents to stage B.

To prohibit the Operator from sending documents to any stage, create an appropriate role and assign it to the Operator in the Administration and Monitoring Console:

1.Click Project → Project Properties...

2.Click the User Roles tab.

3.Click New...

4.Provide a name for the role in the corresponding field.

5.Clear the Send tasks to any available stage item. Clear or select any other items depending on which permissions you need to grant to the Operator.

6.Click OK to save the changes.

7.Assign the role to the Operator for the corresponding batch type in the Administration and Monitoring Console.

To allow the Operator to send documents to stage B:

1.For batches of the Default type, click Project → Project Properties... For other batch types:

oClick Project → Batch Types...

oSelect the batch type which you want to make accessible or inaccessible

oClick Edit...

2.Click the Workflow tab.

3.In the Schema field, select Advanced.

4.From the list, select stage A, from which documents should be sent.

5.Click Edit...

6.In the Workflow Stage Properties dialog box, click the Exit Routes tab.

7.Add the stage by clicking the Stage... button or select the name of the stage from the list and click Edit...

8.In the Next Stage dialog box, select the Allow operator to send tasks to this stage item.

9.Click OK to save the changes to the sending options.

10.Click OK to save the changes to stage A.

note Note: If the Create task option is not selected when a document is sent by the Operator, the conditions for entering stage B will be checked. If these conditions are not met, the document will be sent to the stage following stage A in the routing schema.


Creating an ABBYY FlexiCapture backup

Show/Hide Hidden Text

ABBYY FlexiCapture stores data in a database and in a file storage. The data stored in the database must always match the data stored in the file storage, otherwise you may not be able to recover cleanly from an unexpected crash. Possible consequences of mismatched data are:

·partial loss of data

·inability to resume processing from where it stopped

These consequences may be avoided by creating a system backup as described below.

Backing up your system

warning Important! The steps below should not be carried out at heavy system loads, as they will take too much time to complete.

To back up your system:

1.For the Application Server, set the FileRemovingDisabled key to true. This will prevent old files from being deleted from the file storage. Wait at least five minutes for your changes to take effect.

2.Create a backup copy of the database using the backup tools indicated by the manufacturer.

3.Using a backup utility like nnBackup, create a backup copy of the data stored in the file storage.

4.Set the FileRemovingDisabled key to false. Now the system will delete any old files when batches are deleted.

How to back up your system using a Windows PowerShell script

# Change Application Server settings to stop deleting old files from file storage

Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST/Default Web Site/FlexiCapture12/Server' -filter "appSettings" -name "." -value @{key='FileRemovingDisabled';value='false'}

Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST/Default Web Site/FlexiCapture12/Server' -filter "appSettings/add[@key='FileRemovingDisabled']" -name "value" -value "true"

# Timer for setting to apply

Start-Sleep 5 # in seconds

# Back up SQL databases

$backupFolder = 'D:\SQLBackUps'

$user = 'user'

$pass = 'password'

$inst = 'SQL_Server_Instance_Name'

$db = 'DB_Name'

$file = "$backupFolder\${db}.bak"

$secpasswd = ConvertTo-SecureString $pass -AsPlainText -Force

$cred = New-Object System.Management.Automation.PSCredential ($user, $secpasswd)

Backup-SqlDatabase -ServerInstance $inst -Database $db -Credential $cred -BackupFile $file -Initialize

# Back up file storage

C:\Windows\System32\wbadmin.exe start backup -backuptarget:f: -include:d:\filestorage -quiet -vssCopy

# Change Application Server settings to resume deleting old files from file storage

Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST/Default Web Site/FlexiCapture12/Server' -filter "appSettings/add[@key='FileRemovingDisabled']" -name "value" -value "false"

note Note: This example uses the Windows wbadmin command to back up the file storage.

Restoring your system

To restore your system after a crash:

1.Prepare the computers for installation and install the system. First, install the external components, then the servers and the stations.

2.Connect your license key or activate your software license.

3.Restore the database on the server.

4.Restore the file storage.

5.Open the Administration and Monitoring Console and establish a connection to the existing database. Then provide the path to the restored database and the path to the restored file storage.

note Note: To migrate the system, administrative privileges are required. It is recommended that all system migration operations are performed by the person who created the database. If migration operations are performed by another person, make sure that this person has permissions to connect to the new server and to access the database on the server.


Default batch priority

The Default batch priority option determines the priority of batches created manually, for example, in the Project Setup Station.

Default batch priority is specified for each batch type. When a batch is created, its type is specified and its priority is set according to the batch type.

If no batch types are created, batches are created with the priority specified for the entire project (Project → Project Properties..., General tab).

Batches sent from the Scanning Station have the priority assigned to them in the Scanning Station. If batches are created when importing images from a Hot Folder, batch priority is specified in the image import profile settings.


ABBYY FlexiCapture Setup

To set up ABBYY FlexiCapture for distributed document processing:

1.Set up the Application Server in the Administration and Monitoring Console.

2.Upload the project to the Application server.

3.Grant access permissions to the Operators in the Administration and Monitoring Console.

4.Set up the Processing Server and Processing Stations in the Processing Server Monitor.

5.Set up the workflow on the Project Setup Station.


Custom Operator roles

Besides the standard Operator roles available in the system (i.e. Data Verification Operator, Verification Operator, Senior Verification Operator), you can create your own custom roles to control the Operators' access to data and queues in the processing stages.

note Note: Configuring access to operations on data and access to operations on tasks is not supported for the Web Verification Station and Web Capture Station custom roles. Only the standard operator role configuration is available (Data Verification Operator, Verification Operator, Senior Verification Operator).

For example, if a large number users are involved in a project, you can create custom roles, allowing different groups of users to access different verification stages where different sets of fields are verified for the same batch type. You can also use custom roles to control what the Operators can and cannot do. For example, you can prohibit a role from deleting documents, prohibit a role from sending documents from one processing stage to another, or, conversely, allow it to send documents only to one particular stage.

note Note: You can use methods other than roles to prohibit Operators from sending tasks to particular stages. See this example for more information.

You can create and set up a new role on the User Roles tab of the Project Properties dialog box (click Project → Project Properties...). Roles created on that tab are then assigned to Operators in the Administration and Monitoring Console.

note Note: You can create a new role when editing the properties of a stage that will be accessible to that role. This is done on the Roles tab of the Workflow Stage Properties dialog box (click Project → Project Properties... or Project → Batch Types..., then select the batch type to modify, click the Workflow tab, and when using the Advanced or Advanced for Web Capture station processing schemata, create an interactive stage or select an existing one and click Edit...). However, you will still need to go to the User Roles tab to grant access permissions to a role thus created.

Apart from creating (New...) and deleting (Delete) a role, you can create a new role from an existing role (Duplicate...) or modify an existing role (Edit...). When you click Edit..., a Role properties dialog box opens.

note Note: You cannot modify the standard Operator roles (i.e. Data Verification Operator, Verification Operator, Senior Verification Operator).

You can specify the following access permissions for a role in the Role properties dialog box.

·The list of stages from which the role may receive tasks. To specify the list of stages:

1.Click Stages for Getting Tasks....

2.Select appropriate items next to the stages that you want to make accessible to the role. If you want to make accessible all the stages of a particular batch type, select an item next to that batch type. Clicking Select/deselect all stages will select or clear all stages.

3.Click OK to save the changes and return to the Role properties dialog box.

·Access to operations on data.

Item | Access permissions
View list of project batches | 1.Viewing the list of batches.
Create/delete batches | 1.Creating and deleting batches 2.Working with batch attachments 3.Working with batch registration parameters 4.Changing batch types
Modify batch content | 1.Working with document attachments 2.Working with document registration parameters 3.Adding / deleting / moving pages / documents 4.Modifying images 5.Saving images to disk.
Assemble documents | 1.Saving/downloading attachments 1.Viewing registration parameters 2.Moving pages / documents 3.Modifying images 4.Saving images to disk. note Note: The Assemble documents role is enabled automatically together with the Modify batch content role. It can also be enabled independently.
Modify document layout | 1.Modifying the definition of a section / document, marking pages as attachments 2.Changing field region
Modify document content | 1.Changing field contents 2.Adding and removing field instances 3.Confirming fields 4.Working with document registration parameters 5.Starting verification (F7)

·Access to operations on tasks

Item | Access permissions
Create tasks or subtasks | Sending batches or documents to the processing stage
Postpone tasks | Postponing a task
View list of tasks in queue | Viewing the task queue in the processing stage accessible to the role and getting tasks from it note Note: If this permission is granted to role, user is allowed to handle tasks using Data Verification station regardless of presence of other permissions
Send tasks to any available stage | Sending tasks / subtasks to any processing stage accessible to the role for the given batch type note Note: If the item is cleared, the Operator will be able to send tasks only to the Exceptions and Rescanning queues (if allowed by the settings) and to any interactive stages allowed by the routing schema.
Change processing priority | Changing the priority of a task / document / batch

A role restricts the set of processing stages from which its Operators will receive tasks. For this reason, you can also grant access permissions to a specific processing stage on the Roles tab of the Workflow Stage Properties dialog box:

1.For batches of the Default type, click Project → Project Properties... For other batch types:

oClick Project → Batch Types...

oSelect the batch type which you want to make accessible or inaccessible

oClick Edit...

2.Go to the Workflow tab.

3.When using Advanced or Advanced for Web Capture station processing schemata, create an interactive stage or select an existing stage and click Edit...

4.In the Workflow Stage Properties dialog box, click the Roles tab.

5.Select appropriate items for the roles which will access the given processing stage.

6.If you need to add a new role, click New Role..., provide a name for the new role, and click OK.

note Note: To provide other access permissions a role thus created, you will still need to go to the User Roles tab.

Examples:

details Prohibit sending documents to a processing stage

details Prohibit sending documents from one processing stage to another

details Prohibit sending documents from one processing stage to any stage other than the specified stage


Data Verification Station toolbars

Show/Hide Hidden Text

Queues and tasks

Tool | Button | Description
Get Task |  | Opens a task from the selected queue.
Reject Task |  | Rejects the task (it will be later sent to another Operator by the server).
Refresh | Refresh | Refreshes information in the main window.
Automatic Task Receive |  | Enables/disables automatic task receive mode.


How to perform data verification

Show/Hide Hidden Text

To perform data verification, do the following:

1. Press the Get task button. The Group Verification window will be opened if the task contains characters for group verification, otherwise the Field Verification window will appear.

note Note: If Automatic Task Receive Mode is enabled (the corresponding button is switched on the Queues & Tasks toolbar), you do not need to click the Get Task button, as the next task will be received automatically as soon as the current one is completed.

2. Check the groups of characters that were recognized as one the same character.

Details...

1.Correct any incorrectly recognized characters as follows: highlight the character that does not match the group character and enter the correct value. This value, highlighted in green, will appear in the upper left corner of the character image.

2.If an irrelevant image is recognized as a character (for example, some scanning defect was erroneously recognized as a character), remove it by pressing the Delete button.

3.If you still have doubts about the character's meaning, even after viewing its context, left-click the character: a red question mark will appear. You can confirm or correct the character later during field verification.
Character status can be also switched using the Toggle button on the toolbar.

4.When all incorrectly recognized characters are corrected or postponed, confirm all other characters at once by clicking the Confirm All button on the toolbar. You can also confirm correctly recognized characters one by one by selecting Confirm from the shortcut menu.

3. Perform the verification of fields correct any recognition and format errors and confirm the correct values.

Details...

1.Review the recognition result in each field, one by one.

2.Correct any errors and then confirm the field by clicking the Confirm Field button.

3.If a field cannot be corrected right away, skip it or defer verification by clicking the Postpone button to correct the field later.

4. Once field verification is complete, the verification window will close and the task will be sent on to the next processing stage.


Application Server setup

Show/Hide Hidden Text

The Application Server is set up by the Administrator of the system in the Administration and Monitoring Console.

To set up the Application Server, you will need to connect it to a database. Open the Administration and Monitoring Console (Start → All Programs → ABBYY FlexiCapture 12 Servers → Administration and Monitoring Console) and click Settings → Application server.

Select one of the following options:

·Connect to existing database
or

·Create new database

note Note: An Operator that creates a database on the Application Server automatically receives Administrator permissions.

Next, specify the following:

·Database type:

oMS SQL

oOracle

·Server instance name: <server_name>\<database management system>

·Database name (only required for MS SQL).
Database naming considerations

oDatabase names can only include Latin and Cyrillic characters, underscores (_), the @ and # characters, and digits.

oDatabase names cannot start with digits. We also do not recommend using database names that start with the @ or # characters.

oDatabase names cannot contain more than 128 characters.

oDatabase names are not case-sensitive.

·Authentication settings

note Note: You can select either Windows Authentication or Database Server Authentication. It is recommended to use Database Server Authentication, as Windows Authentication can fail to work in some configurations. To check whether the selected connection type works, use the Test connection button.

·Use external file storage
The program stores project files in a file storage folder. Demo project files can be stored in the database, but other projects require a folder on the computer running the Application Server, unless the Application Server is deployed on a cluster. If you enable this option, specify the path to the folder where you want to store project files.

An update may require a different database structure. If this is the case, a script file that you can use to change the database structure will be provided with the update. To run the script, click Service → Application server in the Administration and Monitoring Console, click the Apply patch button and provide the path to the script file.


Distributed verification

Show/Hide Hidden Text

Distributed verification allows you to restrict the set of fields that require verification in the stage. Distributed verification can be used in the Verification and Data Verification stage type. Creating custom processing stages based on these stages enables processing different document fields in different stage (the rule of sending document to a stage is set up with a script).

To create a set of fields for distributed verification, complete the following steps:

1.Open the Field Set tab of the stage properties dialog box. Use the > and >> buttons to create a set of fields for a stage.

2.On the Entry Conditions tab, specify conditions that determine whether documents should be processed on this stage:

oAlways

oNever

o [image] Under these conditions

You can create a set of conditions that determine whether documents should be processed on this stage. These conditions include:

§The task was processed successfully

§Number of characters for verification satisfies the expression

§Percentage of characters for verification satisfies the expression

note Note: percentages are rounded up.

§Number of characters for data verification satisfies the expression

§Number of fields for compulsory verification satisfies the expression

note Note: fields for compulsory verification are fields that have the Send to field verification option set to Always.

§Number of characters for double verification satisfies the expression

§Has rule errors

§Has assembly errors

§Has batch integrity errors

note Note: batch integrity is checked on the Export stage.

§Field value satisfies the expression.

note Note: field value checks do not work for repeating fields or number fields with values higher than 2147483647.

3.Specify the next stage for the document on the Exit Routes tab. You can also specify conditions that determine whether documents should be processed on other stages.
When using distributed verification, it is recommended to pay attention to the following:

oInformation about the error is displayed in the Errors window, only if at least one field associated with the error is included in the data set available to the Operator. If none of the fields associated with the error is included in the fields set, information that the document contains errors is not displayed to the Operator.

oIf some of the fields associated with the error are not included in the specified fields set, information about the error is displayed in the Errors window, but the Operator cannot go to the field out of the fields set and correct the error.

oIf you need to ensure a high security level in the Data verification stage, select the option Hide page image outside selected fields. If this option is selected, only fields from the specified fields set will be available to Operator. All other fields will be hidden.

note Note: If this option is selected, but the field region has been detected incorrectly or with a shift when matching a Document Definition, the Operator can fail to verify the field. In this case, the Operator should send the image to the Exceptions stage.


Double verification

Double verification is a data verification mode where fields are verified by two different Operators.

To enable double verification:

1.Select the Requires double verification option in the field properties.

2.Select the Double verification option on the Field Set tab of the stage settings dialog box.

Merging results of double verification is performed in the Processing Server. If verification results match, the document is sent to the next stage. Otherwise the check is carried out by the resultant hand.


_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


Prohibit sending documents from one processing stage to another

Show/Hide Hidden Text

This section describes how you can use roles to prohibit an Operator from sending documents from stage A to stage B.

If stage B is Exceptions

The only way to prohibit an Operator from sending documents to the Exceptions stage is to exclude this stage completely from the routing schema on the Workflow tab of the Project Properties dialog box (click Project → Project Properties...) or on the Workflow tab of the Batch Type Properties dialog box (click Project → Batch Types..., select the desired batch type, and click Edit...).
If stage B is Rescanning

Use the Advanced routing schema. First, open the properties of stage A and clear the item that allows sending documents to the Rescanning stage. Next, create a new role without granting it permissions to send documents to any stage. Finally, assign this role to the Operator in the Administration and Monitoring Console.

To prohibit sending documents to the Rescanning stage:

1.For batches of the Default type, click Project → Project Properties... For other batch types:

oClick Project → Batch Types...

oSelect the batch type which you want to make accessible or inaccessible

oClick Edit...

2.Click the Workflow tab.

3.In the Schema field, select Advanced.

4.From the list, select the stage from which documents should not be sent.

5.Click Edit....

6.In the Workflow Stage Properties dialog box, click the Exit Routes tab.

7.Clear the Allow operator to send tasks to rescanning stage item.

8.Click OK to save the changes.

Now you need to prohibit an Operator from sending documents to any stage. Create an appropriate role and assign it to the Operator in the Administration and Monitoring Console:

1.Click Project → Project Properties...

2.Click the User Roles tab.

3.Click New...

4.Provide a name for the role in the corresponding field.

5.Clear the Send tasks to any available stage item. Clear or select any other items depending on which permissions you need to grant to the Operator.

6.Click OK to save the changes.

7.Assign the role to the Operator for the corresponding batch type in the Administration and Monitoring Console.
If stage B is neither Exceptions nor Rescanning

In this case you need to create a role without ranting it permissions to send documents to any stage. Next, in the properties of stage A explicitly prohibit the Operator from sending documents to stage B. This can be achieved by either removing stage B from the allowed addressees or by allowing sending documents in automatic mode but not in manual mode.

To prohibit the Operator from sending documents to any stage, create an appropriate role and assign it to the Operator in the Administration and Monitoring Console:

1.Click Project → Project Properties...

2.Click the User Roles tab.

3.Click New...

4.Provide a name for the role in the corresponding field.

5.Clear the Send tasks to any available stage item. Clear or select any other items depending on which permissions you need to grant to the Operator.

6.Click OK to save the changes.

7.Assign the role to the Operator for the corresponding batch type in the Administration and Monitoring Console.

To prohibit the Operator from sending documents to stage B:

1.For batches of the Default type, select Project → Project Properties... For other batch types:

oClick Project → Batch Types...

oSelect the batch type which you want to make accessible or inaccessible

oClick Edit...

2.Click the Workflow tab.

3.In the Schema field, select Advanced.

4.To completely prohibit the Operator from sending documents to stage B, disable this stage by clearing the item next to the name of the stage, or remove the stage by selecting it from the list and clicking Delete.

5.If you need to prohibit the Operator from sending documents but allow the system to send documents automatically:

oFrom the list, select stage A, from which documents should not be sent.

oClick Edit....

oIn the Workflow Stage Properties dialog box, click the Exit Routes tab.

oSelect the name of the stage from the list.

oClick Edit....

oIn the Next Stage dialog box, clear the Allow operator to send tasks to this stage item.

oClick OK to save the changes to the sending options.

6.Click OK to save the changes to stage A.


Working with tasks, batches, and documents

The Operator of a Verification Station can get a task manually by clicking the Get Task button or command, or he may receive a task tacitly as a consequence of some other actions performed on documents related to the task.

Getting a task manually

A Verification Operator can get a task manually by clicking the Get Task button on the toolbar or by clicking the Get Task command on the Task menu. In the Batches view, the command applies to the selected batches. In the Details view, the command applies to the selected documents. Once the task is completed, the program will automatically switch to the Batches view.

Receiving a task as a result of modifying a document

A Verification Operator may receive a task when he starts modifying a document or documents. Modifications that may procure a task for a verification Operator include editing a document, moving or deleting document pages, and recognizing a document.

When a Verification Operator starts modifying documents, the program will check if they are part of a task. If the documents are part of a task assigned to another Operator, modification is canceled and a corresponding notification message is displayed to the Verification Operator. If the documents are part of one and the same task not assigned to another Operator, further processing will be determined by the current stage of the task:

·A task that is currently at the Exceptions or Processed stage will be tacitly received by the Verification Operator. Once the Verification Operator finishes modifying the documents, the task will be released and sent back to its original stage. All the changes made to the documents will be saved.

·For a task that is currently at any stage other than the Exceptions or Processed stages, a warning message is displayed saying that the task is currently at the <QueueName> stage and asking the Verification Operator if he wants to interfere with the processing currently underway. If the Verification Operator clicks Yes, the task is sent to the Exceptions stage. If the Verification Operator clicks No, modification is canceled.

If the documents are part of different tasks not assigned to another Operator, a warning message is displayed asking the Verification Operator if he wants to interfere with the processing currently underway. If the Verification Operator clicks Yes, another warning message is displayed saying that a new task will be created from several other tasks. If the Verification Operator agrees, a new task will be created at the Exceptions stage, the documents will be modified, and the task will remain at the Exceptions stage. All the changes made to the documents will be saved.

warning Important! The icons of documents that are part of some tasks are displayed in gray.

note Note: If the Verification Operator processes one document at a time and all documents in the batch are currently at different processing stages and one of the documents is locked by a task, the Verification Operator will not be able to modify the other documents.


Prohibit sending documents to a processing stage

You can prohibit an Operator from sending documents to a processing stage without resorting to roles. Simply select the Linked to previous (operators will not be able to send tasks to this stage manually) item for the processing stage. You may wish to select this item for stages for which pre-processing is required. You cannot prohibit an Operator from sending documents to the Exceptions and Processed stages, so this item is not available for these stages.

To prohibit an Operator from sending documents to a processing stage:

1.For batches of the Default type, select Project → Project Properties... For other batch types:

oSelect Project → Batch Types...

oSelect the batch type which you want to make accessible or inaccessible

oClick Edit...

2.Click the Workflow tab.

3.When using the Advanced processing schema, select the processing stage and click Edit...

4.Select the Linked to previous (operators will not be able to send tasks to this stage manually) item.

5.Click OK to save the changes.


Hot keys in the data verification station main window

Menu | Command | Shortcut
File | Exit | Alt+F4
View | Full Screen | F11
 | Refresh | F5
Tasks | Get Task | Ctrl+G
Help | Help Topics | F1


Hot keys in the project setup station main window

Menu | Command | Shortcut
File | New Project... | Ctrl+Shift+N
 | Open Project... | Ctrl+Shift+O
 | Save | Ctrl+S
 | New Batch... | Ctrl+N
 | Load Images... | Ctrl+O
 | Scan Images... | Ctrl+K
 | Import Images... | Ctrl+I
 | Export to Data to Files... | Alt+Shift+S
 | Export to Database Database... | Alt+Shift+D
 | Exit | Alt+F4
Edit | Undo | Ctrl+Z
 | Redo | Ctrl+Y
 | Cut | Ctrl+X
 | Copy | Ctrl+C
 | Paste | Ctrl+V
 | Delete | Del
 | Select All | Ctrl+A
 | Find... | Ctrl+F
 | Find Next | F3
 | Go To → Next Document | Ctrl+D
 | Go To → Previous Document | Ctrl+Shift+D
 | Image → Despeckle | Ctrl+Alt+K
 | Image → Invert | Ctrl+Alt+V
 | Image → Rotate 90° Clockwise | Ctrl+W
 | Image → Rotate 90° Counterclockwise | Ctrl+Shift+W
View | Test Batches | Ctrl+Shift+B
 | Working Batches | Ctrl+B
 | Details | Alt+1
 | Thumbnails | Alt+2
 | Image Mode | Ctrl+1
 | Data Mode | Ctrl+2
 | Zoom In | Ctrl+Num+
 | Zoom Out | Ctrl+Num-
 | Thumbnails Size: Increase | Ctrl+Shift+Num+
 | Thumbnails Size: Decrease | Ctrl+Shift+Num-
 | Full Screen | F11
 | Refresh | F5
 | Object Properties | Alt+Enter
Recognition | Analyze | Ctrl+E
 | Match Document Definition... | Alt+Shift+E
 | Recognize | Ctrl+R
Verification | Run Data Verification... | F7
 | Next Item to Verify | F4
 | Previous Item to Verify | Shift+F4
 | Next Assembly Error | F9
 | Previous Assembly Error | Shift+F9
 | Next Uncertain Character | F8
 | Previous Uncertain Character | Shift+F8
 | Next Rule Error | F6
 | Previous Rule Error | Shift+F6
 | Copy Value to Other Rows | Ctrl+Q
 | Copy Value to All Rows | Ctrl+Shift+Q
Project | Document Definitions... | Ctrl+T
 | Batch Types... | Ctrl+Shift+T
 | Image Import Profiles... | Ctrl+Shift+I
Tools | Update to Latest Version | Alt+Shift+U
 | Reanalyze | Ctrl+Alt+E
 | Rerecognize | Ctrl+Alt+R
 | Recheck Rules | Ctrl+F6
 | Check Batch Integrity | Ctrl+Shift+E
Help | Help Topics | F1
General Commands | Open the document window (if a document or page is selected) | Enter


Hot keys in the Verification Station main window

Menu | Command | Shortcut
File | Save | Ctrl+S
 | New Batch... | Ctrl+N
 | Load Images... | Ctrl+O
 | Scan Images... | Ctrl+K
 | Export to Data to Files... | Alt+Shift+S
 | Export to Database... | Alt+Shift+D
 | Exit | Alt+F4
Edit | Undo | Ctrl+Z
 | Redo | Ctrl+Y
 | Cut | Ctrl+X
 | Copy | Ctrl+C
 | Paste | Ctrl+V
 | Delete | Del
 | Select All | Ctrl+A
 | Find... | Ctrl+F
 | Find Next | F3
 | Go To → Next Document | Ctrl+D
 | Go To → Previous Document | Ctrl+Shift+D
 | Image → Despeckle | Ctrl+Alt+K
 | Image → Invert | Ctrl+Alt+V
 | Image → Rotate 90° Clockwise | Ctrl+W
 | Image → Rotate 90° Counterclockwise | Ctrl+Shift+W
View | Working Batches | Ctrl+B
 | Queues | Ctrl+Q
 | Details | Alt+1
 | Thumbnails | Alt+2
 | Image Mode | Ctrl+1
 | Data Mode | Ctrl+2
 | Zoom In | Ctrl+Num+
 | Zoom Out | Ctrl+Num-
 | Thumbnails Size: Increase | Ctrl+Shift+Num+
 | Thumbnails Size: Decrease | Ctrl+Shift+Num-
 | Full Screen | F11
 | Refresh | F5
 | Object Properties | Alt+Enter
Task | Get Task | Ctrl+G
Recognition | Analyze | Ctrl+E
 | Match Document Definition... | Alt+Shift+E
 | Recognize | Ctrl+R
Verification | Run Data Verification... | F7
 | Next Item to Verify | F4
 | Previous Item to Verify | Shift+F4
 | Next Assembly Error | F9
 | Previous Assembly Error | Shift+F9
 | Next Uncertain Character | F8
 | Previous Uncertain Character | Shift+F8
 | Next Rule Error | F6
 | Previous Rule Error | Shift+F6
 | Copy Value to Other Rows | Ctrl+Q
 | Copy Value to All Rows | Ctrl+Shift+Q
Tools | Update to Latest Version | Alt+Shift+U
 | Reanalyze | Ctrl+Alt+E
 | Rerecognize | Ctrl+Alt+R
 | Recheck Rules | Ctrl+F6
 | Check Batch Integrity | Ctrl+Shift+E
Help | Help Topics | F1
General Commands | Open the document window (if a document or page is selected) | Enter
 | Registration parameters | Ctrl+P


Image import profiles

Show/Hide Hidden Text

You can automate the image adding routines on the Verification Station and the Project Setup Station if images are regularly imported from the same source. To automate the process, create an image import profile on the Project Setup Station. Additionally, you can configure the import of images at regular time intervals and the processing of imported images in background mode. Once the required settings have been configured, images can be scanned, imported, and processed (e.g.. despeckled) with a click of a button. If required, you can change the import source or its settings.

If your import sources change frequently, you can create several import profiles and switch between them to avoid changing import source settings each time you choose a different source.

Creating an import profile

To add an import profile, click Project → Image Import Profiles... in the main window. In the dialog box that opens, you can create new import profiles or edit, remove, or copy existing ones.

You can create a new import profile with the help of the Import Profile Wizard, which can be run by clicking New... in the Image Import Profiles dialog box. When the wizard prompts you, select an import source (e.g. a scanner or a Hot Folder).

Creating an import profile for a scanner

1.Select Scanner as the import source.

warning Important! The scanner must be connected. To connect the scanner correctly, consult the documentation supplied with the scanner. Be sure to install all of the software supplied with the scanner.

2.Configure the image scanning options:

oStyle of the settings dialog Choose how the program will interact with the scanner:

·FlexiCapture Scanner Settings: The Scanner settings dialog box of ABBYY FlexiCapture will be used. Click the Settings... button to configure scanning options. If you select the Show scanner settings before scanning option, then the Scanner settings dialog box of ABBYY FlexiCapture will appear prior to scanning when you select this import profile.

·Scanning Options: The dialog box of the scanner driver will be used. You will not be able to change the scanning options when creating an import profile, but the Scanner settings dialog box will appear each time you start scanning an image.

oSpecify whether you want to scan one or multiple images at a time.

3.Configure the image pre-processing options.

4.If required, change the default name of the import profile and add a comment.

Creating an import profile for a Hot Folder or a mail box

1.Select Hot Folder as the import source. Select the type of your Hot Folder:

§Local folder or LAN folder

§MAPI (mailbox)

§POP3 server

§IMAP server

§SFTP server

§FTP server

§Microsoft Graph Mail API

Click Browse... to specify the path to the Hot Folder or click Settings... to enter your login and password.

warning Important! To be able to add images from a Hot Folder, the user must have read and write privileges for that folder.

To set up import from a MAPI mailbox

oAn e-mail account must be configured on the computer.

oThe Operator Station or the Processing Station must be run under the user account that is used for accessing the mailbox.

note Note: Microsoft Outlook has to be started under this user account on the given computer at least once before the import profile is set up. The bitness of Microsoft Outlook has to be the same as the bitness of ABBYY FlexiCapture 12, e.g. if you are using the 64-bit version of ABBYY FlexiCapture 12, you will need to use the 64-bit version of Microsoft Outlook.

oClick Browse... and select the desired mail box.

To set up import from a POP3 server

oSpecify the address of your POP3 server (e.g. pop.server.com).

oClick Settings... and in the dialog box that opens, enter the user name and password required to access the messages on the server.

oUnder Type of encrypted connection, select one of the following:

·None – The connection will not be encrypted. Use this option for connections over an unsecured port.

·SSL – The connection will always be encrypted.

·Auto – The connection will be encrypted if a secured port is specified and will not be encrypted if no port is specified.

note Note: If all the settings are correct but ABBYY FlexiCapture is still unable to retrieve messages from the POP3 e-mail server, make sure that the e-mail server is not blocked by a firewall.

To set up import from an IMAP server

oSpecify the address of the IMAP server (e.g. imap.server.com).

oClick Settings... and in the dialog box that opens, enter the user name and password required to access the messages on the server.

oUnder Type of encrypted connection, select one of the following:

·None – The connection will not be encrypted. Use this option for connections over an unsecured port.

·SSL – The connection will always be encrypted.

·TLS – The connection will always be encrypted.

·Auto – The connection will be encrypted if a secured port is specified and will not be encrypted if no port is specified.

oClick Browse... and select a subfolder inside the mailbox.

note Note: If all the settings are correct, but ABBYY FlexiCapture is still unable to retrieve messages from the IMAP e-mail server, make sure that the connection to the e-mail server is not blocked by a firewall.

To set up import from an SFTP/FTP server

oSpecify the address of the SFTP/FTP server. If you are using a non-standard port to connect to the server, please specify it after the address using the following format: sftp://address:port/ or ftp://address:port/

oClick Settings... and in the dialog box that opens, enter the user name and password required to access the messages on the server.

oClick Next. If you are setting import from an SFTP server, you will see a public key validation dialog box.

note Note: If all the settings are correct but ABBYY FlexiCapture still cannot receive a response from the SFTP/FTP server, make sure that the server is not blocked by a firewall.

To set up import via the Microsoft Graph Mail API

oClick Sign in....The OAuth 2.0 Authorization Wizard will be launched.

oClick the link in the OAuth 2.0 Authorization Wizard to sign in to your Microsoft account.

oGrant the required permissions to the application (for more information, see Importing images using Microsoft Graph Mail API).

oReturn to the OAuth 2.0 Authorization Wizard and click Finish.

oIn the Import Profile Wizard, click Browse... and select a subfolder inside the mailbox.

note Note: Importing images using Microsoft Graph Mail API is not supported for shared mailboxes.

note Note: By default, the refresh token required to use the Microsoft Graph Mail API will expire after 90 days of inactivity and you will need to re-authenticate to obtain a new token. The token lifetime can be configured by an Active Directory administrator (see Microsoft documentation for details).

2.Specify the image loading options:

oCheck Hot Folder every Select this option and enter a regular time period for the program to check the Hot Folder for new images. If a mail box is selected as a Hot Folder, the program will check it for new e-mails after the first e-mail has been imported. If there are new e-mails in the mail box and free CPU cores are available on the computer where the Processing Server is installed, all the new e-mails will be imported one by one until the mail box is empty. The next check on the mail box will be performed at the end of the time period specified in this box.

note Note: To import images from Hot Folders, you must enable Hot Folder processing for your project in the Administration and Monitoring Console (click Settings → Projects).

oIn Batch Settings, select one of the following options to specify a batch to which new images should be added:

oAdd images to current batch Select this option to add images from the Hot Folder to the current batch.

oAdd images to specified batch Select this option and then select a batch name from the drop-down list to add images to a specific batch.

oCreate new batches for imported images automatically Select this option to create batches for new images automatically. Each time the Hot Folder is checked (the time interval can be specified in Check Hot Folder every), one or several batches will be created, and images from the Hot Folder will be added to those batches according to the rule you specify in this dialog box.
In the Batch type field, specify the batch type. If required, specify the batch registration parameters (click Registration parameters...) and modify the batch priority in the Priority field.

note Note: If import tasks are processed on the Processing Server, the Create new batches for imported images automatically option must be selected. The Add images to current batch and Add images to specified batch options can be used only if images are imported on the Project Setup Station, or if you are using a standalone edition of ABBYY FlexiCapture.

oAttach mail to batch (only for a POP3 server Hot Folder)
Select this option if you want to attach an e-mail message file in EML format to the newly created batch. Attached e-mail messages can be downloaded and opened using an e-mail client. For details, see User attachments.

oIn the Number of files to add drop-down list, select one of the following options, which determine the number of files to add to an existing or a newly created batch:

oAccording to description file Files will be added according to a description file. To specify the name and type of the description file, click the Settings... button. For details, see Description file.

note Note: To set up import from a mail box using a description file, add the XML description file as an e-mail attachment. Sample description file

This sample XML description file is used for importing 10 images from a POP3 server. The images are assembled into 2 documents, each containing 5 images.

<Batch>

<Name>batch 1</Name>

<SourceID>EXAMPLE</SourceID>

<Documents>

<Document Index="0">

<Name>1</Name>

<Images>

<Image Index="0" PageIndex="0" SourcePath="pop.server.ru" SourceFile="Image_00000001.tif" SourceFilePageIndex="0">1.pdf</Image>

<Image Index="1" PageIndex="1" SourcePath="pop.server.ru" SourceFile="Image_00000001.tif" SourceFilePageIndex="1">1.pdf</Image>

<Image Index="2" PageIndex="2" SourcePath="pop.server.ru" SourceFile="Image_00000001.tif" SourceFilePageIndex="2">1.pdf</Image>

<Image Index="3" PageIndex="3" SourcePath="pop.server.ru" SourceFile="Image_00000001.tif" SourceFilePageIndex="3">1.pdf</Image>

<Image Index="4" PageIndex="4" SourcePath="pop.server.ru" SourceFile="Image_00000001.tif" SourceFilePageIndex="4">1.pdf</Image>

</Images>

</Document>

<Document Index="1">

<Name>2</Name>

<Images>

<Image Index="0" PageIndex="0" SourcePath="pop.server.ru" SourceFile="Image_00000011.tif" SourceFilePageIndex="0">2.pdf</Image>

<Image Index="1" PageIndex="1" SourcePath="pop.server.ru" SourceFile="Image_00000011.tif" SourceFilePageIndex="1">2.pdf</Image>

<Image Index="2" PageIndex="2" SourcePath="pop.server.ru" SourceFile="Image_00000011.tif" SourceFilePageIndex="2">2.pdf</Image>

<Image Index="3" PageIndex="3" SourcePath="pop.server.ru" SourceFile="Image_00000011.tif" SourceFilePageIndex="3">2.pdf</Image>

<Image Index="4" PageIndex="4" SourcePath="pop.server.ru" SourceFile="Image_00000011.tif" SourceFilePageIndex="4">2.pdf</Image>

</Images>

</Document>

</Documents>

</Batch>

oAll files All files from the Hot Folder will be added. Files from subfolders will be ignored.

oFrom subfolder Files will be added from subfolders whose names comply with a naming scheme. Click Settings... to specify a naming scheme.

note Note: An asterisk (*) indicates any string of characters; a question mark (?) indicates any single character.

note Note: Rename a subfolder according to your naming scheme only after all the required files have been copied to it. Otherwise, file access conflicts may occur.

oSeveral files Several files will be added. To specify the number of files, click the Settings... button and enter a number or a range. Files from subfolders will be ignored.

note Note: If you specify a certain number of files, e.g. 5, and there are only 4 files left in the Hot Folder, these files will not be imported. If you specify a range, e.g. 1-5, the remaining 4 files will be imported.

note Note: When using the Microsoft Graph Mail API, only one e-mail message is imported per each import task. Importing messages in parallel is not supported — import tasks are carried out one by one on each Processing Station.

oSingle file One file will be added.

oAttached to the letter All the files attached to the e-mail message will be added.

note Note: New images are added to the batch according to their file names in ascending order.

oMessage bodies and attachments Both the attached files and the message bodies will be added.

3.Configure image pre-processing options. You can select the Use image processing options from batch type option to apply the document separation and image processing settings specified for the batch type.

4.The Profile Wizard will prompt you to specify options for Hot Folder cleanup after import. Successfully imported images can be either deleted or moved to another folder. Images that have been processed with errors (e.g. if the file is corrupt or there has been a network error) can be either left in the Hot Folder or moved to another folder.

note Note: Avoid keeping in the Hot Folder images that have been processed with errors. It may want to keep such images in the Hot Folder if:

oimages are imported manually (note that during automatic export, a corrupted file in the Hot Folder may prevent the other files in the Hot Folder from being processed);

oHot Folder processing is often interrupted due to an unstable network connection.

5.If required, change the default name of the import profile and add a comment.

You can also edit and create image import profiles in the Select Import Profile dialog box. Click File → Import Images... to open this dialog box.

listPicture Adding page images


Installing ABBYY FlexiCapture servers

Show/Hide Hidden Text

The servers are installed from the ABBYY FlexiCapture disk via the setup menu. The following servers must be installed:

·Application Server

·Database Server

·Processing Server

· Licensing Server

Installation instructions for each server are provided below.

Application Server

Before installing the Application Server, make sure that the necessary components are installed.

If these components are not installed on your computer, all of them (with the exception of Internet Information Services) can be installed from the ABBYY FlexiCapture disk (Autorun, 1. Distributed Installation → 1. Install External Components).

If all of the above components are already installed, you can start installing the Application Server. On the Autorun menu, select 1. Distributed Installation → 2. Install Servers and follow the instructions of the setup wizard. in the Custom Setup dialog box, select Application Server.

To install Web Scanning station and Web Capture station in the Custom Setup dialog box, select the Web Stations option. In this case Operators will be able to access the stations via browser. Default installation paths cannot be changed.

note Note: Prerequisites (e.g. Msxml6) are installed only when installation or modification of the program is run via the setup.exe file.

Once the Application Server is installed, the Administration and Monitoring Console will be launched automatically, where you can set a database connection and grant right to the Operators.

Database Server

The Database Server stores the data required for document processing operations: information about the Operators, batches, events, etc. If there are no more than 50 Verification Stations in the system and no more than 100,000 documents are processed daily, you can use Microsoft SQL Server Express Edition. For larger volumes, the use of the full version of Microsoft SQL Server and/or File Storage Folder is recommended.

Microsoft SQL Server Express Edition can be installed from the ABBYY FlexiCapture disk: on the Autorun menu, select 1. Distributed Installation → 1. Install External Components.

Processing Server

The Processing Server distributes the workload among the Processing Stations. Together with the server, a Processing Server Monitor is installed, where you can monitor the operation of the server and set task priorities.

To install the Processing Server, on the Autorun menu, select 1. Distributed Installation → 2. Install Servers and follow the instructions of the setup wizard. in the Custom Setup dialog box, select Processing Server.

Once the Processing Server is installed, you must configure it (i.e. start the server, add the Processing Stations, etc.).

Licensing Server

The system requires a valid protection key which must be activated on the ABBYY activation server. This can be done via the License Manager application, which starts automatically once you have installed the Licensing Server.

To Install the Licensing Server, on the Autorun menu, select 2. Install Servers → 1. Distributed Installation and follow the instructions of the setup wizard. in the Custom Setup dialog box, select Licensing Server.

The License Manager allows you to manage your licenses, i.e. add, activate, select licenses and view their parameters.


Installing ABBYY FlexiCapture stations

The stations are installed from the ABBYY FlexiCapture disk via the setup menu. You can also install the stations from the server, if the station installed was copied to the server when installing the Application Server.

The following stations must be installed:

·Project Setup Station

·Scanning Station

·Data Verification Station

·Verification Station

· Processing Station

The Scanning, Data Verification and Verification Stations can work both in the local area network and remotely via the Internet. Authorization is carried out using a login and a password.


ABBYY FlexiCapture interface

Show/Hide Hidden Text

This section describes the main elements of ABBYY FlexiCapture interface: the main windows, menus and toolbars.

Group Verification Window

listPicture Group Verification Window Menus

listPicture Group Verification Window Toolbars

Field Verification Window

listPicture Field Verification Window Menus

listPicture Field Verification Window Toolbars


Manual import of images

If required, images can be added into the batch manually on the Verification Station (by the Senior Verification Operator) or on the Project Setup Station. Images are added in batch viewing mode. Open the batch into which you want to add images or simply select this batch in the list.

The following methods are available for adding images into the batch:

·Loading previously saved image files

·Scanning documents

·Importing images by using one of the previously created image import profiles (see Image import profiles)

To add the images, right-click the batch and select the corresponding menu item from the shortcut menu.

Adding images from file

To load images from file, select the Load Images menu item or use the Ctrl+O shortcut. In the dialog box that opens, select the required image files and configure the image import options:

·Create new document new documents will be created for the added images

·Add to current document images will be added to the current, highlighted document.

·You can also select image pre-processing options. Click the Image Processing Settings... button and select the desired options in the dialog box that appears. For details, see Image pre-processing options.

By default document separation and image processing are performed according to the settings specified for the batch type.

Scanning images

To add images from a scanner, select the Scan Images... menu item. Choose a scanner, configure scanning options and scan images.

Adding images with the help of import profiles

If the Administrator has configured import profiles, their names will be shown in the menu of the import button. To start importing images, you only need to select an item with the name of one of the import profiles.

After you select Import Images... the Select Import Profile dialog box opens. Select the import profile from the list and click the Import button to start importing images.


Installing ABBYY FlexiCapture in a local area network

ABBYY FlexiCapture can be easily installed and used in a local area network.

To be able to install the stations from the server, you need to select the Stations deployment package option when installing the Application Server. The files required to install the stations from the server will be copied onto the server.

ABBYY FlexiCapture can be easily deployed on multiple LAN computers. Network installation is done in two stages: first, the ABBYY FlexiCapture station files are copied onto the server when installing the Application Server; then the stations can be installed from the server over the LAN.

For detailed instructions, see the Administrator's Guide, which is available from the Autorun menu.


Processing Server and Processing Stations setup

The Processing Server is set up in the Processing server Monitor, an application that is automatically installed with the server.

To set up the Processing Server:

1.Launch the Processing Server Monitor by selecting Start → All Programs → ABBYY FlexiCapture 12 Servers → Processing Server.

2.Add the server by selecting Actions → Add Server....

3.Provide the path to the Application Server (Actions → Properties).

4.Start the Processing Server (Actions → Start)

note Note: To start the Processing Server, the Administrator must issue the user account permissions, under which the server is running (i.e. $).

5.Create the list of Processing Stations, specify their properties, and start them:

oTo add a station, go to the Stations node in the Processing Server tree and select Actions → Add Stations...

oTo set up a station, select it in the overall list of stations and from its shortcut menu, select Properties.

oSpecify the required station parameters: launch, priority, possible task types, etc.

warning Important! The maximum number of simultaneous process (Maximum number of processes field) may not be greater than the allowed number of processes (Allowed number of processes field). At the same time, the total number of simultaneous process on all Processing Stations may not be greater than allowed by your license. If you attempt to start more stations, they will not run.

Generally the Processing Stations and the Processing Server can run under different accounts. Though by default or if they are started under the Network Service, the Processing Stations run under the same account as the Processing Server. The permissions are granted to the stations by the Processing Server when the stations are connected to the server.

warning Important! System time on the Processing Server and on the Processing Stations must be synchronized. If the difference in system time is greater than 24 hours, the Processing Stations won't start.

Information about the type of the task (import from a Hot Folder, preprocessing, export), the time of starting the task execution, the batch name, the execution progress, the status, the priority, the author and the name of the station where the task is executed as well as a path to the project are available in the list of the tasks.

The status Successfully indicates that the task completed without errors. If an error occurs during the task execution, the status Failed is assigned to the task. The status is also displayed in the form of an icon next to the task name.

note Note: If information messages, warnings or errors appear during the task execution, but the task execution is still considered successful (problems are not critical for the task), you can trace states of such tasks by task icons. For example, such a situation can occur if non-obligatory export failed because access to the data receiver was denied.

The View Log item opens an additional window with detailed information on all actions executed by the program during processing a selected task. For example, you can trace how a required Document Definition is selected during recognition, or examine information messages and warnings.

The list of all events can be saved as a text file (*.txt). For this, select the Export List... item.

By default the Processing Server Monitor is configured so that information about successfully completed tasks is deleted from the tasks list automatically. In the File → Settings... dialog you can also configure the settings for displaying tasks and deleting them from the tasks list. If full statistics of tasks execution on the Processing Server need to be kept, deselect the Remove completed tasks from the list option.


Operators of ABBYY FlexiCapture

Operator is a user of ABBYY FlexiCapture for whom a document processing role and corresponding permissions have been specified. The Operators' access permissions differ depending on their areas of responsibility. An Operator's access permissions depend on the Operator's role.

The following roles are available in ABBYY FlexiCapture (each role is set up for the current project):

·Scanning Operator - an Operator in this role can work on a Scanning Station

·Data Verification Operator - an Operator in this role can work on a Data Verification Station and on a Verification Station

·Verification Operator - an Operator in this role can work on a Verification Station (only data checks, assembly errors, and rule validation are accessible to the Operator)

·Senior Verification Operator - an Operator in this role can work on a Verification Station (the entire functionality of the station is accessible to the Operator)

·Monitoring Operator - an Operator in this role can work in the Administration and Monitoring Console (all features are accessible except setup)

·Project Setup Editor - an Operator in this role can work on a Project Setup Station

·Administrator - an Operator in this role can work in the Administration and Monitoring Console (the entire functionality of the console is accessible to the Administrator). Besides, the Administrator can access any station in the system and the Administrator permissions apply to all projects uploaded to the Application Server, not only to the current ones.

note Note: If necessary, the Administrator may configure user roles that will be displayed in the general list of roles (for details, see Custom Operator roles).

A role defines the set of stations accessible to the Operator in this role, as well as the queues from which the Operator may get tasks during document processing.

The roles of Administrator and Monitoring Operator apply to the entire system. Other Operator roles apply only to individual projects. Additionally, the roles of Scanning Operator, Data Verification Operator, and Senior Verification Operator have different access permissions to batches of different types. Thus, a user may simultaneously have the following roles:

·Project A: Project setup Operator

·Project B:

oType 1 batches: Senior Verification Operator

oType 2 batches: Data Verification Operator


Uploading a project to the Application Server

Once you have created a project, you need to upload it to the Application Server. This will copy the project settings, Document Definition files, dictionaries, and other service data onto the Application Server.

warning Important! If batches have been created in the project, the batches will not be copied to the Application Server when you upload the project.

To upload your project to the Application Server, click File → Upload Project to Server... on the main menu of the Project Setup Station. In the dialog box that opens, specify:

·the URL of the server (i.e. http://<ApplicationServer> where <ApplicationServer> is the name of the computer on which the Application Server is installed) and the type of authentication to be used,

·Tenant name in the respective field.

note Note: Only the Administrator may create new projects. The project setup Operator can only set up already created projects. For this reason, after a project is uploaded to the Application Server and the station Operators are granted the required permissions by the Administrator, the project setup Operator must open the project on the Application Server by clicking File → Open Project from Server... and make the necessary settings (i.e. create Document Definitions, configure import profiles, specify export settings, etc.).

warning Important! For the export to be successful, the path to the project folder must be specified in UNC format (\\computer_name\share_name[\path] after uploading the project to the Application Server. Make sure all the stations involved in the export have access to the specified folder. Specifying the path in the format \[path]" will result in export errors. If you specify the relative path, the data will be accessible only via the API. To access the data using other methods, you need to specify the root folder for relative paths in UNC format (this can be done when configuring the project properties).


Task queues

After you enter a station, a page for getting tasks from queues is opened. The list of available queues depends on your role. To start processing a task, click the Get task button.

To get tasks only from a particular queue, choose a desired queue from the list of available queues. In this case, when clicking the Get task button, you will get a task with the highest priority from the selected queue.

You may postpone a task to process it later. It is recommended to process postponed tasks first as they are not available to other Operators. If the Operator who postponed a task does not process it for a long time, this will slow down the processing of the entire batch.

Additional features are available for the Senior Verification Operator role. The Senior Verification Operator can:

·Open the list of batches if you need to process a particular batch (e.g. send it to a processing stage, change its priority, etc.)

note Note: The list only contains batches for which the Senior Verification Operator has the necessary permissions. Permissions are given out by the Administrator in the Remote Administration and Monitoring Console.

·Choose a particular task from a queue that contains several tasks

·Send multiple tasks or batches to a processing stage at the same time.

To check if there are any new tasks in queues, click the Refresh button.


Granting access rights to users

Navigation: »No topics above this level«

Return to chapter overview

Setting up user access permissions

Access permissions are granted by the Administrator in the Administration and Monitoring Console. The Administrator sets up user access permissions and distributes Operator roles.

For more details on access permissions, please refer to the help section of the Administration and Monitoring Console.


Editing stage properties

In the Advanced mode of the Workflow setup you can specify stage properties when creating a new stage as well as edit properties of base or earlier created custom stages.

Stage properties are specified and edited in the Workflow Stage Properties dialog box. To open this dialog box for a selected stage, click the Edit... button on the right.

Properties are grouped in tabs. The number of tabs and the set of properties allowed for editing depend on the base type of a selected stage.

Option

Description

Stage

General tab

Name

In this field you can specify a different name of the stage

The property is available in all stages

Tool

From the drop-down list select a desired tool of the given base type. You can set up tools on the Stage Tools tab of the Project Properties dialog box.

note Note: For the Interactive stage, any tool can be selected:

·Document assembly check

·Verification

·Verification

·Batch integrity check

·Export confirmation

The base type assigned to the stage depends on the selected tool.

The property is available in the following stages:

·Interactive

·Document assembly check

·Data verification

·Verification

·Batch integrity check

·Export confirmation

Documents Per Task

Sets the maximum number of documents a task can contain

note Note: If the specified limit is less than the limit for the previous stage, tasks will be formed according to the limit in the given stage. You should either specify the same values for subsequent stages or select the Process entire batches option.

The property can be edited for all stages, except Batch integrity check and Processed

Wait for all documents of a batch

Specifies whether the entire batch is processed or each document from the batch is sent to next stage as soon as it is processed

The property is available in all stages, except Batch integrity check and Processed

Restrict set of Document Definitions being used

Allows you to specify which documents are admitted to the stage. For documents entering the stage, the check is carried out whether they meet the specified Document Definitions. Documents recognized with these Document Definitions are admitted to the stage.

note Note: If the set of Document Definitions is restricted and the Wait for all documents of a batch option is selected, then in the stage only documents from the specified set will be processed, but the task sent to the next stage will contain all documents of the batch.

note Note: You can restrict the set of Document Definitions used for recognition by using a script.

The property is available in all stages, except Exceptions and Processed

Enable web stations

Specifies whether web-stations can be used for processing

The property is available in the following stages:

·Exceptions

·Data verification

·Verification

·Batch integrity check

·Export confirmation

Linked to previous (operators will not be able to send tasks to this stage manually)

Allows or prohibits entering a given stage from the stage that directly precedes it in the routing schema. If this item is selected, this stage can be entered only from the stage that precedes it in the routing schema. This may be required if the stage depends on results of the previous stage and sending tasks to this stage omitting the previous stage is not allowed. To allow Operators to manually send tasks to this stage from other processing stages, clear this item.

The property is available in all stages, except Exceptions and Processed

Field Set tab

(available in the Data verification and Verification stages only)

Data being processed in the stage

Allows you to restrict the set of fields available in the stage (for distributed verification).

In the Available fields list, choose the fields to be processed. This list contains Document Definitions specified on the General tab.

Use the ">" and ">>" buttons to add desired fields to the Selected fields list.

·The ">" button adds a selected item (a Document Definition, a page, a group of fields or a field) to the list.

·The ">>" button adds all Document Definitions from the Available fields to the Selected fields list.

The "<" and "<<" buttons remove a selected item or all items from the Selected fields list respectively.

The property is available in the Data verification and Verification stages only

Hide page image outside selected fields

Specifies whether to hide fields not included in the Field Set. Select this option if a high security level must be ensured during the distributed verification.

The property is available in the Data verification stage only

Double verification

Specifies whether to enable double verification in the stage. If the option is selected, data verification will be performed by two different Operators.

The property is available in the Data verification stage only

Script tab

(is present in the Automatic stage only)

Type

From the drop-down list select one of the processing scripts: Document Processing or Batch Processing script.

The property is available in the Automatic stage only

Edit Script...

Opens the Script Editor window.

The property is available in the Automatic stage only

Exit Routes tab

(is missing in the Exceptions, Rescanning and Processed stages)

Next stage

Select how the next stage is defined:

·By routing schema

·Custom (the stage is selected from the drop-down list)

The property is available in all stages, except Exceptions, Rescanning and Processed

Conditions for sending documents to other stages

Contains the list of stages to which a task will be sent if the desired conditions are fulfilled.

To add a stage, click the Stage... button. The Next Stage dialog box will open. In this dialog box you can select a stage and specify conditions under which the task will be sent to this stage. Use the buttons on the right to configure the stage settings:

·Rule... - opens the Rule Settings dialog box where you can add a new rule.

·Edit... - opens the Rule Settings dialog box where you edit settings of the selected rule.

·Delete - deletes the selected item (a rule or a group of rules).

·Group... - opens the Rule Group dialog box which allows you to add a group of rules. Specify the name of the group and select the condition under which the group of rules is implemented: either when any one rule is implemented or all rule are implemented.

·Move Up - moves a selected rule or a group of rules one position up.

·Move Down - moves a selected rule or a group of rules one position down.

To edit the selected stage, click the Edit... button. The Next Stage dialog box that contains settings for a selected stage will open.

To delete the selected stage, click Delete.

Use the Move Up and Move Down buttons to change the order of stages.

The property is available in all stages, except Exceptions, Rescanning and Processed

Enter Conditions tab

(is missing in the Exceptions and Processed stages)

Documents are admitted to stage

Select whether documents are admitted to the stage always or under certain conditions. If the Under these conditions options is selected, use the buttons on the right to configure rules.

To add a rule, click the Rule... button. The Rule Settings dialog box will open.

To edit the selected rule, click Edit.... The Rule Settings dialog box that contains settings for a selected rule will open.

To delete the selected item (a rule or a group of rules), click Delete.

For adding a group of rules, click the Group... button. In the Rule Group dialog box that will open, specify the name of the group and select the condition under which the group of rules is implemented:

·any one rule is implemented
or

·all rule are implemented

Use the Move Up and Move Down buttons to change the rules order within a group.

note Note: If the condition is not satisfied, the document is moved to the next stage specified in the workflow schema.

The property is available in all stages, except Exceptions and Processed

note Note: Information about the selected exit route and enter conditions that have been checked is written to the Event log.


Stage tools

The Stage Tools tab of the Project Properties dialog box allows you to configure tools of the processing stages. On this tab you can add and delete custom tools and edit tools properties.

To create a new processing stage tool, click the Add... button. In the Create New Processing Stage Tool dialog box that opens, specify the name of the tool, enter the description and select the type of the stage from the Type drop-down list. The new stage tool will be added to the list of tools.

To edit a selected stage, click the Edit... button. The Processing Stage Tool Settings dialog box that opens, contains the following settings:

Option | Description
Event settings group
Add Event... button | Opens the Add Event dialog box where you choose an event to be handled in the stage. To write the script processing this event, click the Edit Script... button. The Script Editor will open.
Edit Script... button | Opens the Script Editor where you can edit the script processing the selected event.
Delete button | Removes the selected event from the list.
Skin settings group
Edit Skin... button | Opens the Skin Settings dialog box where you can set up the appearance of the stage.
Reset Skin button | Resets skin settings to default.


Test project

A test copy of a project can be used if you wish to check that the project works correctly before applying changes to working project.

To create a test copy of a project, select Project → Create Test Copy.

In the Project Setup Station, only the user who created a test copy of a project can work with it.

Once you have made changes in the test copy of the project and tested its functioning, you can either apply changes to working copy, for this, select Commit Test Copy from the Project menu, or delete the test copy, for this, select Project → Delete Test Copy.


Verification Station menu

Show/Hide Hidden Text

File

Menu |  | Description
Open Project from Server... |  | Opens an existing project from the Application Server.
Close Project |  | Closes the current project.
Save |  | Saves the changes on the server.
New Batch... |  | Creates a new batch (in the Batches view).
Load Images... |  | Loads images from files.
Scan Images... |  | Adds images obtained by scanning.
Export To | Data to Files... | Exports data to a file.
 | Images to Files... | Exports images to files.
 | Database... | Exports data to a database.
Recent Projects |  | Opens one of the previously opened projects.
Exit |  | Closes ABBYY FlexiCapture.

Edit

Menu |  |  | Description
Undo |  |  | Cancels the last action.
Redo |  |  | Restores the canceled action.
Cut |  |  | Cuts the selected objects.
Copy |  |  | Copies the selected objects to the Clipboard.
Paste |  |  | Pastes the copied object from the Clipboard.
Delete |  |  | Deletes the selected objects.
Document | Lock Document Boundaries |  | Locks the boundaries of a document to prevent it from being merged with other documents.
 | Unlock Document Boundaries |  | Unlocks the boundaries of a document.
 | Create Document |  | Creates a document from subsequent pages and documents.
 | Merge |  | Merges subsequent pages into one document.
 | Split |  | Splits selected documents into pages and documents.
 | Go To | Next Open Document | Navigates to the next opened document.
 |  | Previous Open Document | Navigates to the previous opened document.
Image | Despeckle |  | Despeckles the image.
 | Invert |  | Inverts the image.
 | Flip Horizontally |  | Flips the image horizontally (relative to the vertical axis).
 | Flip Vertically |  | Flips the image vertically (relative to the horizontal axis).
 | Rotate 90° Clockwise |  | Rotates the image 90° clockwise.
 | Rotate 90° Counterclockwise |  | Rotates the image 90° counterclockwise.
 | Rotate 180° |  | Rotates the image 180°.
 | Change Resolution... |  | Changes the resolution of the image.
 | Save As... |  | Saves the image with the specified name.
Select All |  |  | Selects all objects.
Find... |  |  | Finds specified text. note Note: In batch view, the text of all the columns is searched. In document view, the document fields is searched.
Find Next |  |  | Finds the next text that was previously specified.
Go To | Next Document |  | Goes to the next document in the batch.
 | Previous Document |  | Goes to the previous document in the batch.
 | Next Confirmed Field |  | Navigates to the next confirmed field. note Note: This command is available only if the Go to Uncertain Field on Confirmation option is enabled in the shortcut menu of the data form in the Document pane.
 | Previous Confirmed Field |  | Navigates to the previous confirmed field. note Note: This command is available only if the Go to Uncertain Field on Confirmation option is enabled in the shortcut menu of the data form in the Document pane.

View

Menu |  | Description
Working Batches |  | Opens the list of batches.
Queues |  | Opens the list of queues.
Details |  | Shows the documents and their pages as a detailed list.
Thumbnails |  | Shows document images as thumbnails.
Choose Columns... |  | Allows configuring the list of columns displayed in the detailed view mode.
Thumbnail options |  | Lets you show or hide error notifications and values of key fields in the Thumbnails view. Error messages are displayed beneath the name of the Document Definition, and values of key fields are displayed beneath the thumbnail and the section name.
Document Editor | Image Mode | Enables the document image viewing mode.
 | Data Mode | Enables the recognized data viewing mode.
 | Image Window | Allows positioning the image in the document window.
 | Errors Window | Allows selecting the location of the Errors pane in the Document pane and the types of errors to display in the list.
 | Image Scale | Allows selecting a suitable field image scale.
 | Data Text Scale | Allows selecting the font size used when displaying recognized data.
 | Show Toolbar | Shows/hides the toolbar in the document window. This toolbar allows correcting some of the matching errors, for example, you can add the field that wasn't found, and add or delete a table separator. This is mainly used when working with FlexiLayouts.
 | Show error message for active field | Changes the way errors are displayed for the current field.
 | Show Image in Black and White | Shows color and gray images in black and white.
 | Arrange Pages Vertically | Arranges the pages in the image window vertically.
 | Go to | Navigates to the previous or next opened document.
 | Go to Original Field | Navigates to the referenced field when working with a link to an existing field on the document form.
Thumbnails Size |  | Allows selecting the size of page thumbnails.
Toolbars |  | Shows/hides the toolbars.
Show Task Comment |  | Shows comments to the task.
Status Bar |  | Shows/hides the status bar.
Full Screen |  | Switches to full screen mode.
Refresh |  | Refreshes the information displayed.

Task

Menu |  | Description
Get Task |  | Gets a task from the selected queue.
Get Entire Batch |  | If the Operator is assigned the role whose access permissions allow editing batches, then in the batches view mode, the Operator can edit an opened batch. The command is available if at least one document of the batch belongs to the task. If all document belong to the same task, opens this task. If the documents belong to different tasks, creates a task for the batch in the Exceptions stage.
Close Task |  | Closes the current task and returns it to the Application Server as completed.
Reject Task |  | Rejects the current task and returns it to the Application Server.
Postpone Task... |  | Postpones the current task for later processing.
Send to | Exceptions... | Sends the current task to the Exceptions stage.
 | Rescanning... | Sends the current task to the Rescanning stage.
 | Stage... | Sends the current task to a selected stage. Sending documents to stages other than Exception and Rescanning is available for the Senior Verification Operator role type only.
Send tasks to... |  | Sends multiple tasks to a particular processing stage.
Mark Documents for Sending to | Exception... | Marks selected documents for sending to the Exceptions stage. When you close the task, marked documents will be sent to the stage.
 | Rescanning... | Marks selected documents for sending to the Rescanning stage. When you close the task, marked documents will be sent to the stage.
 | Stage... | Marks selected documents for sending to a selected stage. When you close the task, marked documents will be sent to the stage. Sending documents to stages other than Exception and Rescanning is available for the Senior Verification Operator role type only.
Add to Marked Documents... |  | Adds selected documents to already marked documents. In the dialog box that opens, select a desired stage from the list of earlier selected stages.
Clear Sending Mark |  | Deletes selected documents from the list of document marked for sending.
View Marked Documents... |  | Opens the Sending Marks dialog box where you can view the list of marks, delete a mark or change its comment.
Automatic Task Receive |  | Enables/disables automatic task receiving.
View Queue |  | Opens the selected queue.
Task Properties... |  | Opens the Task Properties dialog box where you can view the task details: task ID, creation time, priority, etc.

Recognition

Menu | Description
Analyze | Analyzes the pages of the documents and finds a suitable Document Definition.
Match Document Definition... | Matches the selected Document Definition to the selected document or page.
Recognize | Starts the recognition.
Clear Analysis Results | Clears the results of the automatic document assembly and Document Definition matching. note Note: If the Bound option is selected, the document will not be disassembled.

Verification

Menu | Description
Run Data Verification... | Starts verification.
Next Item to Verify | Goes to the next verification object.
Previous Item to Verify | Goes to the previous verification object.
Next Assembly Error | Goes to the next assembly error.
Previous Assembly Error | Goes to the previous assembly error.
Next Uncertain Character | Goes to the next uncertainly recognized character.
Previous Uncertain Character | Goes to the previous uncertainly recognized character.
Next Rule Error | Goes to the next rule error.
Previous Rule Error | Goes to the previous rule error.
Use for Training | Adds the selected document to the training batch; this document is further used to train or test the alternative.
Don't Use for Training | Removes the selected document from the training set.

Tools

Menu | Description
Update to Latest Version | Applies the project changes to the currently processed document.
Reanalyze | Re-analyzes the documents.
Rerecognize | Re-recognizes the documents.
Refresh Assembly | Re-assembles the pages into documents.
Recheck Rules | Re-checks rules.
Check Batch Integrity | Checks batch integrity.
Change Document Priority | Allows you to change the priority of currently processed documents. Possible values: ·Lowest, ·Low, ·Normal, ·High, ·Highest, ·Extra-High.
Change Batch Priority | Allows selecting batch priority.
Change Batch Type... | Changes the batch type.
Options... | Opens the Options dialog box, where you can configure different properties such as background task processing, window view, and other.

Help

Menu | Description
Help Topics | Opens the ABBYY FlexiCapture help file.
Web Help | Opens the ABBYY FlexiCapture help website.
Technical Support | Opens the Technical Support section in the program help.
How to Buy ABBYY Products | Opens the How to Buy ABBYY FlexiCapture section in the program help.
ABBYY Website | Opens the ABBYY website.
Send Feedback... | Allows sending feedback to ABBYY.
About ABBYY FlexiCapture | Opens the About ABBYY FlexiCapture 12 dialog box containing brief description of the program.


Verification Station toolbar

Show/Hide Hidden Text

The standard toolbar

Tool | Button | Description
Open Project from Server... |  | Opens a project from server.
Save Changes |  | Saves the changes.
Cut |  | When working with data in the document window, cuts the selected object.
Copy |  | Copies the selected object to the Clipboard.
Paste |  | Pastes the copied object from the Clipboard.
Delete |  | Deletes the selected object.
Undo |  | Cancels the last action.
Redo |  | Restores the canceled action.

Documents view

Tool | Button | Description
Details |  | Shows the documents and their pages as a detailed list.
Thumbnails |  | Shows thumbnails of document images.
Test Batches | TestBatches | Shows the list of test batches.
Work Batches | WorkBatches | Shows the list of work batches.
Refresh | Refresh | Refreshes information in the main window.

Navigation

Tools | Button | Description
Previous Item to Verify |  | Goes to the previous verification item; navigates through all errors, including assembly errors, uncertainly recognized characters, rule errors, key field mismatching, etc.
Next Item to Verify |  | Goes to the next verification item; navigates through all errors, including assembly errors, uncertainly recognized characters, rule errors, key field mismatching, etc.
Previous Document |  | Goes to the previous document.
Next Document |  | Goes to the next document.
Image editing

Tools | Button | Description
Autocrop |  | Automatically finds page borders on the image and crops the edges of the image, as well as corrects skewing and distortion
Crop |  | Crops the image borders selected manually by the user
Split |  | Splits the image into parts and saves each fragment as a separate page
Invert |  | Inverts the image colors
Rotate 90° Clockwise |  | Rotates the image 90° clockwise
Rotate 90° Counterclockwise |  | Rotates the image 90° counterclockwise
Rotate 180° |  | Rotates the image by 180°
Despeckle |  | Removes blemishes from the image

Queues and tasks

Tool | Button | Description
Get Task |  | Opens a task from the selected queue
Close Task |  | Returns the task to the server.
Mark for sending to exception |  | Marks the document for sending to Exceptions (for the Senior Verification Operator - to the selected processing stage). When closing or rejecting the task, you will be prompted to send marked documents to Exceptions
Mark for sending to rescanning |  | Marks the document for sending to Rescanning. When closing or rejecting the task, you will be prompted to send marked documents to Rescanning.
Unmark documents |  | Unmarks the selected document marked for sending to Exceptions or Rescanning.
Postpone Task... |  | Postpones the task.
Reject Task |  | Cancels the task (it will be sent to another Operator by the server).
Automatic Task Receive |  | Enables/disables automatic task getting.


Verification Station window

Show/Hide Hidden Text

The top part of the window contains the menu bar and the toolbar. The bottom part contains the status bar, which displays messages about the program's status and the operations it is performing, and brief descriptions of selected menu items and buttons. The rest of the main window is taken up by a pane that contains either a list of queues or a list of documents.

There are two view modes: the queue mode and the batch mode. The contents of the main window will change depending on which mode is selected.

Queues

The main window contains a list of queues from which you can select a tasks to process.

The Verification Operator and the Senior Verification Operator have access to several task queues.

The task pane contains the following information:

·All Tasks Count
The number of available tasks in the queue. Includes automated tasks and tasks created by Operators.

·Max Priority
The highest priority of all tasks in the queue.

·Personal Tasks Count
The number of tasks assigned to the current user.

·Formed Tasks Count
The total number of documents in all tasks that were generated automatically.

·Formed Tasks Count
The number of tasks that were created manually by Operators, for example when documents were added to the queue while the Create task option was enabled.

·Out-of-Processing Batches Count
The number of batches that were added to the queue by an Operator without creating a separate task.

·Processing Warning Task Count
The number of tasks containing documents from batches that are approaching their deadline.

·Overdue Task Count
The number of tasks containing documents from overdue batches.

Tip. You can use the Explore Queue command on the shortcut menu of a queue to open the view.

Show the main window

A list of documents in a task is displayed when a task is received.

Show the main window displaying the list of documents

Batches

note Note: This view is available for the Senior Verification Operator only.

In this mode the main window contains batch-related information, including the number of documents and pages in batches, the priority of batches and the amount of recognized, verified and exported symbols in batches and deadlines.

By default, all batches available to the Operator except for those that have already been processed are displayed. One page can contain up to 500 batches. Use the arrow buttons in on the right to switch between pages.

Filtering batches

You can filter batches from projects that are stored on the processing server. To do this, select a filter from the Show drop-down list and specify filter settings.

·All batches except processed;

·Batches on stages... filters batches by processing stages.
Additional filter settings

oOnly enabled stages hides stages that are not used for processing any of the batch types in the current project.

oShow out-of-processing batches shows batches that were not processed. If this option is enabled, you will not be able to filter by selected batch types.

·Batch with name prefix...
Filters batches by the prefixes of their names.

·Batch with ID...
Filters batches by their IDs.

·Batch containing document with ID...
Filters batches by IDs of documents they contain.

·Batches created in period...
Filters batches by their creation time. Dates earlier than 02/01/1753 and later than 12/31/2100 are not permitted.

·Batches with batch type...
Filters batches by their type.

·Batches with specific registration parameter...
Filters batches by registration parameter names and values. The filter can include up to three parameters.
Details...

You can specify the name and value of a registration parameter manually or select them from the Parameter drop-down list. This list contains registration parameters from all batch types and the last ten parameter names that you typed. The Value drop-down list contains ten registration parameters that were specified by a user.

·Batches filtered with...
Advanced search that uses batch name prefixes, batch types, creation dates, registration parameters and stages.

·Batches overdue within time period...
Filters batches by deadline dates.

·Batches with expiration status...
Filters batches by their deadline status.

When a filter is in use, a brief summary of its settings is displayed to the right of the Show drop-down list. To change the settings of the filter that is currently in use, click the DotsButton button.

listPicture Verification Station Menu

listPicture Verification Station Toolbars


Creating processing stages

To create a custom stage, you need to switch to Advanced mode when setting up a workflow. Then click the Stage... button on the right. A Create Processing Stage dialog box will open displaying a list of basis and previously created custom stages. You can use an existing stage as the basis for creating a new one. When you select a stage in the list, its properties are displayed at the bottom of the dialog box, under the caption Selected Settings.

There are three types of stage available to you in Advanced mode:

1.Automatic – Tasks of this type are executed on a Processing Station without operator intervention.
The Automatic stage includes the following substages:

oScanning

oRecognition

oUnattended processing

oExport

2.Interactive – Tasks of this type are processed by operators working on a Verification Station, Data Verification Station or Scanning Station.
The Interactive stage includes the following substages:

oData verification

oDocument assembly check

oVerification

oBatch integrity check

oExport confirmation

3.User Type – Tasks of this type are taken, executed, and sent to the next stage by external clients via the Web Service API.

note Note: To add a processing script to the workflow schema, select the Automatic stage. Then select a basic stage that you want to use to create a new stage and click OK. A Workflow Stage Properties dialog box will open, where you will see the following tabs:

oGeneral

oField Set (for the Data verification and Verification stages only)

oScript (for the Automatic stage only)

oExit Routes (for all stages except Exceptions, Rescanning and Processed)

oEntry Conditions (for all stages except Exceptions and Processed)

When a task is completed at one stage, the system need to select the appropriate next stage for the task. To do this, the system computes input conditions for subsequent stages.

oRoles (for stages based on custom Stage Tools)

The options available on each tab depend on which stage is selected. For a detailed description of stage properties, see Editing stage properties.

note Note: During verification, you can check the classification and document assembly results without having to verify the data. To do this, create a Verification stage, click the Field Set tab, and make sure that the Selected fields column is empty. Note, however, that if at least one field is selected, its data will be displayed on the data form awaiting verification.