Results

This page covers the description of the DocumentReaderResults class

After scanning process is completed, DocumentReaderResults instance will be received. Result contains different result types:

  • chip page index (chipPage). Indicates which page of the document contains RFID chip (0 if there's no page containing). Requires Document Type recognition, otherwise 1 by default;

  • overall result (overallResult). It's a summary of all results, one of eCheckResult enumeration values. If at least one result status was negative, overall result will be negative;

  • count of pages result (morePagesAvailable). Indicates, if document has more pages (count) to be processed (e.g. ID card's front and back side). Requires Document Type recognition, otherwise 0 by default;

  • RFID result (rfidResult). Result of RFID reading process, one of eRFID_NotificationAndErrorCodes;

  • resolution result (highResolution). Indicates, if document is needed with high resolution, false by default;

  • graphic result (graphicResult);

  • text result (textResult);

  • position of document blank result (documentPosition);

  • position of found Barcode result (barcodePosition);

  • position of the MRZ area (mrzPosition);

  • image quality group result (imageQualityGroup);

  • document type result (documentType);

  • JSON result (jsonResult);

  • notification result (documentReaderNotification). Notification data about reading process. Used when reading RFID chip;

  • RFID session data result (rfidSessionData). Results of work with the SDK within the context of the current communication session with electronic document.

Graphic Result

These parameters are presented in DocumentReaderGraphicResult class.

Text Result

These parameters are presented in DocumentReaderTextResult class.

Image Quality Group

These parameters are presented in ImageQualityGroup class.

Document Type Result

These parameters are presented in DocumentReaderDocumentType class.

JSON Result

These parameters are presented in DocumentReaderJsonResult class.

Extra Functions

If you know exactly what type of text data you will need to get (see eVisualFieldType enumeration description), the fastest way to get the information from DocumentReaderResults instance is use special functions:

// Get full name
String name = results.getTextFieldValueByType(eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES);
// Get date of birth
String dateOfBirth = results.getTextFieldValueByType(eVisualFieldType.FT_DATE_OF_BIRTH);

Also you can get images from graphic fields by this way:

// Get cropped portrait image
Bitmap portrait = results.getGraphicFieldImageByType(eGraphicFieldType.GF_PORTRAIT);
// Get document front side image
Bitmap documentImage = results.getGraphicFieldImageByType(eGraphicFieldType.GT_DOCUMENT_FRONT);

You can go through all text fields, DocumentReaderTextField instances. DocumentReaderTextField instance contains different DocumentReaderValue instances from different sources (MRZ, OCR, Barcode, RFID). So to get values faster you can use getTextFieldValueByType function:

for(DocumentReaderTextField textField : results.textResult.fields) {
    String value = results.getTextFieldValueByType(textField.fieldType, textField.lcid);
}

Last updated