Document Object (IDocument Interface)

This object corresponds to a processing document. A document may be a part of a batch or be a separate instance. A document as a part of a batch is received when processing data within a project. The collection of such documents are represented by the Documents object.

The newly created Document object contains a collection of document pages which are accessible through the Pages property. During document definitions matching data fields are found in the document. You can access these fields via the Sections property, which refers to the sections of the document. These sections have child fields. Each child field can be either a group of fields (and has own child fields), or a simple field (without child fields). See Working with Recognized Data for details. After data extraction and recognition the document can be exported. If errors occur during document processing, information about these errors can be found in the corresponding properties of the Document object (AssemblingErrors, RuleErrors).

To work with the document, access its structure, parameters, etc., you should first open it using the Open method. When you finished your work with such document, close it with the help of the Close method. See Using a Document Object within a Project for details.

The Document object supports the IField interface: the whole document can be considered as the top-level field which contains all the data fields of the document. Support of this interface means that you can treat the Document object as the Field object.

Properties

Name Type Description
AsBatchItem BatchItem, read-only Specifies the Document as a batch item. If the document is not a batch item this property is NULL.
AsClassificationTrainingDocument ClassificationTrainingDocument, read-only Provides access to the corresponding classification training object.
AssemblingErrors AssemblingErrors, read-only Returns a collection of assembly errors.
Batch Batch, read-only Provides access to the Batch object the document belongs to.
Comment String Allows you to specify any text comment for the document. This comment can be viewed in ABBYY FlexiCapture.
DocumentDefinition DocumentDefinition, read-only Returns the Document Definition applied to the document.
HasRuleErrors Boolean, read-only Specifies whether the document has rule errors. Unlike the RuleErrors property, this property is available for a closed document.
Id Integer, read-only Specifies the document identifier.
IsExported Boolean, read-only Specifies whether the document has been exported to the destination specified in the Document Definition (i.e. it has been exported with default parameters).
IsVerified Boolean, read-only Specifies whether the document has been verified.
LockType LockTypeEnum, read-only Returns the state of the document. The document can be closed, open for reading, or open for reading and writing.
Pages Pages, read-only Returns a collection of pages of the document.
RegistrationParameters RegistrationParameters, read-only Returns a collection of registration parameters of the document.
RuleErrors RuleErrors, read-only Returns a collection of errors for unfulfilled rules.
Sections Fields, read-only

Provides access to the sections of the document. These sections have child fields. Each child field can be either a group of fields (and has own child fields), or a simple field (without child fields). See Working with Recognized Data for details.

Note: To access the fields of the document, which belongs to some project, you must first open the document using the Open method. See the Using a Document Object within a Project section for details.

Title String Specifies the name of the document.

Methods

Name Description
ApplyImageEnhancementProfile Applies an image enhancement profile to the specified page.
CheckRules Checks all rules imposed on data in the specified field.
Close Closes the document.
ContinueLineItems Attempts to find more line items with the same structure as the first one. For invoices and purchase orders only.
Open Opens the document.
RecognizeBlocks Recognizes a collection of blocks in the document.
Save Saves changes made to the document.

Related objects

Output parameter

This object is the output parameter of the Item, FindById, Merge, AddNewFromPage methods of the Documents object.

Input parameter

This object is the input parameter of the following methods:

Samples

This object is used in the following code samples: Classification, Invoices Processing and Training.

See also

Working with Recognized Data

Using a Document Object within a Project

Documents

Working with Properties

15.08.2023 13:19:30

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.