MRZ Result
Defined in framework ScanditIdCapture
- MrzResult
open class MrzResult : NSObject
Added in version 6.5.0
This class represents data extracted from a Machine Readable Zone (MRZ). It consolidates information from MRZs that comply with the Machine Readable Travel Documents ICAO standard, as well as various MRZ-like formats supported by the library. Some properties may not apply to certain document types and will be set to nil if the corresponding data is not encoded in the MRZ. For a complete list of supported MRZ types, refer to supported documents.
- The ID Capture mode supports all versions of Machine Readable Travel Documents (MRTD) specified by the International Civil Aviation Organization (ICAO).
The ICAO specifies four types of MRTDs:
TD1 - ID cards (id cards)
TD2 - other official travel documents (other official travel documents)
TD3/MRP - passports (passports)
MRV (A & B type) - visas (visas)
In addition, the ID Capture mode supports the following non-ICAO standards:
SwissDL - Swiss driving license (Swiss driving license)
TD2/FrenchID - French ID (French identity card)
Use the following regex pattern to filter out MRTD codes:
Type
Regex
TD1 Regex Pattern
([A-Z0-9<]{30}\n?){3}
TD2 Regex Pattern
([A-Z0-9<]{36}\n?){2}
TD2 French Regex Pattern
Same as TD2 Regex Pattern
TD3 Regex Pattern
([A-Z0-9<]{44}\n?){2}
MRV_A Regex Pattern
Same as TD2 Regex Pattern
MRV_B Regex Pattern
Same as TD3 Regex Pattern
Swiss Driving License Regex Pattern
[A-Z0-9<]{9}\n([A-Z0-9<]{30}\n?){2}
- documentCode
open var documentCode: String { get }
Added in version 6.5.0
The document type code. One of the following values:
P[passport type id] - indicates a passport,
ID - indicates an id card,
CA - indicates a Canada permanent resident card.
CP - indicates a Asia-Pacific Economic Cooperation Business Travel Card
CS - indicates an Exit-Entry Permit for Travelling to and from Hong Kong and Macau (往来港澳通行证);
CD - indicates an Exit-Entry Permit for Travelling to and from Taiwan (往来台灣通行证).
CR - indicates a Mainland Travel Permit for Hong Kong & Macau Residents.
CT - indicates a Mainland Travel Permit for Taiwan Residents.
- namesAreTruncated
open var namesAreTruncated:
Bool{ get }Added in version 6.5.0
Indicates whether first or last name is truncated. For more information please refer to the official specification.
- optionalDataInLine1
open var optionalDataInLine1: String? { get }
Added in version 7.6.0
Optional data field from line 1 of the MRZ, for use of the issuing country or the organization.
For TD-1 documents (such as ID cards), this contains the optional data from the first line. For other document types, this field may be null if no optional data is present on the first line.
If IdCaptureSettings.anonymizationMode is enabled for the field results, the returned value might be null for certain documents.
- optionalDataInLine2
open var optionalDataInLine2: String? { get }
Added in version 7.6.0
Optional data field from line 2 of the MRZ, for use of the issuing country or the organization.
If IdCaptureSettings.anonymizationMode is enabled for the field results, the returned value might be null for certain documents.
- capturedMrz
open var capturedMrz: String? { get }
Added in version 6.8.0
The full MRZ text as it appears on a document.
If IdCaptureSettings.anonymizationMode is enabled for the field results, the returned value might be null for certain documents.
- passportIssuerIso
open var passportIssuerIso: String? { get }
Added in version 7.0.0
The ISO code of the issuing jurisdiction.
- passportNumber
open var passportNumber: String? { get }
Added in version 7.0.0
The passport number of the document holder.
- passportDateOfExpiry
open var passportDateOfExpiry: DateResult? { get }
Added in version 7.0.0
The expiry date of the holder’s passport.
- personalIdNumber
open var personalIdNumber: String? { get }
Added in version 7.0.0
The personal ID Number of the document holder.
- renewalTimes
open var renewalTimes: NSNumber? { get }
Added in version 7.0.0
The number of times the document has been renewed.
- fullNameSimplifiedChinese
open var fullNameSimplifiedChinese: String? { get }
Added in version 7.0.0
The holder’s name in Simplified Chinese characters.
- omittedCharacterCountInGbkName
open var omittedCharacterCountInGbkName: NSNumber? { get }
Added in version 7.0.0
The number of Chinese characters omitted in in GBK (a character encoding for Simplified Chinese characters used in the People’s Republic of China) name.
- omittedNameCount
open var omittedNameCount: NSNumber? { get }
Added in version 7.0.0
The number of names that couldn’t be displayed in the MRZ.
- issuingAuthorityCode
open var issuingAuthorityCode: String? { get }
Added in version 7.0.0
The code of the authority that issued this document.
- firstName
open var firstName: String? { get }
Added in version 7.2.0
The first name of the document holder.
- lastName
open var lastName: String? { get }
Added in version 7.2.0
The last name of the document holder.
- fullName
open var fullName: String? { get }
Added in version 7.2.0
The full name of the document holder.
- dateOfBirth
open var dateOfBirth: DateResult? { get }
Added in version 7.2.0
The date of birth of the document holder.
- nationality
open var nationality: String? { get }
Added in version 7.2.0
The nationality of the document holder.
- address
open var address: String? { get }
Added in version 7.2.0
The address of the document holder.
- documentNumber
open var documentNumber: String? { get }
Added in version 7.2.0
The document number of the ID.
- dateOfExpiry
open var dateOfExpiry: DateResult? { get }
Added in version 7.2.0
The expiry date of the document.
- dateOfIssue
open var dateOfIssue: DateResult? { get }
Added in version 7.2.0
The issue date of the document.