Block Object (IBlock Interface)

This object represents a single block in the document. Blocks are objects that enclose areas on images. Blocks in the document appear after Document Definition has been successfully matched. The blocks reproduce the structure defined in the Document Definition: for each element of the Document Definition structure (section, page, block) blocks are found during Document Definitions matching. A part of image that lays inside the block is recognized in the way defined by the block type (the Type property). If it is a compound block (section, checkmark group, etc.), it will contain a set of child blocks which are accessible through the Children property. The Block object exposes methods which cast it to a type-specific interface and thereby provide access to the extended attributes of a block of specific type.

Note: The block contents may differ from the value of corresponding field. This is due to the fact that the field contains recognized text to which some rules have been applied while the block contains only text received after recognition.

Properties

Name Type Description
BlockDefinition BlockDefinition, read-only Returns the block of the Document Definition corresponding to the document block.
Children Blocks, read-only Provides access to the collection of child blocks of the compound block.
Field Field, read-only Provides access to the field in the document which corresponds to the block.
FieldDefinition FieldDefinition, read-only Returns the field of the Document Definition which corresponds to the document block.
IsMatched Boolean, read-only Specifies whether the block has been correctly matched.
Page Page, read-only Provides access to the page which contains the block.
Parent Block, read-only Provides access to the parent block of the block.
Region Region Provides access to the block region. A region is a collection of rectangles placed one under another and having common top/bottom coordinates. That is, the bottom line of the upper rectangle touches the top line of the lower one. Unlike other types of blocks, a table block may have no more than one rectangle in its region, that's why an attempt to assign a region with more that one rectangle to a table block will result in an error.
Type BlockTypeEnum, read-only Specifies the type of the block.

Methods

Name Description
AsBarcodeBlock Returns the block as the BarcodeBlock object. If the block is not a barcode block, NULL is returned.
AsCheckmarkBlock Returns the block as the CheckmarkBlock object. If the block is not a checkmark block, NULL is returned.
AsCheckmarkGroupBlock Returns the block as the CheckmarkGroupBlock object. If the block is not a checkmark group block, NULL is returned.
AsTableBlock Returns the block as the TableBlock object. If the block is not a table block, NULL is returned.
AsTextBlock Returns the block as the TextBlock object. If the block is not a text block, NULL is returned.
MatchBlock Matches the block to the region.
Move Offsets the block region by some vector.

Related objects

Output parameter

This object is the output parameter of the following methods:

Input parameter

This object is the input parameter of the following methods:

See also

Blocks

Working with Properties

8/15/2023 1:19:30 PM

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.