DataField class

A recognized data field. Provides field's contents, position on image, and included data fields, if applicable.

Note that a field may have several components — for example, it can contain two or more words. Component details are available in the components array, that can be received with the getComponents method. Each element of this array is a DataField object with its own text (for example, a word), received with the getText method, the bounding quadrangle of this component (call the getQuadrangle method) and the rectangle bounding the quadrangle of this component (getRect method). The field's text contains its entire text, and the field's quadrangle property represents the whole area of the field: this quadrangle encloses the quadrangles of all components.

The components array always contains at least one element or is null. When a field contains only one component, the returned by methods text and quadrangle properties of the field and this component are identical.

class DataField

Constructor

Name Description
DataField Initializes a new instance of the DataField class.

Properties

Name Description
getId Returns the internal field identifier. Can be one of the predefined fields or the custom field identifier that you specified in the Field class constructor. May be returned null.
getName Returns the human-readable name of the field. If you are using a custom data capture profile, this is the name you set with setName method of the Field class. May be returned null.
getText Returns the text of the field. May be null.
getCharInfo Returns extended characters' information as an array of CharInfo objects. May be returned null.
getRect Returns rectangle, containing the field. Rectangle is defined by width, height and upper-left corner. May be returned null.
getQuadrangle Returns an array of the four vertex points of the bounding quadrangle. The vertices are indexed clockwise starting from the bottom left. May be returned null.
getComponents Returns an array of data fields, representing one complex field found in the image, with all additional information.

02.03.2022 12:59:15

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.