Handling Results
Getting Results
Text Values
To get values of text fields, invoke the textFieldValueByType method with the required arguments:
| Argument | Compulsory/optional | Description | 
|---|---|---|
| fieldType | Compulsory | The field logical type, one of the eVisualFieldTypevalues. The enumeration contains identifiers determining the logical type of the text data obtained while reading MRZ, document filling fields, and barcodes. | 
| lcid | Optional | The ID of language-culture to differentiate one field of the same type from another. Contains an LCIDenumeration value. | 
| source | Optional | Identifies the zone from which data should be extracted. Contains an eRPRM_ResultTypeenumeration value. | 
| original | Optional | Checks which value to extract: modified or original. | 
// Get surname
var surname = results.textFieldValueByType({ fieldType: Enum.eVisualFieldType.FT_SURNAME, lcid: Enum.LCID.INDONESIAN, source: Enum.eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED, original: true });
// Get address
var address = results.textFieldValueByType({ fieldType: Enum.eVisualFieldType.FT_ADDRESS, lcid: Enum.LCID.LATIN, source: Enum.eRPRM_ResultType.RPRM_RESULT_TYPE_BAR_CODES_TEXT_DATA, original: true });
Graphic Values
To get values of graphic fields, invoke the graphicFieldImageByType method with the required arguments:
| Argument | Compulsory/optional | Description | 
|---|---|---|
| fieldType | Compulsory | The field logical type, one of the eGraphicFieldTypevalues. The enumeration contains identifiers determining the logical type of the graphic data obtained while reading the document filling fields or barcodes. | 
| source | Optional | Identifies the zone from which data should be extracted. The eRPRM_ResultTypeenumeration contains possible values. | 
| pageIndex | Optional | The index of the document page from which the result is received. | 
| light | Optional | The light type, one of the eRPRM_Lightsvalues. The enumeration contains a set of identifiers used for identifying the document reader possibilities, specifying lighting schemes for scanning, etc. | 
// Get document image from the first page with white light
results.graphicFieldImageByType({ fieldType: Enum.eGraphicFieldType.GF_DOCUMENT_IMAGE, source: Enum.eRPRM_ResultType.RPRM_RESULT_TYPE_RAW_IMAGE, pageIndex: 0, lightType: Enum.eRPRM_Lights.RPRM_LIGHT_WHITE_FULL })
// Get document image from the first page with UV light
results.graphicFieldImageByType({ fieldType: Enum.eGraphicFieldType.GF_DOCUMENT_IMAGE, source: Enum.eRPRM_ResultType.RPRM_RESULT_TYPE_RAW_IMAGE, pageIndex: 0, lightType: Enum.eRPRM_Lights.RPRM_LIGHT_UV })
Results Structure
Once the document processing is completed, the DocumentReaderResults instance is received. 
The result contains the following result types:
documentReaderResults
└── chipPage
└── overallResult
└── elapsedTime
└── elapsedTimeRFID
└── processingFinishedStatus
└── morePagesAvailable
└── rfidResult
└── graphicResult
└── textResult
└── documentPosition
└── barcodePosition
└── mrzPosition
└── imageQuality
└── documentType
└── rawResult
└── documentReaderNotification
└── rfidSessionData
└── authenticityResult
└── barcodeResult
└── dtcData
└── transactionInfo
| Result type | Description | 
|---|---|
| documentType | The document type result. | 
| textResult | The text result. | 
| graphicResult | The graphic result. | 
| documentPosition | The position of the found document. | 
| barcodePosition | The position of the found barcode. | 
| mrzPosition | The position of the MRZ area. | 
| imageQuality | The image quality result. | 
| getOverallResult | The summary of all results, one of the eCheckResultenumeration values. If at least one result status is negative, the overall result is negative. DEPRECATED in DocumentReader 6.1 Usestatus.overallStatusinstead. | 
| authenticityResults | The authenticity result. | 
| rfidSessionData | The result of work with the SDK within the context of the current communication session with an electronic document. | 
| chipPage | Indicates the presence and location of an RFID chip in a document. 0—no RFID chip; 1—the chip is located in the document data page; 2—the chip is located in the back page or inlay of the document. Requires Document Type recognition, otherwise returns 1 by default. | 
| barcodeResult | The barcode result. | 
| morePagesAvailable | Indicates if a document has more pages to be processed, for example, ID card's front and back side. Requires the Document Type recognition, otherwise it is 0 by default. | 
| elapsedTime | Time the document processing has taken, ms. | 
| elapsedTimeRFID | Time the RFID chip processing has taken, ms. | 
| rawResult | The result in the initial raw view. Its structure and parameters are described on the Response Schema. | 
| dtcData | The DTC-VC data. | 
| transactionInfo | The data related to Online License Transactions. | 
Document Type Result
The DocumentReaderDocumentType class contains the following parameters:
documentType
└── name
└── documentID
└── ICAOCode
└── FDSID
└── dType
└── dFormat
└── dMRZ
└── dDescription
└── dYear
└── dCountryName
└── pageIndex
| Parameter | Description | 
|---|---|
| name | The document type name. | 
| documentID | The document type numeric code. | 
| ICAOCode | The document issuing country ICAO Code. | 
| FDSID | The array of IRS document identifiers. | 
| dType | The document type, one of the diDocTypeenumeration values. | 
| dFormat | The document format, one of the DocFormatenumeration values. | 
| dMRZ | A flag for MRZ presence on the document. | 
| dDescription | The document description text. | 
| dYear | The year the document was issued. | 
| dCountryName | The name of the country that issued the document. | 
| pageIndex | The index of the document page from which the result is received. | 
Text Result
The DocumentReaderTextResult class contains the following parameters:
textResult
└── fields
|   └── fieldType
|   └── fieldName
|   └── lcid
|   └── lcidName
|   └── value
|   └── values
|   |   └── field
|   |   └── sourceType
|   |   └── value
|   |   └── originalValue
|   |   └── boundRect
|   |   └── rfidOrigin
|   |   └── pageIndex
|   |   └── probability
|   |   └── originalSymbols
|   |   |   └── code
|   |   |   └── rect
|   |   |   └── probability
|   └── status
|   └── comparisonList
|   |   └── sourceTypeLeft
|   |   └── sourceTypeRight
|   |   └── status
|   └── validityList
|   |   |   └── sourceType
|   |   |   └── status
|   └── comparisonStatus
|   └── validityStatus
└── status
└── availableSourceList
|   └── sourceType
|   └── source
|   └── validityStatus
└── comparisonStatus
└── validityStatus
| Parameter | Description | 
|---|---|
| fields | An array of textual results, list of text fields extracted from the document. | 
| fieldType | The field logical type, one of the FieldTypevalues. Enumeration contains identifiers determining the logical type of the text data obtained while reading MRZ, document filling fields, and barcodes. | 
| fieldName | The title of the fieldType. | 
| lcid | The ID of language-culture to differentiate one field of the same type from another. The LCIDenumeration contains available enumeration values. | 
| lcidName | The title of the lcid. | 
| value | The value obtained from the field. | 
| values | An array of values: 
 | 
| status | The textual field check result, one of RGLCheckResultvalues. | 
| comparisonList | The list of all comparison statuses for this field type: 
 | 
| validityList | List of all validity statuses for this field type: 
 | 
| comparisonStatus | Comparison result of the field, one of the RGLCheckResultenum values. | 
| validityStatus | Validity result of the field, one of the RGLCheckResultenum values. | 
| status | Textual fields check result, one of the RGLCheckResultenum values. | 
| availableSourceList | The list of all available origin source with overall validity status of all text fields of a particular source type: 
 | 
| comparisonStatus | Comparison status of all text fields, one of the RGLCheckResultenum values. | 
| validityStatus | Validity status of all text fields, one of the RGLCheckResultenum values. | 
Graphic Result
The DocumentReaderGraphicResult class contains the following parameters:
graphicResult
└── fields
|   └── sourceType
|   └── fieldType
|   └── fieldName
|   └── lightType
|   └── lightName
|   └── fieldRect
|   |   └── bottom
|   |   └── left
|   |   └── right
|   |   └── top
|   └── pageIndex
| Parameter | Description | 
|---|---|
| sourceType | Identifies zone whence data was extracted. eRPRM_ResultTypeclass contains enumeration values | 
| fieldType | Field logical type, one of eGraphicFieldTypevalues. Enumeration contains identifiers determining the logical type of the graphic data obtained while reading document filling fields or barcodes | 
| getFieldName | Title of the fieldType | 
| light | Indicates lightning scheme of the graphic field was taken in, one of eRPRM_Lights | 
| getRect | Field rectangular area coordinates on the image (for document filling fields reading results RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED | 
| pageIndex | Indicates an index of the document page, whence the result is received | 
Image Quality Group
The ImageQualityGroup class contains the following parameters:
imageQuality
└── count
└── result
└── imageQualityList
|   └── featureType
|   └── result
|   └── type
|   └── boundRects
| Parameter | Description | 
|---|---|
| count | The number of results in the list. | 
| result | The overall check result, one of the eCheckResultenumeration values. | 
| imageQualityList | The array of single check result pointers that contains: 
 | 
Barcode Result
The DocumentReaderBarcodeResult class contains the following parameters:
barcodeResult
└── fields
|   └── barcodeType
|   └── status
|   └── pdf417Info
|   |   └── errorLevel
|   |   └── columns
|   |   └── rows
|   └── data
|   └── pageIndex
| Parameter | Description | 
|---|---|
| barcodeType | The decoded barcode type, one of the BarcodeTypeenumeration values. | 
| status | The barcode reading result, one of the BarcodeResultenumeration values or another value, which is SDK internal error code. | 
| pdf417Info | Information about the PDF417 barcode that includes the following parameters: 
 | 
| data | The results of reading data from barcode modules. | 
| pageIndex | The index of the document page from which the result is received. | 
Document, MRZ, Barcode Position
The Position class contains the following parameters:
documentPosition / mrzPosition / barcodePosition
└── docFormat
└── width
└── height
└── angle
└── dpi
└── inverse
└── perspectiveTr
└── objArea
└── objIntAngleDev
└── resultStatus
└── center
|   └── x
|   └── y
└── leftTop
|   └── x
|   └── y
└── leftBottom
|   └── x
|   └── y
└── rightTop
|   └── x
|   └── y
└── rightBottom
|   └── x
|   └── y
└── pageIndex
| Parameter | Description | 
|---|---|
| docFormat | Document format, one of DocFormatenumeration values | 
| width | Document width | 
| height | Document height | 
| angle | Document rotation angle | 
| dpi | Resolution in dots per inch | 
| inverse | Internal use parameter | 
| perspectiveTr | Internal use parameter | 
| objArea | Internal use parameter | 
| objIntAngleDev | Internal use parameter | 
| resultStatus | Internal use parameter, one of eCheckResultenumeration values | 
| center | Document center coordinates | 
| leftTop | Document left top corner coordinates | 
| leftBottom | Document left bottom corner coordinates | 
| rightTop | Document right top corner coordinates | 
| rightBottom | Document right bottom corner coordinates | 
| pageIndex | Index of the document page, whence the result is received | 
Status
The DocumentReaderResultsStatus class contains the following parameters:
status
└── overallStatus
└── optical
└── detailsOptical
|   └── overallStatus
|   └── mrz
|   └── text
|   └── docType
|   └── security
|   └── imageQA
|   └── expiry
|   └── vds
|   └── pagesCount
└── rfid
└── detailsRFID
|   └── overallStatus
|   └── AA
|   └── BAC
|   └── CA
|   └── PA
|   └── PACE
|   └── TA
└── portrait
└── stopList
| Parameter | Description | 
|---|---|
| overallStatus | The summary of all results. eCheckResult. | 
| optical | The summary of all optical results. Same as detailsOptical.overallStatus.eCheckResult. | 
| detailsOptical | The container for an optical related scanning statuses. | 
| overallStatus | The summary of all optical results. eCheckResult. | 
| mrz | MRZ verification: values validity, dates, checkdigits verification. eCheckResult. | 
| text | Text fields valitity: values validity for specific fields, cross-comparison of values from different sources, dates & checkdigits verification. eCheckResult. | 
| docType | The check status if document type was recognized or not. eCheckResult. | 
| security | The authenticity verification status. eCheckResult. | 
| imageQA | The input images quality verification status. eCheckResult. | 
| expiry | The document validity period verification status. eCheckResult. | 
| vds | The Visible Digital Seal verification status. eCheckResult. | 
| pagesCount | The number of scanned document pages, integer. | 
| rfid | The summary of all RFID results. Same as detailsRFID.overallStatus.eCheckResult. | 
| detailsRFID | The container for the RFID related scanning statuses. | 
| overallStatus | The summary of all RFID results. eCheckResult. | 
| AA | The active authentication status. eCheckResult. | 
| BAC | The basics access control status. eCheckResult. | 
| CA | The chip authentication status. eCheckResult. | 
| PA | The passive authentication status. eCheckResult. | 
| PACE | The password authenticated connection establishment status. eCheckResult. | 
| TA | The terminal authentication status. eCheckResult. | 
| portrait | The comparison status for portrait in the document against the live or external image. eCheckResult. | 
| stopList | The verification status for the document data against the database. eCheckResult. | 
Authenticity Result
The RGLDocumentReaderAuthenticityResult class contains the following parameters:
authenticityResult
└── status
└── checks
|   └── type
|   └── typeName
|   └── status
|   └── elements
|   |   └── status
|   |   └── elementType
|   |   └── elementTypeName
|   |   └── elementDiagnose
|   |   └── elementDiagnoseName
|   └── pageIndex
| Parameter | Description | 
|---|---|
| checks | Stores the result of document authenticity check using the images for different lighting schemes | 
| type | Type of the performed check, one of eRPRM_Authenticityenumeration values | 
| elementType | Element type, one of eRPRM_SecurityFeatureTypeenumeration values | 
| elementDiagnose | Element diagnose, one of eCheckDiagnoseenumeration values | 
| pageIndex | Index of the document page, whence the result is received | 
| getStatus | Overall check result, one of eCheckResultenumeration values | 
RFID Result
The RFIDSessionData class contains the following parameters:
rfidSessionData
└── accessControls
|   └── activeOptionIdx
|   └── notifications
|   └── status
|   └── type
└── applications
|   └── applicationID
|   └── dataHashAlgorithm
|   └── files
|   |   └── fileData
|   |   |   └── data
|   |   |   └── length
|   |   |   └── status
|   |   |   └── type
|   |   └── fileID
|   |   └── notifications
|   |   └── pAStatus
|   |   └── readingStatus
|   |   └── readingTime
|   |   └── type
|   |   └── docFieldsText
|   |   └── docFieldsGraphics
|   |   └── docFieldsOriginals
|   |   └── certificates
|   |   |   └── securityObject
|   |   |   |   └── data
|   |   |   |   └── length
|   └── status
|   └── type
|   └── unicodeVersion
|   └── version
└── securityObjects
|   └── fileReference
|   └── objectType
|   └── version
|   └── signerInfos
|   |   └── dataToHash
|   |   └── digestAlgorithm
|   |   └── paStatus
|   |   └── signatureAlgorithm
|   |   └── version
|   |   └── issuer
|   |   |   └── attributes
|   |   |   |   └── type
|   |   |   |   └── value
|   |   |   |   |   └── data
|   |   |   |   |   └── length
|   |   |   |   |   └── status
|   |   |   |   |   └── type
|   |   |   |   |   └── format
|   |   |   └── data
|   |   |   └── friendlyName
|   |   |   |   └── data
|   |   |   |   └── length
|   |   |   |   └── status
|   |   |   |   └── type
|   |   |   |   └── format
|   |   └── serialNumber
|   |   |   └── data
|   |   |   └── length
|   |   |   └── status
|   |   |   └── type
|   |   |   └── format
|   |   └── signature
|   |   |   └── data
|   |   |   └── length
|   |   |   └── status
|   |   |   └── type
|   |   |   └── format
|   |   └── signedAttributes
|   |   |   └── data
|   |   |   └── type
|   |   └── subjectKeyIdentifier
|   |   |   └── data
|   |   |   └── length
|   |   |   └── status
|   |   |   └── type
|   |   |   └── format
|   |   └── certificateChain
|   |   |   └── extensions
|   |   |   |   └── data
|   |   |   |   └── type
|   |   |   └── fileName
|   |   |   |   └── data
|   |   |   |   └── length
|   |   |   |   └── status
|   |   |   |   └── type
|   |   |   |   └── format
|   |   |   └── issuer
|   |   |   |   └── attributes
|   |   |   |   |   └── type
|   |   |   |   |   └── value
|   |   |   |   |   |   └── data
|   |   |   |   |   |   └── length
|   |   |   |   |   |   └── status
|   |   |   |   |   |   └── type
|   |   |   |   |   |   └── format
|   |   |   |   └── data
|   |   |   |   └── friendlyName
|   |   |   |   |   └── data
|   |   |   |   |   └── length
|   |   |   |   |   └── status
|   |   |   |   |   └── type
|   |   |   |   |   └── format
|   |   |   └── notifications
|   |   |   └── origin
|   |   |   └── paStatus
|   |   |   └── serialNumber
|   |   |   └── signatureAlgorithm
|   |   |   └── subject
|   |   |   |   └── attributes
|   |   |   |   |   └── type
|   |   |   |   |   └── value
|   |   |   |   |   |   └── data
|   |   |   |   |   |   └── length
|   |   |   |   |   |   └── status
|   |   |   |   |   |   └── type
|   |   |   |   |   |   └── format
|   |   |   |   └── data
|   |   |   |   └── friendlyName
|   |   |   |   |   └── data
|   |   |   |   |   └── length
|   |   |   |   |   └── status
|   |   |   |   |   └── type
|   |   |   |   |   └── format
|   |   |   └── subjectPKAlgorithm
|   |   |   └── type
|   |   |   └── validity
|   |   |   |   └── notAfter
|   |   |   |   |   └── data
|   |   |   |   |   └── length
|   |   |   |   |   └── status
|   |   |   |   |   └── type
|   |   |   |   |   └── format
|   |   |   |   └── notBefore
|   |   |   |   |   └── data
|   |   |   |   |   └── length
|   |   |   |   |   └── status
|   |   |   |   |   └── type
|   |   |   |   |   └── format
|   |   |   └── version
|   |   └── notifications
|   └── notifications
└── cardProperties
|   └── aTQA
|   └── aTQB
|   └── aTR
|   └── baudrate1
|   └── baudrate2
|   └── bitRateR
|   └── bitRateS
|   └── chipTypeA
|   └── mifareMemory
|   └── rfidType
|   └── sAK
|   └── support4
|   └── supportMifare
|   └── uID
└── totalBytesReceived
└── totalBytesSent
└── status
└── extLeSupport
└── processTime
└── sessionDataStatus
|   └── AA
|   └── BAC
|   └── CA
|   └── PA
|   └── PACE
|   └── TA
|   └── overallStatus
| Parameter | Description | 
|---|---|
| accessControls | list of containers to store information about the supported procedures of authentication and secure data access within the context of the session | 
| activeOptionIdx | index of the active variant of the procedure | 
| notifications | list of remarks arisen during the procedure | 
| status | procedure status (RFID_Error_NotPerformed, RFID_Error_NotAvailable, RFID_Error_NoError or the error code from eRFID_NotificationAndErrorCodesenumeration | 
| type | procedure type (one of eRFID_AccessControl_ProcedureTypeenumeration values) | 
| applications | list of containers to store information about the involved applications of electronic document | 
| applicationID | application identifier | 
| dataHashAlgorithm | algorithm for calculating hash values for files for the procedure of PA | 
| files | list of containers to store information about the read files of the application | 
| unicodeVersion | Unicode version for application | 
| securityObjects | list of containers to store information about the detected document security objects | 
| fileReference | reference to the source file of the security object data | 
| objectType | security object identifier | 
| signerInfos | list of containers to store information about digital signature objects contained in the SO | 
| digestAlgorithm | digital signature hash-function algorithm identifier | 
| paStatus | result of the digital signature verification (RFID_Error_NotPerformed, RFID_Error_NoError or RFID_Error_Failed); | 
| signatureAlgorithm | digital signature algorithm identifier | 
| issuer | identifier of the necessary certificate issuer | 
| serialNumber | serial number of the necessary certificate | 
| signature | binary data of the verified digital signature | 
| signedAttributes | list of the signed attributes | 
| subjectKeyIdentifier | signature object identifier of the necessary certificate | 
| certificateChain | certificate chain, used for the digital signature verification | 
| cardProperties | set of electronic document chip characteristics | 
| aTQA | numeric ATQ_A value in hexadecimal format (e.g. "0x0000") | 
| aTQB | ATQ_B contents in text format. Each byte is represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. "50 F9 4F 41 60 00 00 00 00 77 81 81") | 
| aTR | pAtr contents in text format. Each byte is represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. "3B 88 81 11 FC 00 00 00 00 77 81 81 00 93") | 
| baudrate1 | numeric Baudrate1 value in hexadecimal format (e.g. "0x0000000F") | 
| baudrate2 | numeric Baudrate2 value in hexadecimal format | 
| bitRateR | numeric BitRateR value in hexadecimal format (e.g. "0x04") | 
| bitRateS | numeric BitRateS value in hexadecimal format (e.g. "0x04") | 
| chipTypeA | text abbreviation of ChipType_A value | 
| mifareMemory | numeric MifareMemory value | 
| rfidType | text abbreviation of RFID_Type value | 
| sAK | numeric SAK value in hexadecimal format (e.g. "0x00") | 
| support4 | boolean Support_4 value | 
| supportMifare | boolean Support_Mifare value | 
| uID | UID contents in text format. Each byte is represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. "F9 4F 41 60") | 
| totalBytesReceived | total number of bytes received from the RFID-chip during the whole session | 
| totalBytesSent | total number of bytes transmitted to the RFID-chip during the whole session | 
| extLeSupport | sign of support of RFID-chip for extended length commands of reading (RFID_Error_NotPerformed, RFID_Error_NotAvailable or RFID_Error_NoError) | 
| processTime | total time of all operations performed during the session, ms | 
| AA | AA status, one of eCheckResultvalues | 
| BAC | BAC status, one of eCheckResultvalues | 
| CA | CA status, one of eCheckResultvalues | 
| PA | PA status, one of eCheckResultvalues | 
| PACE | PACE status, one of eCheckResultvalues | 
| TA | TA status, one of eCheckResultvalues | 
| overallStatus | overall status, one of eCheckResultvalues | 
VDSNCData. Visible Digital Seal for Non Constrained environments.
The VDSNCData class contains the following parameters:
vdsncData
└── type
└── version
└── issuingCountry
└── message
└── signatureAlgorithm
└── signature
└── certificate
└── certificateChain
└── notifications
| Parameter | Description | 
|---|---|
| type | Visible Digital Seal use case type. Type is set to icao.testfor Proof of Testing (data defined by CAPSCA),icao.vaccfor Proof of Vaccination (data defined by WHO). Other Types may be added in the future. | 
| version | Visible Digital Seal use case version. | 
| issuingCountry | Three letter code identifying the issuing state or organization. | 
| message | The message field contains the actual data as a JSONObject. | 
| signatureAlg | The signature algorithm used to produce the signature. ECDSA scheme. | 
| signature | The binary data of the verified digital signature. | 
| certificate | The binary data of the signer certificate. | 
| certificateChain | The сertificate chain, used for the digital signature verification. | 
| notifications | The list of remarks occured during the scanning procedure. | 
Transaction Info
The TransactionInfo class contains the following parameters:
transactionInfo
└── tag
└── transactionId
└── sessionLogFolder
| Parameter | Description | 
|---|---|
| tag | Manually configured, randomly generated identifier of the concrete user journey. Can be any unique string. For details, see Configure Online License Transactions on Mobile. | 
| transactionId | Automatically generated, unique string identifier of the online transaction. | 
| sessionLogFolder | Unique path to logs' folder for the current session. The value is available only after saving logs. |