Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# DocumentReader Class

Namespace: id3.Document

## Definition

Reads text field on a document using optical character recognition (OCR).
Python

    class DocumentReader

Dart

    class DocumentReader implements Finalizable

C#

    public partial class DocumentReader

Java

    public class DocumentReader implements AutoCloseable, Serializable

Swift

    public class DocumentReader

C

    typedef struct id3DocumentReader *ID3_DOCUMENT_READER;

## Usage

Python

    documentReaderInstance = DocumentReader()
    # ...

Explicit destruction

    # ...
    del documentReaderInstance

Dart

    final documentReaderInstance = sdk.DocumentReader();
    // ...

Explicit destruction

    // ...
    documentReaderInstance.dispose()

C#

    using (var documentReaderInstance = new DocumentReader())
    {
       // ...
    }

Explicit destruction

    var documentReaderInstance = new DocumentReader()
    // ...
    documentReaderInstance.Dispose()

Java

    try (DocumentReader documentReaderInstance = new DocumentReader()) {
    // ...
    }

Explicit destruction

    DocumentReader documentReaderInstance = new DocumentReader();
    // ...
    documentReaderInstance.close();

Swift

    private var documentReaderInstance: DocumentReader? = nil
    documentReaderInstance = try DocumentReader()

C

    ID3_DOCUMENT_READER hDocumentReader{};
    int err = id3DocumentReader_Initialize(&hDocumentReader);
    if (err == ID3_SUCCESS) {
        // ...
        id3DocumentReader_Dispose(&hDocumentReader);
    }

## Properties

Name | Type | Description
--- | --- | ---
threadCount | int | Number of threads to use for OCR.

## Methods

Name | Description
--- | ---
extractFace | Extracts a crop of the face in a document.
readDocument | Reads all the fields in a document.
readField | Reads a single field in a document.