DocumentDefinition Object (IDocumentDefinition Interface)
This object corresponds to a Document Definition. A Document Definition describes the location of document elements and indicates the fields to be used in data extraction.
A Document Definition can be received as a part of ABBYY FlexiCapture 12 project, or can be created in the project by calling the AddNew method of the DocumentDefinitions object.
The Document Definition can comprise any number of sections (the Sections property), which can contain one or several pages. Pages are added to a single section if the document has blocks continuing or recurring on several pages or tables continuing on the following page. All the pages of the document definition are accessible through the Pages property.
The DocumentDefinition object supports a supplementary interface IFieldDefinition – the whole document definition can be considered as the top-level field definition which contains all the field definitions of the Document Definition. Support of this interface means that you can treat the DocumentDefinition object as the FieldDefinition object.
Properties
Name | Type | Description |
---|---|---|
BarcodeBaseRecognitionParams | BarcodeBaseRecognitionParams, read-only |
Provides access to the parameters of barcode pre-recognition when the Document Definition is matched. Please note that if you've loaded a flexible description created in ABBYY FlexiLayout Studio, its settings will be used instead. You may override the flexible description settings on section definition level by assigning TRUE to the ISectionDefinition::UseOwnRecognitionParams property. |
CustomLanguages | CustomLanguages, read-only | Returns a collection of custom user-defined languages specified in the document definition. |
DataSets | DataSets, read-only |
Returns the collection of data sets attached to the document definition. Data sets are used for storing information:
|
DefaultLanguage | Language |
Specifies the language to be used during recognition. The language can be changed for individual fields (see ITextRecognitionParams::Language), while the language specified by this property is used by default. See Setting Up Recognition Languages for details. Notes:
|
DefaultTextType | TextTypeEnum | Specifies the text type. The text type can be changed for individual text blocks (see ITextRecognitionParams::TextType), while the text type specified by this property is used by default. |
DefaultWritingStyle | LanguageIdEnum |
Specifies the writing style of handwritten characters. The writing style can be changed for individual fields (see ITextRecognitionParams::WritingStyle), while the style specified by this property is used by default. Examples of various numeral writing styles |
Description | String | Returns the text description of the Document Definition. |
Errors | StringsCollection, read-only | Returns a collection of error descriptions for the latest call of the Check method. Contains only general errors. To receive the errors for a certain section of the Document Definition, use the ISectionDefinition::Errors property. |
ExportProfiles | ExportProfiles, read-only | Provides access to the export parameters collection. |
GUID | String, read-only | Returns the global unique identifier (GUID) of the document definition. |
Id | Integer, read-only | Returns the identifier of the Document Definition. The identifier is unique within the project. |
InvoiceSettings | InvoiceSettings, read-only |
Configuration settings for an invoice Document Definition. To work with this property, first check out the Document Definition using the CheckOut method of the DocumentDefinitions object. |
IsEnabled | Boolean | Specifies if the Document Definition is to be used for document processing. This property set to FALSE excludes the document definition from document processing. |
IsValid | Boolean, read-only | Specifies if the Document Definition is valid. The Document Definition is valid if there are no errors in it and it has not been changed since the last call of the Check method. |
LicenseInfo | String, read-only | Specifies the information about the author of the Document Definition (e.g. copyright). |
Name | String |
Stores the name of the Document Definition. Note: This property may not be modified if the Document Definition is in editing mode (that is, after the call to the CheckOut method and before the changes are either saved or discarded using the CheckIn or UndoCheckout methods). |
PageAnalysisParams | PageAnalysisParams |
Specifies the parameters of page analysis. Page analysis (orientation detection, image scaling, etc.) is performed when the Document Definition is applied in order to apply the Document Definition correctly. Note: The property returns a constant object. To modify the value of the property, you must first receive an intermediate PageAnalysisParams object with the help of the IEngine::CreatePageAnalysisParams method, change the necessary parameters, and then assign this object to the property. |
Pages | PageDefinitions, read-only | Returns the collection of pages of the Document Definition. |
SectionDefinitions, read-only |
Returns the sections of the document definition. The section of a Document Definition is a set of pages (or a single page) and fields on these pages, which corresponds to a logically complete part of a document. The section can also be a link to another document definition in case of working with document sets. The type of the section is set up with the SectionDefinition::Type property. |
|
StringsCollection, read-only | Returns a collection of warning descriptions for the latest call of the Check method. Contains only general warnings. To receive the warnings for certain section of the Document Definition, use the ISectionDefinition::Warnings property. |
Methods
Name | Description |
---|---|
Check | Checks if Document Definition properties were configured correctly. |
Rearrange | Rearranges data in the document window of a Document Definition. Use it if you have added fields or sections and are going to open the Document Definition in ABBYY FlexiCapture. Note: The method is not supported for Invoice projects. |
Related objects
Output parameter
This object is the output parameter of the AddNew, AddNewFixed, FindByName, Item, and LoadFromFile methods of the DocumentDefinitions object.
Input parameter
This object is the input parameter of the Delete, CheckIn, CheckOut, Delete, UndoCheckout methods of the DocumentDefinitions object.
Samples
This object is used in the following code samples: Classification, Invoices Processing and Training.
See also
15.08.2023 13:19:30