Skip to content

Scenarios

Select the Document Reader SDK scenario.

Overview

A scenario is the main setting for Document Reader SDK. It controls all scanning processes of the Core framework and defines the way Core works. The set of available scenarios is different for each Core type.

To get all available scenarios, make sure the initialization is completed and use the following part of the code:

// getting current processing scenario
String currentScenario = DocumentReader.Instance().processParams().scenario;

// list of available scenarios
ArrayList<String> scenarios = new ArrayList<>();
for(DocumentReaderScenario scenario : DocumentReader.Instance().availableScenarios){
    scenarios.add(scenario.name);
}
// getting current processing scenario
var currentScenario: String? = DocumentReader.Instance().processParams().scenario

// list of available scenarios
val scenarios = ArrayList<String>()
for (scenario in DocumentReader.Instance().availableScenarios) {
    scenarios.add(scenario.name)
}

The DocumentReaderScenario class contains two main properties:

  • name—a name of a scenario, use this value to set a scenario for Document Reader SDK.
  • description—a brief description of the scenario functionality and usage.

After initialization is completed, set the processing scenario the following way:

// set the scenario value
DocumentReader.Instance().processParams().scenario = Scenario.SCENARIO_MRZ;
// set the scenario value
DocumentReader.Instance().processParams().scenario = Scenario.SCENARIO_MRZ

Scenarios and Results

Here is a comparison table of available scenarios and their capabilities.

Scenario name Multiple pages processing Document location MRZ OCR Barcode data Document type Visual zone OCR Graphic fields Credit card data Free OCR
Locate A X
Mrz X
MrzOrLocate O O
MrzAndLocate A X X
Barcode X
MrzOrBarcode O O
MrzOrOcr A O O O O O
MrzOrBarcodeOrOcr O O O O O O
LocateVisual_And_MrzOrOcr A X O O O O
DocType A O O X O
Ocr A X O X X O
FullProcess A X O O X O X
Id3Rus O O O O O
Capture X
CreditCard A X X
OcrFree X
RusStamp X

A
The option is available.

Empty
The result type is not included in the processing list and is not available.

O
The result type is not mandatory to reach the COMPLETED state. Might be available when the processing is finished.

X
The result type is mandatory to reach the COMPLETED state and is always available when the processing is finished.

Scenarios and Core Types

Here is a comparison table of available scenarios and Core types.

Core name MrzOrBarcodeOrOcr FullProcess CreditCard Mrz Barcode Locate Ocr DocType MrzOrBarcode MrzOrLocate MrzAndLocate MrzOrOcr LocateVisual_And_MrzOrOcr Id3Rus OcrFree RusStamp Capture
bounds X X
mrz X X X X X
mrzrfid X X X X X
barcode X X
barcodemrz X X X X X X X
barcodemrzrfid X X X X X X X
doctype X X X X X X
ocrandmrz X X X X X X X X X X X X X
ocrandmrzrfid X X X X X X X X X X X X X
full X X X X X X X X X X X X X X X X X
fullrfid X X X X X X X X X X X X X X X X X

Warning

The list of returned scenarios is also restricted by a license.

Back to top