Knowledge Base

Article ID: 1791 | Category: Working with Stations | Type: Tips & Tricks | Last Modified: 3/22/2019

How to overlay a filled-out form with an image of a blank form in the Document Definition editor

Description

In the case of color drop-out forms, whether filled out manually or using a printer, some letters will often overlap with or go beyond field boundaries. To improve the quality of data capture for color forms, the background is removed when forms are scanned, so that only field values are left for ABBYY FlexiCapture to detect and capture.

Operators usually verify batches of similarly structured documents and in most cases they will know for sure which field each value comes from. However, sometimes an operator might want to compare captured data against a blank form to see the names of the fields and the type of data they contain. In ABBYY FlexiCapture this can be achieved by overlaying an image of a filled-out form with an image of a blank form.

Solution

Verification Station and Project Setup Station

Images of filled-out forms can be overlayed with images of blank forms on Verification Stations and on Project Setup Stations.

Restriction
: The feature will only work for documents with sections that contain a fixed number of pages. If the document contains repeating sections, the feature will only work if the document is a structured (fixed) form.

To enable this feature, specify the following keys in the Windows registry:

[HKEY_CURRENT_USER\Software\ABBYY\FlexiCapture\12.0\Shell\Options]
"AddTemplateMaskInDocumentEditor"="true"
"AddTemplateMaskInFieldVerification"="true"
[HKEY_CURRENT_USER\Software\ABBYY\FlexiCapture\12.0\Controller]
"AlwaysLoadFullTemplateVersion"="1"

As a result, a verification operator will see a scan of a filled-out form from which all background elements have been removed overlayed with an image of the blank form defined in the Document Definition. 

Web Stations

Images of filled-out forms can be overlayed with images of blank forms on Web Verification Stations and Web Capture Stations.

Restrictions
:
    The feature is only available for legacy Web Stations that use Silverlight.
    The feature will only work for documents with sections that contain a fixed number of pages.

Web Stations work with projects stored on the ABBYY FlexiCapture Application Server. The binary data of these projects are kept in a file storage, where each project has its own folder. If a project has Document Definitions associated with it, then its folder on the ABBYY FlexiCapture Application Server will contain files named “2-*-TemplateBody*”. These are XML versions of the Document Definitions. In an XML Document Definition file, the names of the sections can be found in the “Name” attribute of the <Section> tag, which in turn, can be found inside the <DocumentDefinition> tag. The “id” attributes contain the identifiers of the sections.

To overlay a filled-out form with an image of a blank form, you need to create a 300 dpi PNG image file for each page in the section and place it in the project folder next to the Document Definition XML file. The extension of the PNG file should be removed.

The name of the PNG file depends on the name of the Document Definition file. For example, if you have a Document Definition file named

2-X-TemplateBodyY,

where Х is the ID of the Document Definition and Y is the internal version of the resource (these are numerical values recorded in the Document Definition XML file), then the PNG file should be named

2-X-ImageForOverlaySection<SectioID>Page<PageIndex>Y,

where <SectioID> is the ID of the section taken from the “id” attribute of the <Section> tag in the 2-X-TemplateBodyY file and <PageIndex> is the number of the page in the section (counting starts from 0).

Note: The numerical value Y that indicates the version of the file in the file store can be changed when editing the Document Definition in ABBYY FlexiCapture.

Example

Suppose there is a project with one Document Definition on the Application Server and there are two sections in the Document Definition—section A, containing one page, and section B, containing two pages.
In the file store, we look for the project folder: C:\FileStorage\<DataBase GUID>\project_1, where “C:\FileStorage” is the path to the file store specified when setting up the Application Server in the Administration and Monitoring Console.
In the project folder, there is a Document Definition file named 2-1-TemplateBody3. Open the file in an XML editor. If you see that the ID of section A is “1” and the ID of section B is “2,” you should name your PNG image files as follows:
- section А  = “2-1-ImageForOverlaySection1Page03”;
- section B, first page = “2-1-ImageForOverlaySection2Page03”;
- section B, second page = “2-1-ImageForOverlaySection2Page13”. 

In the Image window of the Document Definition editor, images can be displayed either in black-and-white or in color. If there are corresponding images of the blank form in the file store and the operator chooses color display mode, the scanned form will be overlayed with the blank form. If the operator chooses black-and-white display mode, only a scanned form will be displayed.

205 people think this is helpful.
Was this information helpful to you?