Skip to content

Scenarios

Scenario is the main setting for Document Reader SDK. It controls all scanning process of Core framework. Depending on the selected scenario, Core works in different ways. The set of available scenarios is different for each Core type. The following part of code allows to get all available scenarios (should be used after initialization is completed):

// getting current processing scenario
var currentScenario = DocumentReader.Instance().ProcessParams().Scenario;

// adding available scenarios to ListView
var scenarios = new List<String>();
foreach (DocumentReaderScenario scenario in DocumentReader.Instance().AvailableScenarios)
{
    scenarios.Add(scenario.Name);
}

DocumentReaderScenario class contains two main properties:

  • Name - name of a scenario, use this value to set scenario for Document Reader SDK.
  • Description - brief description of the scenario functionality and usage.
// getting current processing scenario
var currentScenario = RGLDocReader.Shared.ProcessParams.Scenario;

// printing available scenarios
foreach (var scenario in RGLDocReader.Shared.AvailableScenarios)
{
    Console.WriteLine(scenario);
}

Scenario class contains two main properties:

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

After initialization is completed, the processing scenario should be set, like so:

// set the scenario value
DocumentReader.Instance().ProcessParams().Scenario = Scenario.ScenarioMrz;
// set the scenario value
RGLDocReader.Shared.ProcessParams.Scenario = Constants.RGL_SCENARIO_MRZ;

Comparison table of available scenarios vs results is below:

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 X X
OcrFree X
RusStamp X

A - the option is available for this scenario.

Empty - the result type is not included in processing list and won't be available

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

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

Comparison table of available scenarios vs Cores is below:

Core name (Android) Core name (iOS) MrzOrBarcodeOrOcr FullProcess CreditCard Mrz Barcode Locate Ocr DocType MrzOrBarcode MrzOrLocate MrzAndLocate MrzOrOcr LocateVisual_And_MrzOrOcr Id3Rus OcrFree RusStamp Capture
Bounds Bounds X X
MRZ MRZ X X X X X
MRZRfid MrzRfid X X X X X
Barcode Barcode X X
BarcodeMRZ BarcodeMRZ X X X X X X X
BarcodeMrzRfid BarcodeMrzRFID X X X X X X X
DocType DocType X X X X X X
OcrAndMRZ OcrAndMRZ X X X X X X X X X X X
OcrAndMrzRfid OcrAndMrzRfid X X X X X X X X X X X
Full Full X X X X X X X X X X X X X X X
FullRfid FullRfid X X X X X X X X X X X X X X X

Info

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