RecAPI
|
Form recognition module. Supported on: Windows, Linux, Embedded Linux, Mac OS X. More...
Classes | |
struct | COMB_CELL_INFO |
Structure of a comb-cell in a comb. More... | |
Typedefs | |
typedef void * | HFORMTEMPLATEPAGE |
Handle of a form template page in memory. | |
typedef void * | HFORMTEMPLATECOLLECTION |
Handle of a Form Template Collection in memory. | |
typedef void * | FORMTEMPLATEMATCHINGID |
Id of a matching form template. This ID identifies a matching in Form Template Collection. | |
Enumerations | |
enum | ANCHORCONTENT { AC_TEXT, AC_BITMAP, AC_BARCODE, AC_LINE, AC_LETTERS } |
Content of the anchor zone. More... | |
enum | ANCHORTYPE { AT_POSITIONAL, AT_SELECTOR, AT_REFERENCE, AT_CHECK, AT_SIZE } |
Type of anchor zone. More... | |
enum | ANCHORFLAG { AF_REGEXP, AF_RECOGNIZE, AF_REGEXPDIDNTMATCH, AF_CHECKED } |
Flags of anchor zones. More... | |
enum | ANCHOR_REF_POINT { REF_AUTO, REF_CENTRE, REF_TOP_LEFT, REF_TOP_RIGHT, REF_BOTTOM_LEFT, REF_BOTTOM_RIGHT } |
Reference point of the anchor. More... | |
enum | REF_ANCHOR_MODE { REF_ANCHOR_0, REF_ANCHOR_1, REF_ANCHOR_2, REF_ANCHOR_4 } |
Zone attribute that specifies how the zone is anchored to reference anchors(s). More... | |
enum | COMB_SPLITTER_HEIGHT { HALF_HEIGHT, FULL_HEIGHT } |
comb attributes More... | |
Functions | |
RECERR RECAPIKRN | kRecCreateFormTemplate (int sid, HPAGE hPage) |
Creating form template for processing filled forms. | |
RECERR RECAPIKRN | kRecSaveFormTemplate (int sid, HPAGE hPage, LPCTSTR pTemplateFilename) |
Saving user zones in a form template file. | |
RECERR RECAPIKRN | kRecLoadFormTemplate (int sid, HFORMTEMPLATEPAGE *phFormTemplatePage, LPCTSTR pTemplateFilename) |
Loading a form template from a form template file. | |
RECERR RECAPIKRN | kRecApplyFormTemplate (int sid, HPAGE hPage, HFORMTEMPLATEPAGE hFormTemplatePage) |
Applying a form template - based on a preloaded form template. | |
RECERR RECAPIKRN | kRecFreeFormTemplate (HFORMTEMPLATEPAGE hFormTemplatePage) |
Removing a form template page. | |
RECERR RECAPIKRN | kRecApplyFormTemplateFile (int sid, HPAGE hPage, LPCTSTR pTemplateFilename) |
Applying a form template - directly based on a form template file. | |
RECERR RECAPIKRN | kRecSetZoneFormFieldName (HPAGE hPage, int nZone, LPCWSTR pFormFieldName) |
Changing the name of a form-field attached to a user-zone. | |
RECERR RECAPIKRN | kRecSetOCRZoneFormFieldName (HPAGE hPage, int nZone, LPCWSTR pFormFieldName) |
Changing the name of a form-field attached to an OCR-zone. | |
RECERR RECAPIKRN | kRecGetZoneFormFieldName (HPAGE hPage, int nZone, LPWSTR *ppFormFieldName) |
Querying the name of a user-zone. | |
RECERR RECAPIKRN | kRecGetOCRZoneFormFieldName (HPAGE hPage, int nZone, LPWSTR *ppFormFieldName) |
Querying the name of an OCR-zone. | |
RECERR RECAPIKRN | kRecSetZoneName (HPAGE hPage, int nZone, LPCTSTR pZoneName) |
Changing the name of a user-zone. | |
RECERR RECAPIKRN | kRecSetOCRZoneName (HPAGE hPage, int nZone, LPCTSTR pZoneName) |
Changing the name of an OCR-zone. | |
RECERR RECAPIKRN | kRecGetZoneName (HPAGE hPage, int nZone, LPTSTR *ppZoneName) |
Querying the name of a user-zone. | |
RECERR RECAPIKRN | kRecGetOCRZoneName (HPAGE hPage, int nZone, LPTSTR *ppZoneName) |
Querying the name of an OCR-zone. | |
RECERR RECAPIKRN | kRecGetNextZoneByName (HPAGE hPage, LPCTSTR pZoneName, int nPrevZone, int *nZone) |
Querying the next zone with the given name. | |
RECERR RECAPIKRN | kRecInsertAnchorZone (int sid, HPAGE hPage, ANCHORCONTENT aContent, ANCHORTYPE aType, int nZone) |
Inserting anchor zone. | |
RECERR RECAPIKRN | kRecUpdateAnchorZone (int sid, HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pRect, int nZone) |
Updating anchor zone info. | |
RECERR RECAPIKRN | kRecGetAnchorInfo (HPAGE hPage, int nZone, ANCHORCONTENT *aContent, ANCHORTYPE *aType) |
Returning anchor content and type. | |
RECERR RECAPIKRN | kRecSetAnchorContent (HPAGE hPage, int nZone, ANCHORCONTENT aContent) |
Setting anchor content. | |
RECERR RECAPIKRN | kRecSetAnchorType (HPAGE hPage, int nZone, ANCHORTYPE aType) |
Setting anchor type. | |
RECERR RECAPIKRN | kRecSetAnchorFlag (HPAGE hPage, int nZone, ANCHORFLAG flag, INTBOOL value) |
Changing anchor zone flags. | |
RECERR RECAPIKRN | kRecGetAnchorFlag (HPAGE hPage, int nZone, ANCHORFLAG flag, INTBOOL *value) |
Getting anchor zone flag. | |
RECERR RECAPIKRN | kRecSetAnchorText (HPAGE hPage, int nZone, LPCWSTR pText) |
Setting the text attribute of text and barcode anchors. | |
RECERR RECAPIKRN | kRecGetAnchorText (HPAGE hPage, int nZone, LPWSTR *ppText) |
Getting the text attribute of text and barcode anchors. | |
RECERR RECAPIKRN | kRecSetAnchorRegExp (HPAGE hPage, int nZone, LPCWSTR pRegExp) |
Setting regular expression of text and barcode anchors. | |
RECERR RECAPIKRN | kRecGetAnchorRegExp (HPAGE hPage, int nZone, LPWSTR *ppRegExp) |
Getting regular expression of text and barcode anchors. | |
RECERR RECAPIKRN | kRecSetAnchorDrift (HPAGE hPage, IMAGEINDEX iiImg, int nZone, SIZE drift) |
Setting the drift area of text and barcode anchors. | |
RECERR RECAPIKRN | kRecGetAnchorDrift (HPAGE hPage, IMAGEINDEX iiImg, int nZone, SIZE *pDrift) |
Getting the drift area of text and barcode anchors. | |
RECERR RECAPIKRN | kRecSetZoneBarTypes (HPAGE hPage, int nZone, LPCBAR_ENA pBarEna, INTBOOL BarBinary) |
Enabling barcode types for a zone. | |
RECERR RECAPIKRN | kRecGetZoneBarTypes (int sid, HPAGE hPage, int nZone, LPBAR_ENA pBarEna, INTBOOL *pBarBinary, INTBOOL *pZoneLevel) |
Getting the enabled barcode types for a zone. | |
RECERR RECAPIKRN | kRecGetOCRZoneBarTypes (int sid, HPAGE hPage, int nZone, LPBAR_ENA pBarEna, INTBOOL *pBarBinary, INTBOOL *pZoneLevel) |
Getting the enabled barcode types for an OCR zone. | |
RECERR RECAPIKRN | kRecSetAnchorRefPoint (HPAGE hPage, int nZone, ANCHOR_REF_POINT ref) |
Setting the reference point of the anchor zone. | |
RECERR RECAPIKRN | kRecGetAnchorRefPoint (HPAGE hPage, int nZone, ANCHOR_REF_POINT *pref) |
Getting the reference point of the anchor zone. | |
RECERR RECAPIKRN | kRecInsertDropOutColorZone (HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pRect, int nZone) |
Inserting dropout color zone. | |
RECERR RECAPIKRN | kRecGetDropOutColorZoneIndex (HPAGE hPage, int *pnZone) |
Getting the index of the dropout color zone. | |
RECERR RECAPIKRN | kRecSetFormTemplateName (HPAGE hPage, LPCTSTR pTemplateName) |
Setting the name of the form template. | |
RECERR RECAPIKRN | kRecGetFormTemplateName (HPAGE hPage, LPTSTR *pTemplateName) |
Getting the name of the form template. | |
RECERR RECAPIKRN | kRecCheckFormTemplate (int sid, HPAGE hPage) |
Checking the form template. | |
RECERR RECAPIKRN | kRecSetZoneRefAnchors (HPAGE hPage, int nZone, REF_ANCHOR_MODE mode, const int *refAnchors) |
Setting the reference anchor(s) of the zone. | |
RECERR RECAPIKRN | kRecGetZoneRefAnchors (HPAGE hPage, int nZone, REF_ANCHOR_MODE *pmode, int *refAnchors) |
Getting the reference anchor(s) of the zone. | |
RECERR RECAPIKRN | kRecSetTemplateAttribute (HPAGE hPage, LPCTSTR key, LPCTSTR value) |
Setting user defined attribute of a form template. | |
RECERR RECAPIKRN | kRecGetTemplateAttribute (HPAGE hPage, LPCTSTR key, LPTSTR *pValue) |
Getting user defined attribute of a form template. | |
RECERR RECAPIKRN | kRecGetNextTemplateAttribute (HPAGE hPage, LPCTSTR prevkey, LPTSTR *key, LPTSTR *value) |
Querying the names and the values of the user defined attributes of a form template. | |
RECERR RECAPIKRN | kRecSetZoneAttribute (HPAGE hPage, int nZone, LPCTSTR key, LPCTSTR value) |
Setting user defined attribute of a user zone. | |
RECERR RECAPIKRN | kRecGetZoneAttribute (HPAGE hPage, int nZone, LPCTSTR key, LPTSTR *pValue) |
Getting user defined attribute of a user zone. | |
RECERR RECAPIKRN | kRecGetOCRZoneAttribute (HPAGE hPage, int nZone, LPCTSTR key, LPTSTR *pValue) |
Getting user defined attribute of an OCR zone. | |
RECERR RECAPIKRN | kRecGetNextZoneAttribute (HPAGE hPage, int nZone, LPCTSTR prevkey, LPTSTR *key, LPTSTR *value) |
Querying the names and the values of the user defined attributes of a user zone. | |
RECERR RECAPIKRN | kRecGetNextOCRZoneAttribute (HPAGE hPage, int nZone, LPCTSTR prevkey, LPTSTR *key, LPTSTR *value) |
Querying the names and the values of the user defined attributes of an OCR zone. | |
RECERR RECAPIKRN | kRecSetZoneOrder (HPAGE hPage, const int *order) |
Changing the order of the user zones. | |
RECERR RECAPIKRN | kRecGetOCRZoneText (int sid, HPAGE hPage, int nZone, LPTSTR *pBuffer, int *len) |
Getting the recognized text in the given OCR zone. | |
RECERR RECAPIKRN | kRecGetOCRTableCellText (int sid, HPAGE hPage, int nZone, int nCellInd, LPTSTR *pBuffer, int *len) |
Getting the recognized text in the given cell of the given OCR zone. | |
RECERR RECAPIKRN | kRecLoadFormTemplateLibrary (int sid, LPCTSTR pTmplLib, INTBOOL bLoadSTS, HFORMTEMPLATEPAGE **pphFormTmplArray, int *pLength) |
Loading form template library. | |
RECERR RECAPIKRN | kRecFreeFormTemplateArray (HFORMTEMPLATEPAGE *phFormTmplArray, int Length, INTBOOL bFreeArray) |
Freeing the array of form template handles. | |
RECERR RECAPIKRN | kRecGetFormTemplateInfo (HFORMTEMPLATEPAGE hFormTmpl, LPTSTR *pFullName, LPTSTR *pFormPath, int *pFormPage) |
Getting information about a form template. | |
RECERR RECAPIKRN | kRecFindFormTemplate (int sid, HPAGE hPage, HFORMTEMPLATEPAGE *phFormTmplArray, int Length, LPCTSTR FormPath, int FirstPage, int LastPage, HFORMTEMPLATECOLLECTION *phFormTmplCollection, FORMTEMPLATEMATCHINGID *pBestMatchingId, int *pConfidence, int *pnMatching) |
Finding the matching template(s). | |
RECERR RECAPIKRN | kRecGetFindFormTemplateInfo (HFORMTEMPLATECOLLECTION hFormTmplCollection, LPTSTR *pInfo) |
Getting info about the previous kRecFindFormTemplate call. | |
RECERR RECAPIKRN | kRecGetNextMatchingTemplate (FORMTEMPLATEMATCHINGID PrevMatchingId, FORMTEMPLATEMATCHINGID *pNextMatchingId, int *pConfidence) |
Querying the matching form templates. | |
RECERR RECAPIKRN | kRecGetMatchingInfo (FORMTEMPLATEMATCHINGID MatchId, LPTSTR *pFullName, LPTSTR *pName, int *pPageNumber, int *pPageCount) |
Getting information about a matching. | |
RECERR RECAPIKRN | kRecApplyFormTemplateEx (int sid, HPAGE hPage, FORMTEMPLATEMATCHINGID MatchingId) |
Applying form template - based on a previous kRecFindFormTemplate call. | |
RECERR RECAPIKRN | kRecFreeFormTemplateCollection (HFORMTEMPLATECOLLECTION hFormTmplCollection) |
Freeing a Form Template Collection. | |
RECERR RECAPIKRN | kRecLocateComb (int sid, HPAGE hPage, int xZone) |
Analyzing image and detecting comb cells. | |
RECERR RECAPIKRN | kRecCreateCombInfo (HPAGE hPage, int xZone, INTBOOL hasTopBorder, COMB_SPLITTER_HEIGHT splitterHeight) |
Creating comb info. | |
RECERR RECAPIKRN | kRecDeleteCombInfo (HPAGE hPage, int xZone) |
Deleting comb info. | |
RECERR RECAPIKRN | kRecIsComb (HPAGE hPage, int xZone, INTBOOL *isComb) |
Returning whether the zone has comb info. | |
RECERR RECAPIKRN | kRecGetCombCellCount (HPAGE hPage, int xZone, int *pnCells) |
Returning the number of cells in a comb. | |
RECERR RECAPIKRN | kRecSetCombInfo (HPAGE hPage, int xZone, INTBOOL hasTopBorder, COMB_SPLITTER_HEIGHT splitterHeight) |
Setting comb attributes. | |
RECERR RECAPIKRN | kRecGetCombInfo (HPAGE hPage, int xZone, INTBOOL *hasTopBorder, COMB_SPLITTER_HEIGHT *splitterHeight) |
Getting comb attributes. | |
RECERR RECAPIKRN | kRecSetCombCells (HPAGE hPage, IMAGEINDEX iiImg, int xZone, const COMB_CELL_INFO *pCells, int nCells) |
Setting the cells of a comb. | |
RECERR RECAPIKRN | kRecGetCombCells (HPAGE hPage, IMAGEINDEX iiImg, int xZone, COMB_CELL_INFO **ppCells, int *pnCells) |
Getting the cells of a comb. |
Form recognition module. Supported on: Windows, Linux, Embedded Linux, Mac OS X.
The form recognition module supports two form processing workflows:
The current empty form recognition core is mainly based on the Logical Form Recognition™ (LFR) technology which was the backbone of OmniForm, and is now an integrated part of the OmniPage Capture SDK. LFR recognizes textual and non-textual elements in empty forms - like check boxes, circle texts, comb fields, tables/cells, graphics, lines and boxes. These detected form field zones cannot be modified programmatically, but the page can be viewed and modified in the Text Editor Visual control (TEC). (TEC cannot be accessed from the RecAPI layer of CSDK, it is a part of the Visual Toolbox. For more information, see the separated help system of the Visual Toolbox.)
The aim is to turn a form image into a fillable electronic form that can be distributed to respondents or posted on a website. The data in the returned forms can then be processed by any suitable means, outside the scope of the CSDK. It is expected that the filled form data will be returned electronically, so there is no need here for anchor zones.
Typical processing workflow:
The main steps of filled form recognition are:
The form template is a set of form-field zones (fill zones) and anchor definitions (anchor zones). Form-field zones are normal input zones with some additional layout information attached; they identify the areas where we require fill-in data on a specific form-page (e.g. fill-texts, combs, checkboxes). Anchor definitions are specified as ignore zones during template definition, and receive some additional information when the template is saved, to assist the matching of the template to incoming forms.
The form template library is a ZIP file that may contain one or more form templates in hierarchical directory structure.
The template library contains template files (*.zon), and may contain a setting file in the root directory (Settings.sts), the other files in the ZIP files are ignored by OPSDK.
The structure of the library can be arbitrary, but there are two proposed structures that are supported by Nuance Template Editor.
<name>.<page-number>.zon
The most convenient way is to use the Nuance Form Template Editor (supported on: Windows) for creating and editing form templates and form template libraries.
You can create and save form templates using the OPSDK API functions as well, but there is no OPSDK API for saving form template library.
Typical workflows to create a form template using OPSDK API functions (step two has four alternatives):
LZ_FORM
, one or some WT_FORM zones are drawn, kRecLocateZones
), then calls the Create Template function to create user zones from the form objects (kRecCreateFormTemplate). This may also detect the anchor shapes and create ignore zones for them.Using form template library:
Using single form template:
Starting with version 20.3, form template can contain table type zones as well. When defining a table with Form Template Editor, only the vertical splitters can be defined. When the form template is applied to the image, the horizontal rows will be determined and the horizontal splitters will be inserted into the table. The created table will be regular in the sense that each horizontal splitter lasts from the left to the right of the table and each vertical splitter lasts from the top to the bottom of the table. You can query the dimensions (the number of cell rows and columns) of the table with kRecGetTableDimensions and kRecGetOCRTableDimensions functions.
When defining the table cell names can be given. When the form template is applied to the image, the initial cells will be split, and each cell inherits the name of the initial cell. You can query the names of the cells with kRecGetCellName kRecGetOCRCellName.
This form processing is based on Logical Form Recognition technology (LFR). CSDK 16 introduced a new method of extracting form data, called FDE (Form Data Extraction). It can be considered a simplified method for collating form data to the CSV format within a workflow. Please consult the RecAPIPlus
module Form Data Extraction Module for a description of FDE and a comparison table on the advantages and limitations of FDE and LFR.
enum ANCHOR_REF_POINT |
Reference point of the anchor.
Each anchor zone has a reference point. The reference point can be the center or a corner of the bounding box. The reference point is more relevant if the text length can vary (with regular expressions).
enum ANCHORCONTENT |
Content of the anchor zone.
Content determines what the actual information sought is.
enum ANCHORFLAG |
enum ANCHORTYPE |
Type of anchor zone.
Type defines what the anchor's function is in form recognition and template creation
enum COMB_SPLITTER_HEIGHT |
comb attributes
It is used by comb handling functions (see also kRecCreateCombInfo)
enum REF_ANCHOR_MODE |
Zone attribute that specifies how the zone is anchored to reference anchors(s).
RECERR RECAPIKRN kRecApplyFormTemplate | ( | int | sid, |
HPAGE | hPage, | ||
HFORMTEMPLATEPAGE | hFormTemplatePage | ||
) |
Applying a form template - based on a preloaded form template.
The kRecApplyFormTemplate function applies a form template onto a filled form image. This is called form registration: the function uses the anchors defined by the preloaded form template to fit the loaded zones onto the current filled form. The image (hPage) can be a printed and scanned (filled) form or a filled PDF. It must contain the same form fields and layout that appears on the form the form template is created from. In order to fit the template zones onto the current image the function generally transforms the II_CURRENT image using the combination of shifting, scaling, deskewing and rotation. It may also need to transform the template zones using the combination of shifting and scaling. In certain cases, when deskew and rotation are not required (e.g. when hPage is loaded from a non-image-only PDF) only the zones are transformed (shifted and scaled) and not the II_CURRENT image. The function automatically rotates the image if the current IMG_ROTATE setting is ROT_AUTO (except if the image is non-image-only PDF), otherwise the image is not rotated. The function also creates a new II_BW image, and removes the horizontal and vertical rule lines from it. The function updates the user zone list. After calling this function the image can be recognized as usual, using the kRecRecognize function.
[in] | sid | Settings Collection ID. |
[in] | hPage | Handle of the page which contains the filled form. |
[in] | hFormTemplatePage | The handle of the form template. |
ZONE_SIZE_WARN | At least one zone was truncated, because it extends beyond the image. |
ZONE_SIZE_ERR | At least one zone was not loaded, because it extends beyond the image. |
IMG_ANCHOR_WARN | Some of the anchors were not found. |
IMG_ANCHOR_NOT_FOUND | No anchor was found or the template does not contain anchor zones. |
RECERR | Other errors. |
RECERR kRecApplyFormTemplate(int sid, IntPtr hPage, IntPtr hTemplate);
RECERR RECAPIKRN kRecApplyFormTemplateEx | ( | int | sid, |
HPAGE | hPage, | ||
FORMTEMPLATEMATCHINGID | MatchingId | ||
) |
Applying form template - based on a previous kRecFindFormTemplate call.
The kRecApplyFormTemplateEx function applies the given form template onto a filled form image.
[in] | sid | Settings Collection ID. |
[in] | hPage | Handle of the page. |
[in] | MatchingId | The ID of the matched form template, returned by kRecFindFormTemplate or kRecGetNextMatchingTemplate. |
RECERR |
Applying a form template - directly based on a form template file.
The kRecApplyFormTemplateFile function applies a form template onto a filled form image. This is called form registration. The function loads the template file (saved by kRecSaveFormTemplate) and uses the anchors to fit the loaded zones onto the current filled form image. See also the comments on kRecApplyFormTemplate. The function updates the user zone list.
[in] | sid | Settings Collection ID. |
[in] | hPage | Handle of the page which contains the filled form. |
[in] | pTemplateFilename | Path to the form template file. |
RECERR |
HFORMTEMPLATEPAGE hFormTemplatePage; HPAGE hPage; int sid = 0; LPSTR pTemplateFilename; ... kRecLoadFormTemplate(sid, &hFormTemplatePage, pTemplateFileName); kRecApplyFormTemplate(sid, hPage, hFormTemplate); ... kRecFreeFormTemplate(hFormTemplatePage);
RECERR kRecApplyFormTemplateFile(int sid, IntPtr hPage, string pTemplateFilename);
Checking the form template.
The kRecCheckFormTemplate checks the form template and creates a list of warnings and errors. It can be used during the template definition step.
[in] | sid | Settings Collection ID. |
[in] | hPage | Handle of the page. |
RECERR RECAPIKRN kRecCreateCombInfo | ( | HPAGE | hPage, |
int | xZone, | ||
INTBOOL | hasTopBorder, | ||
COMB_SPLITTER_HEIGHT | splitterHeight | ||
) |
Creating comb info.
The kRecCreateCombInfo creates comb description for the given user zone.
[in] | hPage | Handle of the page. |
[in] | xZone | Index of the zone in the user zone list. |
[in] | hasTopBorder | Specifies whether the comb has an upper border or not. |
[in] | splitterHeight | Determines the splitter height of the comb. |
RECERR |
Creating form template for processing filled forms.
A form template is a set of user zones, which contains process zones and anchor zones. Process zones in the form template contain a field name and may contain additional information about the field. Anchor zones are stored in the user zone list as ignore zones and are used by kRecApplyFormTemplate to adjust the filled form to the zone template. The usage of this function depends on the hPage origin type:
kRecCreateFormTemplate
, it can process the meta-data of the PDF directly, and creates process and anchor zones;The function creates user zones from either the meta-data of the active PDF, or the form objects previously detected by kRecLocateZones. The function also creates anchor zones, used by kRecApplyFormTemplate to adjust the filled form to the zone template. Anchor zones are stored in the user zone list as ignore zones. Generally four anchor zones are created.
[in] | sid | Settings Collection ID. |
[in] | hPage | Handle of the page. |
RECERR |
WT_FLOW
and WT_IGNORE
user zones for anchors), the function kRecSaveFormTemplate
should be called instead of kRecCreateFormTemplate
. See the notes under kRecSaveFormTemplate. RECERR kRecCreateFormTemplate(int sid, IntPtr hPage);
Deleting comb info.
The kRecDeleteCombInfo deletes comb description of the given user zone. About combs see: kRecCreateCombInfo.
[in] | hPage | Handle of the page. |
[in] | xZone | Index of the zone in the user zone list. |
RECERR |
RECERR RECAPIKRN kRecFindFormTemplate | ( | int | sid, |
HPAGE | hPage, | ||
HFORMTEMPLATEPAGE * | phFormTmplArray, | ||
int | Length, | ||
LPCTSTR | FormPath, | ||
int | FirstPage, | ||
int | LastPage, | ||
HFORMTEMPLATECOLLECTION * | phFormTmplCollection, | ||
FORMTEMPLATEMATCHINGID * | pBestMatchingId, | ||
int * | pConfidence, | ||
int * | pnMatching | ||
) |
Finding the matching template(s).
The kRecFindFormTemplate finds the matching templates in relevance from the given template set, if any.
[in] | sid | Settings Collection ID. |
[in] | hPage | Handle of the page. |
[in] | phFormTmplArray | Array of form template handles. |
[in] | Length | Length of the array. |
[in] | FormPath | Optional filter for multi-page templates: only the templates below the FormPath folder are enabled. Set it to NULL if you do not want to specify it. |
[in] | FirstPage | Optional filter for multi-page templates: only the templates between FirstPage and Lastpage are enabled. Set it to -1 if you do not want to specify it. |
[in] | LastPage | Optional filter for multi-page templates: only the templates between FirstPage and Lastpage are enabled. Set it to -1 if you do not want to specify it. |
[out] | phFormTmplCollection | Address of a variable to store the template collection handle. Note that template collection handle may be returned even if an error code is returned. |
[out] | pBestMatchingId | Address of a variable to store the ID of the best matching template. |
[out] | pConfidence | Address of a variable to store the confidence of the matching. The confidence is between 0 and 100. Greater value means higher confidence. |
[out] | pnMatching | Address of a variable to store the number of successful matchings. |
RECERR |
phFormTmplCollection
output parameter contains a NULL value, a fatal error occurred. If the function returns an error but phFormTmplCollection
is not NULL then further information can be asked by calling kRecGetFindFormTemplateInfo. The function also returns the the number of the successful matchings. RECERR RECAPIKRN kRecFreeFormTemplate | ( | HFORMTEMPLATEPAGE | hFormTemplatePage | ) |
Removing a form template page.
The kRecFreeFormTemplate function removes a form template page from the form handling module.
[in] | hFormTemplatePage | Handle of the form template page to be removed. |
RECERR |
RECERR kRecFreeFormTemplate(IntPtr hTemplate);
RECERR RECAPIKRN kRecFreeFormTemplateArray | ( | HFORMTEMPLATEPAGE * | phFormTmplArray, |
int | Length, | ||
INTBOOL | bFreeArray | ||
) |
Freeing the array of form template handles.
The kRecFreeFormTemplateArray frees the array of form template handles returned by kRecLoadFormTemplateLibrary
[in] | phFormTmplArray | Array of handles. |
[in] | Length | Length of the array. |
[in] | bFreeArray | The function frees the memory object the phFormTmplArray array points to, if this parameter is TRUE, otherwise it is not freed. |
RECERR |
RECERR RECAPIKRN kRecFreeFormTemplateCollection | ( | HFORMTEMPLATECOLLECTION | hFormTmplCollection | ) |
Freeing a Form Template Collection.
The kRecFreeFormTemplateCollection frees the given Form Template Collection.
[in] | hFormTmplCollection | Handle of the Form Template Collection returned by a previous kRecFindFormTemplate. |
RECERR |
RECERR RECAPIKRN kRecGetAnchorDrift | ( | HPAGE | hPage, |
IMAGEINDEX | iiImg, | ||
int | nZone, | ||
SIZE * | pDrift | ||
) |
Getting the drift area of text and barcode anchors.
The kRecGetAnchorDrift returns the drift area of text and barcode anchors.
[in] | hPage | Handle of the page. |
[in] | iiImg | Index of the image, where drift is specified. |
[in] | nZone | Zone index. |
[out] | pDrift | Address of a variable to return the drift. |
RECERR |
RECERR RECAPIKRN kRecGetAnchorFlag | ( | HPAGE | hPage, |
int | nZone, | ||
ANCHORFLAG | flag, | ||
INTBOOL * | value | ||
) |
Getting anchor zone flag.
The kRecGetAnchorFlag returns the current value of the specified anchor zone flag.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[in] | flag | Flag to ask (ANCHORFLAG). |
[out] | value | Address of a variable to store the current value of the flag. |
RECERR |
RECERR RECAPIKRN kRecGetAnchorInfo | ( | HPAGE | hPage, |
int | nZone, | ||
ANCHORCONTENT * | aContent, | ||
ANCHORTYPE * | aType | ||
) |
Returning anchor content and type.
The kRecGetAnchorInfo returns the anchor content and anchor type property of the zone.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[out] | aContent | Address of a variable to store the content of the anchor zone (ANCHORCONTENT). If the zone is not an anchor zone, AC_SIZE is returned. |
[out] | aType | Address of a variable to store the type of the anchor zone (ANCHORTYPE). If the zone is not an anchor zone, AT_SIZE is returned. |
RECERR |
RECERR RECAPIKRN kRecGetAnchorRefPoint | ( | HPAGE | hPage, |
int | nZone, | ||
ANCHOR_REF_POINT * | pref | ||
) |
Getting the reference point of the anchor zone.
The kRecGetAnchorRefPoint returns the reference point of the anchor zone.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[out] | pref | Address of a variable to return the reference point. |
RECERR |
Getting regular expression of text and barcode anchors.
The kRecGetAnchorRegExp returns the regular expression of text and barcode anchors. It can be used during the template definition step.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[out] | ppRegExp | Address of a pointer to a string which is allocated and filled by the API-call and contains the ppRegExp. |
RECERR |
Getting the text attribute of text and barcode anchors.
The kRecGetAnchorText returns the text attribute of text and barcode anchors.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[out] | ppText | Address of a pointer to a string which is allocated and filled by the API-call and contains the text. |
RECERR |
Returning the number of cells in a comb.
The kRecGetCombCellCount returns the number of cells in the comb. About combs see: kRecCreateCombInfo.
[in] | hPage | Handle of the page. |
[in] | xZone | Index of the zone in the user zone list. |
[out] | pnCells | Address of a variable to store number of cells. |
RECERR |
RECERR RECAPIKRN kRecGetCombCells | ( | HPAGE | hPage, |
IMAGEINDEX | iiImg, | ||
int | xZone, | ||
COMB_CELL_INFO ** | ppCells, | ||
int * | pnCells | ||
) |
Getting the cells of a comb.
The kRecGetCombCells returns the cells of a comb. About combs see: kRecCreateCombInfo.
[in] | hPage | Handle of the page. |
[in] | iiImg | Index of the image, in which the coordinates of the cells are given. |
[in] | xZone | Index of the zone in the user zone list. |
[out] | ppCells | Address of a variable to return array of COMB_CELL_INFO structures containing the left and right coordinates of the cells. |
[out] | pnCells | Address of a variable to return the length of pCells array. |
RECERR |
RECERR RECAPIKRN kRecGetCombInfo | ( | HPAGE | hPage, |
int | xZone, | ||
INTBOOL * | hasTopBorder, | ||
COMB_SPLITTER_HEIGHT * | splitterHeight | ||
) |
Getting comb attributes.
The kRecGetCombInfo returns the attributes of a comb. About combs see: kRecCreateCombInfo.
[in] | hPage | Handle of the page. |
[in] | hPage | Handle of the page. |
[in] | xZone | Index of the zone in the user zone list. |
[out] | hasTopBorder | Address of a variable to return whether the comb has top border line. |
[out] | splitterHeight | Address of a variable to return the height of the splitters. |
RECERR |
Getting the index of the dropout color zone.
The kRecGetDropOutColorZoneIndex returns the index of the dropout color zone.
[in] | hPage | Handle of the page. |
[out] | pnZone | Variable to store the index of the dropout color zone. If the HPAGE does not contain a dropout color zone, the function returns -1. |
RECERR |
RECERR RECAPIKRN kRecGetFindFormTemplateInfo | ( | HFORMTEMPLATECOLLECTION | hFormTmplCollection, |
LPTSTR * | pInfo | ||
) |
Getting info about the previous kRecFindFormTemplate call.
The kRecGetFindFormTemplateInfo returns information about the previous kRecFindFormTemplate.
[in] | hFormTmplCollection | Handle of the Form Template Collection returned by a previous kRecFindFormTemplate. |
[out] | pInfo | Address of a pointer to a string which is allocated and filled by the API-call and contains the information in XML format. |
RECERR |
pInfo
. RECERR RECAPIKRN kRecGetFormTemplateInfo | ( | HFORMTEMPLATEPAGE | hFormTmpl, |
LPTSTR * | pFullName, | ||
LPTSTR * | pFormPath, | ||
int * | pFormPage | ||
) |
Getting information about a form template.
The kRecGetFormTemplateInfo returns the name and the page number of a form template.
[in] | hFormTmpl | Handle of form template. |
[out] | pFullName | Address of a pointer to a string which is allocated and filled by the API-call and contains the full name (name including container folder and page-number as well) of the form template. (The string is terminated with a null character.) |
[out] | pFormPath | Address of a pointer to a string which is allocated and filled by the API-call and contains the name of the form template. (The string is terminated with a null character.) |
[out] | pFormPage | Address of a pointer for returning the page-number of a template of a multi-page form. |
RECERR |
Getting the name of the form template.
The kRecGetFormTemplateName returns the name of the form template.
[in] | hPage | Handle of the page. |
[out] | pTemplateName | Address of a pointer to a string which will be allocated and filled by the API-call and will contain the name of the template. (The string will be terminated with a wide-character zero.) |
RECERR |
RECERR RECAPIKRN kRecGetMatchingInfo | ( | FORMTEMPLATEMATCHINGID | MatchId, |
LPTSTR * | pFullName, | ||
LPTSTR * | pName, | ||
int * | pPageNumber, | ||
int * | pPageCount | ||
) |
Getting information about a matching.
The kRecGetMatchingInfo returns information about a matching.
[in] | MatchId | ID of the matching returned by kRecFindFormTemplate or kRecGetNextMatchingTemplate. |
[out] | pFullName | Address of a pointer to a string which is allocated and filled by the API-call and contains the full name (name including container folder and page-number as well) of the form template. (The string is terminated with a null character.) Can be NULL. |
[out] | pName | Address of a pointer to a string which is allocated and filled by the API-call and contains the name of the form template. (The string is terminated with a null character.) Can be NULL. |
[out] | pPageNumber | Address of a variable to hold the page-number of the multi-page template. Can be NULL. |
[out] | pPageCount | Address of a variable to hold the total number of pages of the multi-page template. Can be NULL. |
RECERR |
RECERR RECAPIKRN kRecGetNextMatchingTemplate | ( | FORMTEMPLATEMATCHINGID | PrevMatchingId, |
FORMTEMPLATEMATCHINGID * | pNextMatchingId, | ||
int * | pConfidence | ||
) |
Querying the matching form templates.
The kRecGetNextMatchingTemplate returns the ID of the next matching form template.
[in] | PrevMatchingId | Previous matching ID returned by kRecFindFormTemplate or kRecGetNextMatchingTemplate.. |
[out] | pNextMatchingId | Address of a variable to hold the ID of the next matching template. |
[out] | pConfidence | Address of a variable to store the matching confidence. The confidence is between 0 and 100. Greater value means higher confidence. |
RECERR |
RECERR RECAPIKRN kRecGetNextOCRZoneAttribute | ( | HPAGE | hPage, |
int | nZone, | ||
LPCTSTR | prevkey, | ||
LPTSTR * | key, | ||
LPTSTR * | value | ||
) |
Querying the names and the values of the user defined attributes of an OCR zone.
The kRecGetNextOCRZoneAttribute returns the name and the value of the next user defined attribute of a zone.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[in] | prevkey | Pointer to a string containing the name of the previous attribute. (The string is terminated with a null character.) |
[out] | key | Address of a pointer to a string which is allocated and filled by the API-call and contains the name of the next attribute. (The string is terminated with a null character.) |
[out] | value | Address of a pointer to a string which is allocated and filled by the API-call and contains the value of the next attribute. (The string will be terminated with a wide-character zero.) |
RECERR |
RECERR RECAPIKRN kRecGetNextTemplateAttribute | ( | HPAGE | hPage, |
LPCTSTR | prevkey, | ||
LPTSTR * | key, | ||
LPTSTR * | value | ||
) |
Querying the names and the values of the user defined attributes of a form template.
The kRecGetNextTemplateAttribute returns the name and the value of the next user defined attribute of a form template.
[in] | hPage | Handle of the page. |
[in] | prevkey | Pointer to a string containing the name of the previous attribute. (The string is terminated with a null character.) |
[out] | key | Address of a pointer to a string which is allocated and filled by the API-call and contains the name of the next attribute. (The string is terminated with a null character.) |
[out] | value | Address of a pointer to a string which is allocated and filled by the API-call and contains the value of the next attribute. (The string is terminated with a null character.) |
RECERR |
RECERR RECAPIKRN kRecGetNextZoneAttribute | ( | HPAGE | hPage, |
int | nZone, | ||
LPCTSTR | prevkey, | ||
LPTSTR * | key, | ||
LPTSTR * | value | ||
) |
Querying the names and the values of the user defined attributes of a user zone.
The kRecGetNextZoneAttribute returns the name and the value of the next user defined attribute of a zone.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[in] | prevkey | Pointer to a string containing the name of the previous attribute. (The string is terminated with a null character.) |
[out] | key | Address of a pointer to a string which is allocated and filled by the API-call and contains the name of the next attribute. (The string is terminated with a null character.) |
[out] | value | Address of a pointer to a string which is allocated and filled by the API-call and contains the value of the next attribute. (The string is terminated with a null character.) |
RECERR |
RECERR RECAPIKRN kRecGetNextZoneByName | ( | HPAGE | hPage, |
LPCTSTR | pZoneName, | ||
int | nPrevZone, | ||
int * | nZone | ||
) |
Querying the next zone with the given name.
The kRecGetNextZoneByName returns the index of the next zone having the given name.
[in] | hPage | Handle of the page. |
[in] | pZoneName | Pointer to a string containing the name. (The string is terminated with a null character.) |
[in] | nPrevZone | Specifies the start of the query. The function returns the index of the first zone with an index greater than nPrevZone. If nPrevZone < 0 the function returns the index of the first zone that has the given name. |
[out] | nZone | Address of a variable to hold the index of the first zone with an index greater than nPrevZone and having the given name. |
RECERR |
RECERR RECAPIKRN kRecGetOCRTableCellText | ( | int | sid, |
HPAGE | hPage, | ||
int | nZone, | ||
int | nCellInd, | ||
LPTSTR * | pBuffer, | ||
int * | len | ||
) |
Getting the recognized text in the given cell of the given OCR zone.
The RecGetOCRTableCellText returns the text recognized in the given cell of the given OCR zone.
[in] | sid | Settings Collection ID. |
[in] | hPage | Handle of the page. |
[in] | nZone | OCR zone index. The function returns error if the given zone is not a table (WT_TABLE) zone; |
[in] | nCellInd | Cell index. |
[out] | pBuffer | Address of a pointer to a string which is allocated and filled by the API-call and contains the recognized text. (The string is terminated with a null character.) |
[out] | len | Address of a variable to hold the length of text. |
RECERR |
Getting user defined attribute of an OCR zone.
The kRecGetZoneAttribute returns the value of a user defined attribute of the given OCR zone.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[in] | key | Pointer to a string containing the name of the attribute. (The string is terminated with a null character.) |
[out] | pValue | Address of a pointer to a string which is allocated and filled by the API-call and contains the value of the attribute. (The string is terminated with a null character.) |
RECERR |
RECERR RECAPIKRN kRecGetOCRZoneBarTypes | ( | int | sid, |
HPAGE | hPage, | ||
int | nZone, | ||
LPBAR_ENA | pBarEna, | ||
INTBOOL * | pBarBinary, | ||
INTBOOL * | pZoneLevel | ||
) |
Getting the enabled barcode types for an OCR zone.
The kRecGetOCRZoneBarTypes function inquires the barcode types enabled for recognition for the given zone.
[in] | sid | Settings Collection ID. |
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[out] | pBarEna | Address of a buffer sized BAR_SIZE that receives the barcode type enable/disable array. |
[out] | pBarBinary | Address of a variable to return whether the zone is recognized in binary mode. |
[out] | pZoneLevel | Address of a variable to indicate whether the zone-level or the global settings are returned. |
RECERR |
Querying the name of an OCR-zone.
The kRecGetOCRZoneFormFieldName queries the name of an OCR-zone.
[in] | hPage | Handle of the page. |
[in] | nZone | Index of the OCR-zone to be queried. |
[out] | ppFormFieldName | Address of a pointer to a string which will be allocated and filled by the API-call and will contain the form-field name characters. (The string will be terminated with a wide-character zero.) |
RECERR |
RECERR kRecGetOCRZoneFormFieldName(IntPtr hPage, int nZone, out string ppFormFieldName);
Querying the name of an OCR-zone.
The kRecGetOCRZoneName queries the name of the OCR-zone.
[in] | hPage | Handle of the page. |
[in] | nZone | Index of the OCR-zone to be queried. |
[out] | ppZoneName | Address of a pointer to a string which will be allocated and filled by the API-call and will contain the name characters. (The string is terminated with a wide-character zero.) |
RECERR |
RECERR kRecGetOCRZoneName(IntPtr hPage, int nZone, out string ppZoneName);
RECERR RECAPIKRN kRecGetOCRZoneText | ( | int | sid, |
HPAGE | hPage, | ||
int | nZone, | ||
LPTSTR * | pBuffer, | ||
int * | len | ||
) |
Getting the recognized text in the given OCR zone.
The kRecGetOCRZoneText returns the text recognized in the given OCR zone.
[in] | sid | Settings Collection ID. |
[in] | hPage | Handle of the page. |
[in] | nZone | OCR zone index. |
[out] | pBuffer | Address of a pointer to a string which is allocated and filled by the API-call and contains the recognized text. (The string is terminated with a null character.) |
[out] | len | Address of a variable to hold the length of text. |
RECERR |
Getting user defined attribute of a form template.
The kRecGetTemplateAttribute returns the value of a user defined attribute of the template. It can be used during the template definition step.
[in] | hPage | Handle of the page. |
[in] | key | Pointer to a string containing the name of the attribute. (The string is terminated with a null character.) |
[out] | pValue | Address of a pointer to a string which is allocated and filled by the API-call and contains the value of the attribute. (The string is terminated with a null character.) kRecSetZoneAttribute. Address of a pointer to a string which is allocated and filled by the API-call and contains the name characters. (The string is terminated with a null character.) |
RECERR |
Getting user defined attribute of a user zone.
The kRecGetZoneAttribute returns the value of a user defined attribute of the given user zone.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[in] | key | Pointer to a string containing the name of the attribute. (The string is terminated with a null character.) |
[out] | pValue | Address of a pointer to a string which is allocated and filled by the API-call and will contain the value of the attribute. (The string is terminated with a null character.) kRecSetZoneAttribute. Address of a pointer to a string which is allocated and filled by the API-call and will contain the name characters. (The string is terminated with a null character.) |
RECERR |
RECERR RECAPIKRN kRecGetZoneBarTypes | ( | int | sid, |
HPAGE | hPage, | ||
int | nZone, | ||
LPBAR_ENA | pBarEna, | ||
INTBOOL * | pBarBinary, | ||
INTBOOL * | pZoneLevel | ||
) |
Getting the enabled barcode types for a zone.
The kRecGetZoneBarTypes function inquires the barcode types enabled for recognition for the given zone.
[in] | sid | Settings Collection ID. |
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[out] | pBarEna | Address of a buffer sized BAR_SIZE that receives the barcode type enable/disable array. |
[out] | pBarBinary | Address of a variable to return whether the zone is recognized in binary mode. |
[out] | pZoneLevel | Address of a variable to indicate whether the zone-level or the global settings are returned. |
RECERR |
Querying the name of a user-zone.
The kRecGetZoneFormFieldName queries the name of a user-zone.
[in] | hPage | Handle of the page. |
[in] | nZone | Index of the user-zone to be queried. |
[out] | ppFormFieldName | Address of a pointer to a UNICODE string which will be allocated and filled by the API-call and will contain the form-field name characters. (The string will be terminated with a wide-character zero.) |
RECERR |
RECERR kRecGetZoneFormFieldName(IntPtr hPage, int nZone, out string ppFormFieldName);
Querying the name of a user-zone.
The kRecGetZoneName queries the name of a user-zone.
[in] | hPage | Handle of the page. |
[in] | nZone | Index of the user-zone to be queried. |
[out] | ppZoneName | Address of a pointer to a string which will be allocated and filled by the API-call and will contain the name characters. (The string will be terminated with a wide-character zero.) |
RECERR |
RECERR kRecGetZoneName(IntPtr hPage, int nZone, out string ppZoneName);
RECERR RECAPIKRN kRecGetZoneRefAnchors | ( | HPAGE | hPage, |
int | nZone, | ||
REF_ANCHOR_MODE * | pmode, | ||
int * | refAnchors | ||
) |
Getting the reference anchor(s) of the zone.
The kRecGetZoneRefAnchors returns the reference anchor(s) of the zone. It can be used during the template definition step.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[out] | pmode | Address of a variable to hold the number of the reference anchors. |
[out] | refAnchors | Address of a four-element array to hold the indexes of the reference anchors. The index(es) of the reference anchors are returned here. |
RECERR |
RECERR RECAPIKRN kRecInsertAnchorZone | ( | int | sid, |
HPAGE | hPage, | ||
ANCHORCONTENT | aContent, | ||
ANCHORTYPE | aType, | ||
int | nZone | ||
) |
Inserting anchor zone.
The kRecInsertAnchorZone inserts a new anchor zone in the user zone list of the page. It can be used during the template definition step.
[in] | sid | Settings Collection ID. |
[in] | hPage | Handle of the page. |
[in] | aContent | Content of the anchor. |
[in] | aType | Type of the anchor. |
[in] | nZone | Index in the user zone list where the new zone should be inserted. Use zero (0) to insert the zone as the first element of the zone list. To insert a zone as the last element of the zone list, use -1. |
RECERR |
RECERR RECAPIKRN kRecInsertDropOutColorZone | ( | HPAGE | hPage, |
IMAGEINDEX | iiImg, | ||
LPCRECT | pRect, | ||
int | nZone | ||
) |
Inserting dropout color zone.
The kRecInsertDropOutColorZone inserts a dropout color zone. It can be used during the template definition step.
[in] | hPage | Handle of the page. |
[in] | iiImg | Index of the image in the page whose coordinate system you used in defining the boundary box for the new zone. It is recommended to use II_CURRENT coordinates, if possible. |
[in] | pRect | Pointer to the rectangle containing the bounding box of the zone. |
[in] | nZone | Index in the user zone list where the new zone should be inserted. Use zero (0) to insert the zone as the first element of the zone list. To insert a zone as the last element of the zone list, use -1. |
RECERR |
Returning whether the zone has comb info.
The kRecIsComb returns whether the user zone has comb info. About combs see: kRecCreateCombInfo.
[in] | hPage | Handle of the page. |
[in] | xZone | Index of the zone in the user zone list. |
[out] | isComb | Address of a variable to return whether the zone has comb info. |
RECERR |
RECERR RECAPIKRN kRecLoadFormTemplate | ( | int | sid, |
HFORMTEMPLATEPAGE * | phFormTemplatePage, | ||
LPCTSTR | pTemplateFilename | ||
) |
Loading a form template from a form template file.
The kRecLoadFormTemplate function loads a form template from a form template file into the form handling module and returns its handle. After loading the form template it can be applied on several pages without loading it from file again (see: kRecApplyFormTemplate).
[in] | sid | Settings Collection ID. |
[in] | phFormTemplatePage | Address of a variable to store the handle of the created form template page. |
[in] | pTemplateFilename | Path to the form template file. |
RECERR |
RECERR kRecLoadFormTemplate(int sid, out IntPtr hTemplate, string pTemplateFilename);
RECERR RECAPIKRN kRecLoadFormTemplateLibrary | ( | int | sid, |
LPCTSTR | pTmplLib, | ||
INTBOOL | bLoadSTS, | ||
HFORMTEMPLATEPAGE ** | pphFormTmplArray, | ||
int * | pLength | ||
) |
Loading form template library.
The kRecLoadFormTemplateLibrary function loads a form template library from a form template library file and returns the array of form template handles. The returned array can be used to find the matching templates on several pages without loading it from file again (see: kRecFindFormTemplate).
[in] | sid | Settings Collection ID. |
[in] | pTmplLib | Path to the form template library file. |
[in] | bLoadSTS | If this parameter is TRUE, the function loads the settings from the form template library. |
[out] | pphFormTmplArray | Address of a variable to store the handles of the created form templates. |
[out] | pLength | Address of a variable to store the number of handles in the returned array. |
RECERR |
Analyzing image and detecting comb cells.
The kRecLocateComb detects the comb cells within a user zone. It can be used during the template definition step. About combs see: kRecCreateCombInfo.
[in] | sid | Settings Collection ID. |
[in] | hPage | Handle of the page. |
[in] | xZone | Index of the zone in the user zone list. |
RECERR |
Saving user zones in a form template file.
A form template file is a special zone file which contains additional information. It contains anchor information (anchor zones) and the process zones also contain additional zone information. The template file is used either by kRecLoadFormTemplate or kRecApplyFormTemplateFile.
[in] | sid | Settings Collection ID. |
[in] | hPage | Handle of the page. |
[in] | pTemplateFilename | Path to the form template file. |
RECERR |
RECERR kRecSaveFormTemplate(int sid, IntPtr hPage, string pTemplateFilename);
RECERR RECAPIKRN kRecSetAnchorContent | ( | HPAGE | hPage, |
int | nZone, | ||
ANCHORCONTENT | aContent | ||
) |
Setting anchor content.
The kRecSetAnchorContent sets the content of the anchor zone. It can be used during the template definition step.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[in] | aContent | Content of the anchor (ANCHORCONTENT). |
RECERR |
RECERR RECAPIKRN kRecSetAnchorDrift | ( | HPAGE | hPage, |
IMAGEINDEX | iiImg, | ||
int | nZone, | ||
SIZE | drift | ||
) |
Setting the drift area of text and barcode anchors.
The kRecSetAnchorDrift sets the drift area of text and barcode anchors. It can be used during the template definition step.
[in] | hPage | Handle of the page. |
[in] | iiImg | Index of the image, where drift is specified. |
[in] | nZone | Zone index. |
[in] | drift | Drift attribute. |
RECERR |
RECERR RECAPIKRN kRecSetAnchorFlag | ( | HPAGE | hPage, |
int | nZone, | ||
ANCHORFLAG | flag, | ||
INTBOOL | value | ||
) |
Changing anchor zone flags.
The kRecSetAnchorFlag sets or resets the given anchor zone flag. It can be used during the template definition step.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[in] | flag | Flag to set or reset (ANCHORFLAG). |
[in] | value | The specified flag is set if its value is TRUE, otherwise it is reset. Read only flags cannot be changed. |
RECERR |
RECERR RECAPIKRN kRecSetAnchorRefPoint | ( | HPAGE | hPage, |
int | nZone, | ||
ANCHOR_REF_POINT | ref | ||
) |
Setting the reference point of the anchor zone.
The kRecSetAnchorRefPoint sets the reference point of the anchor zone. It can be used during the template definition step.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[in] | ref | Reference point setting. |
RECERR |
Setting regular expression of text and barcode anchors.
The kRecSetAnchorRegExp sets the regular expression of text and barcode anchors. It can be used during the template definition step.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[in] | pRegExp | The regular expression to set. |
RECERR |
Setting the text attribute of text and barcode anchors.
The kRecSetAnchorText sets the text attribute of text and barcode anchors. It can be used during the template definition step.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[in] | pText | Text attribute of the anchor zone. |
RECERR |
RECERR RECAPIKRN kRecSetAnchorType | ( | HPAGE | hPage, |
int | nZone, | ||
ANCHORTYPE | aType | ||
) |
Setting anchor type.
The kRecSetAnchorType sets the type of the anchor zone. It can be used during the template definition step.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[in] | aType | Type of the anchor (ANCHORTYPE). |
RECERR |
RECERR RECAPIKRN kRecSetCombCells | ( | HPAGE | hPage, |
IMAGEINDEX | iiImg, | ||
int | xZone, | ||
const COMB_CELL_INFO * | pCells, | ||
int | nCells | ||
) |
Setting the cells of a comb.
The kRecSetCombCells sets the cells of a comb. About combs see: kRecCreateCombInfo.
[in] | hPage | Handle of the page. |
[in] | iiImg | Index of the image, in which the coordinates of the cells are given. |
[in] | xZone | Index of the zone in the user zone list. |
[in] | pCells | Array of COMB_CELL_INFO structures containing the left and right coordinates of the cells. |
[in] | nCells | Length of pCells array. |
RECERR |
RECERR RECAPIKRN kRecSetCombInfo | ( | HPAGE | hPage, |
int | xZone, | ||
INTBOOL | hasTopBorder, | ||
COMB_SPLITTER_HEIGHT | splitterHeight | ||
) |
Setting comb attributes.
The kRecSetCombInfo sets the attributes of a comb. About combs see: kRecCreateCombInfo.
[in] | hPage | Handle of the page. |
[in] | xZone | Index of the zone in the user zone list. |
[in] | hasTopBorder | Specifies whether the comb has top border line. |
[in] | splitterHeight | Specifies the height of the splitter lines. |
RECERR |
Setting the name of the form template.
The kRecSetFormTemplateName sets the name of the form template. It can be used during the template definition step.
[in] | hPage | Handle of the page. |
[in] | pTemplateName | Name of the template. |
RECERR |
Changing the name of a form-field attached to an OCR-zone.
The kRecSetOCRZoneFormFieldName changes the name of an OCR-zone.
[in] | hPage | Handle of the page. |
[in] | nZone | Index of the OCR-zone to be updated. |
[in] | pFormFieldName | Pointer to a UNICODE string containing the name characters to be set. (The string is terminated with a wide-character zero.) |
RECERR |
RECERR kRecSetOCRZoneFormFieldName(IntPtr hPage, int nZone, string pFormFieldName);
Changing the name of an OCR-zone.
The kRecSetOCRZoneName changes the name of an OCR-zone.
[in] | hPage | Handle of the page. |
[in] | nZone | Index of the OCR-zone to be updated. |
[in] | pZoneName | Pointer to a string containing the name characters to be set. (The string is terminated with a null character.) |
RECERR |
RECERR kRecSetOCRZoneName(IntPtr hPage, int nZone, string pZoneName);
Setting user defined attribute of a form template.
The kRecSetTemplateAttribute inserts, changes or deletes a user defined attribute of a form template. It can be used during the template definition step.
[in] | hPage | Handle of the page. |
[in] | key | Pointer to a string containing the name of the attribute. (The string is terminated with a null character.) If the template does not have an attribute by that name, a new attribute is inserted. If the template already has an attribute with the same name and the value parameter is null or an empty string, the attribute is deleted; otherwise the value of the attribute is changed. |
[in] | value | Pointer to a string containing the value of the attribute. (The string is terminated with a null character.) If value is NULL pointer or the given string is empty, the attribute is deleted. |
RECERR |
Setting user defined attribute of a user zone.
The kRecSetZoneAttribute inserts, changes or deletes a user defined attribute of the given user zone.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[in] | key | Pointer to a string containing the name of the attribute. (The string is terminated with a null character.) If the zone does not have an attribute by that name, a new attribute is inserted. If the zone already has attribute with the same name and the value parameter is null or an empty string, the attribute is deleted; otherwise, the value of the attribute is changed. |
[in] | value | Pointer to a string containing the value of the attribute. (The string is terminated with a null character.) If value is NULL pointer or the given string is empty, the attribute is deleted. |
RECERR |
RECERR RECAPIKRN kRecSetZoneBarTypes | ( | HPAGE | hPage, |
int | nZone, | ||
LPCBAR_ENA | pBarEna, | ||
INTBOOL | BarBinary | ||
) |
Enabling barcode types for a zone.
The kRecSetZoneBarTypes function is used to specify the enabled barcode type(s) for the given zone.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[in] | pBarEna | Pointer of a BAR_ENA type array having BAR_SIZE elements. Each element of this array variable corresponds to a BAR_TYPE barcode type, and their values represent the enabled/disabled status of the appropriate barcode type. It can be NULL pointer. |
[in] | BarBinary | TRUE value forces the barcode modules to create binary output without any character conversion. See also Binary output. |
RECERR |
pBarEna
is NULL or all elements of the pBarEna
array are BAR_DISABLED, the global setting will be used for this zone during recognition. This is the default setting of the zones, therefore in default mode the global setting is used for all zones. This function changes the zone-level enabled barcode types. Changing the name of a form-field attached to a user-zone.
The kRecSetZoneFormFieldName changes the name of a user-zone.
[in] | hPage | Handle of the page. |
[in] | nZone | Index of the user-zone to be updated. |
[in] | pFormFieldName | Pointer to a UNICODE string containing the name characters to be set. (The string is terminated with a wide-character zero.) |
RECERR |
RECERR kRecSetZoneFormFieldName(IntPtr hPage, int nZone, string pFormFieldName);
Changing the name of a user-zone.
The kRecSetZoneName changes the name of a user-zone.
[in] | hPage | Handle of the page. |
[in] | nZone | Index of the user-zone to be updated. |
[in] | pZoneName | Pointer to a string containing the name characters to be set. (The string is terminated with a null character.) |
RECERR |
RECERR kRecSetZoneName(IntPtr hPage, int nZone, string pZoneName);
Changing the order of the user zones.
The kRecSetZoneOrder changes the order of the user zones in a HPAGE.
[in] | hPage | Handle of the page. |
[in] | order | An array containing key values. The array must contain as many elements as the number of zones included in the user zone list. |
RECERR |
RECERR RECAPIKRN kRecSetZoneRefAnchors | ( | HPAGE | hPage, |
int | nZone, | ||
REF_ANCHOR_MODE | mode, | ||
const int * | refAnchors | ||
) |
Setting the reference anchor(s) of the zone.
The kRecSetZoneRefAnchors sets the reference anchor(s) of the zone. It can be used during the template definition step.
[in] | hPage | Handle of the page. |
[in] | nZone | Zone index. |
[in] | mode | Specifies the number of reference anchors. |
[in] | refAnchors | The index(es) of the reference anchors. 0, 1, 2 or 4 indexes depending on the mode parameter. |
RECERR |
RECERR RECAPIKRN kRecUpdateAnchorZone | ( | int | sid, |
HPAGE | hPage, | ||
IMAGEINDEX | iiImg, | ||
LPCRECT | pRect, | ||
int | nZone | ||
) |
Updating anchor zone info.
The kRecUpdateAnchorZone updates the bounding box and the value (text value or bitmap) of the anchor zone. It can be used during the template definition step.
[in] | sid | Settings Collection ID. |
[in] | hPage | Handle of the page. |
[in] | iiImg | The index of the image whose coordinate system you used in defining the bounding rectangle of the zone. |
[in] | pRect | Coordinates of the anchor zone. |
[in] | nZone | Index of the zone to be updated in the user zone list. |
RECERR |