Getting results
This page covers the description of how to get various kinds of results

Text Results

If you know exactly what text data are needed, the fastest way to get information is to use special functions.

Getting values

Getting values of text fields indicating fieldType:
1
// Get full name
2
var surnameAndGivenNames = results.getTextFieldValueByType({ fieldType: DocumentReader.Enum.eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES });
3
// Get date of birth
4
var dateOfBirth = results.getTextFieldValueByType({ fieldType: DocumentReader.Enum.eVisualFieldType.FT_DATE_OF_BIRTH });
5
// Get document number
6
var documentNumber = results.getTextFieldValueByType({ fieldType: DocumentReader.Enum.eVisualFieldType.FT_DOCUMENT_NUMBER });
Copied!
Getting values of text fields indicating fieldType, lcid:
1
// Get full name
2
var surnameAndGivenNames = results.getTextFieldValueByType({ fieldType: DocumentReader.Enum.eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES, lcid: DocumentReader.Enum.LCID.BELARUSIAN });
3
// Get place of birth
4
var placeOfBirth = results.getTextFieldValueByType({ fieldType: DocumentReader.Enum.eVisualFieldType.FT_PLACE_OF_BIRTH, lcid: DocumentReader.Enum.LCID.GERMAN_GERMANY });
Copied!
Getting values of text fields indicating fieldType, lcid, source:
1
// Get full name
2
var surnameAndGivenNames = results.getTextFieldValueByType({ fieldType: DocumentReader.Enum.eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES, lcid: DocumentReader.Enum.LCID.BELARUSIAN, source: DocumentReader.Enum.eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED });
3
// Get address
4
var address = results.getTextFieldValueByType({ fieldType: DocumentReader.Enum.eVisualFieldType.FT_ADDRESS, lcid: DocumentReader.Enum.LCID.LATIN, source: DocumentReader.Enum.eRPRM_ResultType.RPRM_RESULT_TYPE_BAR_CODES_TEXT_DATA });
Copied!
Getting values of text fields indicating fieldType, lcid, source, original:
1
// Get surname
2
var surname = results.getTextFieldValueByType({ fieldType: DocumentReader.Enum.eVisualFieldType.FT_SURNAME, lcid: DocumentReader.Enum.LCID.BELARUSIAN, source: DocumentReader.Enum.eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED, original: true });
3
// Get address
4
var address = results.getTextFieldValueByType({ fieldType: DocumentReader.Enum.eVisualFieldType.FT_ADDRESS, lcid: DocumentReader.Enum.LCID.LATIN, source: DocumentReader.Enum.eRPRM_ResultType.RPRM_RESULT_TYPE_BAR_CODES_TEXT_DATA, original: true });
Copied!
Getting values of text fields indicating fieldType, source:
1
// Get surname
2
var surname = results.getTextFieldValueByType({ fieldType: DocumentReader.Enum.eVisualFieldType.FT_SURNAME, source: DocumentReader.Enum.eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED });
Copied!
Getting values of text fields indicating fieldType, source, original:
1
// Get surname
2
var surname = results.getTextFieldValueByType({ fieldType: DocumentReader.Enum.eVisualFieldType.FT_SURNAME, source: DocumentReader.Enum.eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED, original: true });
Copied!

iOS

Getting values of text fields indicating fieldType, original:
1
// Get surname
2
var surname = results.getTextFieldValueByType({ fieldType: DocumentReader.Enum.eVisualFieldType.FT_SURNAME, original: true });
Copied!

Getting statuses

Getting statuses of text fields indicating fieldType (one of eCheckResult values):
1
// Get status of FT_SURNAME_AND_GIVEN_NAMES
2
var surnameAndGivenNames = results.getTextFieldStatusByType(DocumentReader.Enum.eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES);
3
// Get status of FT_DATE_OF_BIRTH
4
var dateOfBirth = results.getTextFieldStatusByType(DocumentReader.Enum.eVisualFieldType.FT_DATE_OF_BIRTH);
Copied!
Getting statuses of text fields indicating fieldType, lcid (one of eCheckResult values):
1
// Get status of FT_SURNAME_AND_GIVEN_NAMES
2
var surnameAndGivenNames = results.getTextFieldStatusByType(DocumentReader.Enum.eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES, DocumentReader.Enum.LCID.BELARUSIAN);
3
// Get status of FT_DATE_OF_BIRTH
4
var dateOfBirth = results.getTextFieldStatusByType(DocumentReader.Enum.eVisualFieldType.FT_DATE_OF_BIRTH, DocumentReader.Enum.LCID.LATIN);
Copied!

Graphic Results

Getting values

Getting values of graphic fields indicating fieldType:
1
// Get document image
2
results.getGraphicFieldImageByType({ fieldType: DocumentReader.Enum.eGraphicFieldType.GF_DOCUMENT_IMAGE })
3
// Get portrait image
4
results.getGraphicFieldImageByType({ fieldType: DocumentReader.Enum.eGraphicFieldType.GF_PORTRAIT })
Copied!
Getting values of graphic fields indicating fieldType, source:
1
// Get document image
2
results.getGraphicFieldImageByType({ fieldType: DocumentReader.Enum.eGraphicFieldType.GF_DOCUMENT_IMAGE, source: DocumentReader.Enum.eRPRM_ResultType.RPRM_RESULT_TYPE_RAW_IMAGE })
3
// Get document image (uncropped)
4
results.getGraphicFieldImageByType({ fieldType: DocumentReader.Enum.eGraphicFieldType.GF_DOCUMENT_IMAGE, source: DocumentReader.Enum.eRPRM_ResultType.RPRM_RESULT_TYPE_RAW_UNCROPPED_IMAGE })
5
// Get portrait image
6
results.getGraphicFieldImageByType({ fieldType: DocumentReader.Enum.eGraphicFieldType.GF_PORTRAIT, source: DocumentReader.Enum.eRPRM_ResultType.RPRM_RESULT_TYPE_GRAPHICS })
Copied!
Getting values of graphic fields indicating fieldType, source, pageIndex:
1
// Get document image from the second page
2
results.getGraphicFieldImageByType({ fieldType: DocumentReader.Enum.eGraphicFieldType.GF_DOCUMENT_IMAGE, source: DocumentReader.Enum.eRPRM_ResultType.RPRM_RESULT_TYPE_RAW_IMAGE, pageIndex: 1 })
3
// Get portrait image from the first page
4
results.getGraphicFieldImageByType({ fieldType: DocumentReader.Enum.eGraphicFieldType.GF_PORTRAIT, source: DocumentReader.Enum.eRPRM_ResultType.RPRM_RESULT_TYPE_GRAPHICS, pageIndex: 0 })
Copied!
Getting values of graphic fields indicating fieldType, source, pageIndex, light:
1
// Get document image from the first page with white light
2
results.getGraphicFieldImageByType({ fieldType: DocumentReader.Enum.eGraphicFieldType.GF_DOCUMENT_IMAGE, source: DocumentReader.Enum.eRPRM_ResultType.RPRM_RESULT_TYPE_RAW_IMAGE, pageIndex: 0, lightType: DocumentReader.Enum.eRPRM_Lights.RPRM_LIGHT_WHITE_FULL })
3
// Get document image from the first page with UV light
4
results.getGraphicFieldImageByType({ fieldType: DocumentReader.Enum.eGraphicFieldType.GF_DOCUMENT_IMAGE, source: DocumentReader.Enum.eRPRM_ResultType.RPRM_RESULT_TYPE_RAW_IMAGE, pageIndex: 0, lightType: DocumentReader.Enum.eRPRM_Lights.RPRM_LIGHT_UV })
Copied!

Getting statuses

Getting statuses of graphic fields indicating imageQualityCheckType (one of eCheckResult values):
1
// Get status of an image's focus
2
var imageFocus = results.getQualityResult(DocumentReader.Enum.eImageQualityCheckType.IQC_IMAGE_FOCUS);
3
// Get status of images' glares
4
var imageGlares = results.getQualityResult(DocumentReader.Enum.eImageQualityCheckType.IQC_IMAGE_GLARES);
Copied!
Getting statuses of graphic fields indicating imageQualityCheckType, securityFeature (one of eCheckResult values):
1
// Get status of images' glares
2
var blank = results.getQualityResult(DocumentReader.Enum.eImageQualityCheckType.IQC_IMAGE_GLARES, DocumentReader.Enum.eRPRM_SecurityFeatureType.SECURITY_FEATURE_TYPE_BLANK);
3
var mrz = results.getQualityResult(DocumentReader.Enum.eImageQualityCheckType.IQC_IMAGE_GLARES, DocumentReader.Enum.eRPRM_SecurityFeatureType.SECURITY_FEATURE_TYPE_MRZ);
Copied!
Last modified 1mo ago