Table of contents

MRZData

MRZData is a result class that contains the parsed MRZ information.

Definition

Assembly: Dynamsoft.MRZScannerBundle.Maui

Namespace: Dynamsoft.MRZScannerBundle.Maui

public class MRZData

Properties

Property Type Description
FirstName string The first name of the document holder.
LastName string The last name of the document holder.
Sex string The sex of the document holder.
IssuingState string The issuing state of the document.
IssuingStateRaw string The raw ICAO issuing state code as it appears in the MRZ.
Nationality string The nationality of the document holder.
NationalityRaw string The raw ICAO nationality code as it appears in the MRZ.
DateOfBirth string The date of birth of the document holder.
DateOfExpire string The expiry date of the document.
DocumentType string The type of MRZ document.
DocumentNumber string The document number.
PersonalNumber string The personal number, or an empty string if absent.
OptionalData1 string The first optional data field, or an empty string if absent.
OptionalData2 string The second optional data field, or an empty string if absent.
Age int The age of the document holder.
MrzText string The raw text of the MRZ.

FirstName

The first name of the document holder.

string FirstName { get; }

LastName

The last name of the document holder.

string LastName { get; }

Sex

The sex of the document holder. Can be empty when the MRZ leaves it unspecified.

string Sex { get; }

IssuingState

The issuing state of the document.

string IssuingState { get; }

IssuingStateRaw

The raw ICAO issuing state code as it appears in the MRZ (e.g. CAN, USA), before conversion to a full country name.

string IssuingStateRaw { get; }

Nationality

The nationality of the document holder.

string Nationality { get; }

NationalityRaw

The raw ICAO nationality code as it appears in the MRZ (e.g. CAN, USA), before conversion to a full country name.

string NationalityRaw { get; }

DateOfBirth

The date of birth of the document holder.

string DateOfBirth { get; }

DateOfExpire

The expiry date of the document.

string DateOfExpire { get; }

DocumentType

The type of MRZ document.

string DocumentType { get; }

DocumentNumber

The document number.

string DocumentNumber { get; }

PersonalNumber

The personal number, typically found on TD3 (passport) documents. An empty string if the document has none.

string PersonalNumber { get; }

OptionalData1

The first optional data field. Its content depends on the document type and issuing authority. An empty string if the document has none.

string OptionalData1 { get; }

OptionalData2

The second optional data field. Its content depends on the document type and issuing authority. An empty string if the document has none.

string OptionalData2 { get; }

Age

The age of the document holder.

int Age { get; }

MrzText

The raw text of the MRZ.

string MrzText { get; }

Methods

Method Description
GetFieldValidationStatus Returns the check-digit validation status of a parsed field.

GetFieldValidationStatus

Returns whether a parsed field matched its check digit. A field that fails is still returned by its property, so you can accept it, re-scan, or ask for a correction.

public EnumValidationStatus GetFieldValidationStatus(string fieldName);

Parameter(s)

fieldName: The field name in camelCase, as the native libraries use it:

fieldName Corresponding property
firstName FirstName
lastName LastName
sex Sex
issuingState IssuingState
nationality Nationality
dateOfBirth DateOfBirth
dateOfExpire DateOfExpire
documentNumber DocumentNumber
mrzText MrzText
optionalData1 OptionalData1
optionalData2 OptionalData2
personalNumber PersonalNumber

Return Value

VS_NONE (0) if the field has no validation, VS_SUCCEEDED (1) or VS_FAILED (2). An unrecognized name, including one in the wrong case such as "DateOfBirth", returns VS_NONE.

Remarks

  • EnumValidationStatus is in the Dynamsoft.CodeParser.Maui namespace, so add using Dynamsoft.CodeParser.Maui; to compare the result. See the EnumValidationStatus reference.
  • dateOfBirth, dateOfExpire and mrzText combine several MRZ fields and return the worst status among them.

This page is compatible for: