Class GenericDocument

Generic document.

Example

Since the instance of the class contains objects backed by native resources (e.g. images) and implements AsyncDisposable it's highly recommended to use the await using syntax when an instance is created or is received from an API:

await using instance = await getGenericDocumentFromAnApi();

Alternatively, one can explicitly call release method to release the native resources or use autorelease convenience function. If neither is used, the resource will be released when the instance is garbage collected which is not recommended.

Implements

  • AsyncDisposable

Constructors

Properties

children: GenericDocument[]

List of document sub-documents.

confidence: number = 0.0

The average confidence in the accuracy of the document recognition result.

Default is 0

confidenceWeight: number = 0.0

The weight of the confidence. Can be used to calculate the weighted average confidence of two documents.

Default is 0

crop: null | ImageRef = null

Image crop of the document.

fields: Field[]

List of document fields.

quad: Point[]

Coordinates of the document in the parent document coordinate system.

quadInRoot: Point[]

Coordinates of the document in the root document coordinate system.

Document type.

Methods

  • Returns Promise<void>

  • Returns Promise<void>