Error processing SSI file
LEADTOOLS Forms Recognition (Leadtools.Forms.Commands assembly)

Show in webframe

MRTDField Enumeration






Represents MRTD Field.
Syntax
public enum MRTDField : System.Enum 
'Declaration
 
Public Enum MRTDField 
   Inherits System.Enum
'Usage
 
Dim instance As MRTDField

            

            
public enum class MRTDField : public System.Enum 
Members
ValueMemberDescription
0x00000000TypeThe Type of the Document.
0x00000001DocumentCodeThe Code of the Document.
0x00000002DocumentNumberThe Number of the Document.
0x00000003PassportNumberThe Number of the Passport.
0x00000004IssuingStateThe Issuing State of the Document.
0x00000006LastNameThe Last name of the Document Holder.
0x00000006Name(0x00000005)The Name of the Document Holder.
0x00000007SexThe Sex of the Document Holder.
0x00000008NationalityThe Nationality of the Document Holder.
0x00000009DateOfBirthThe Date Of Birth for the Document Holder.
0x0000000ADateOfExpiryThe Date Of Expiry for the Document.
0x0000000BValidUntilDateValid Until Date for the Document.
0x0000000COptionalDataThe Optional Data for the Document.
0x0000000DOptionalData2The Optional Data for the Document(some documents has two optional Data).
0x0000000EIDCardNumberThe number of the Identification Card.
0x00000064PassportNumberCheckDigitThe Check Digit for Passport number.
0x00000065DocumentNumberCheckDigitThe Check Digit for the Document number.
0x00000066IDCardNumberCheckDigitThe Check Digit for the Id Card number.
0x00000067DateOfBirthCheckDigitThe Check Digit for the Date Of Birth.
0x00000068DateOfExpiryCheckDigitThe Check Digit for the Date Of Expiry.
0x00000069ValidUntilDateCheckDigitThe Check Digit for the "Valid Until Date" field.
0x0000006AOptionalDataCheckDigitThe Check Digit for Optional Data.
0x0000006BCompositeCheckDigitThe Composite Check Digit.
0x0000006COverallCheckDigitThe Overall Check Digit.
Remarks
MRTDField is used in MRTDDataElement to show the data element related field.
Example
Copy Code  
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.Forms
Imports Leadtools.Forms.Ocr
Imports Leadtools.Forms.Commands

<TestMethod>
Public Sub TestMRTDReader()
   ' Initialize the RasterCodecs class
   Dim codecs As New RasterCodecs()
   ' Initialize the BankCheckReader class
   Dim mrtdReader As New MRTDReader()

   ' The bank cheque image
   Dim chequePath As String = Path.Combine(LEAD_VARS.ImagesDir, "MRZ_SAMPLE.jpg")
   Dim image As RasterImage = codecs.Load(chequePath)

   Using ocrEngine As IOcrEngine = OcrEngineManager.CreateEngine(OcrEngineType.Advantage, False)
      ocrEngine.Startup(Nothing, Nothing, Nothing, "C:\LEADTOOLS 19\Bin\Common\OcrAdvantageRuntime")
      ' Assign Engine to Reader
      mrtdReader.OcrEngine = ocrEngine



      ' Process Image
      mrtdReader.ProcessImage(image)

      If mrtdReader.Errors = MRTDErrors.NoError Then
         For Each value As KeyValuePair(Of MRTDField, MRTDDataElement) In mrtdReader.Results
            Console.WriteLine(String.Format("Data Element Field: {0}", value.Key.ToString()))
            Console.WriteLine(String.Format("Data Element Value: {0}", value.Value.ReadableValue))
            Console.WriteLine(String.Format("Data Element Code : {0}", value.Value.MrzCharacters))
            Console.WriteLine(String.Format("Data Element Valid: {0}", value.Value.IsValid.ToString()))
            Console.WriteLine("************************************")
         Next
      End If
   End Using
End Sub

Public NotInheritable Class LEAD_VARS
Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Forms;
using Leadtools.Forms.Ocr;
using Leadtools.Forms.Commands;

[TestMethod]
public void TestMRTDReader()
{
   // Initialize the RasterCodecs class
   RasterCodecs codecs = new RasterCodecs();
   // Initialize the BankCheckReader class
   MRTDReader mrtdReader = new MRTDReader();

   // The bank cheque image
   string chequePath = Path.Combine(LEAD_VARS.ImagesDir, "MRZ_SAMPLE.jpg");
   RasterImage image = codecs.Load(chequePath);

   IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.Advantage, false);
   ocrEngine.Startup(codecs, null, null, LEAD_VARS.OcrAdvantageRuntimeDir);

   // Assign Engine to Reader
   mrtdReader.OcrEngine = ocrEngine;

   // Process Image
   mrtdReader.ProcessImage(image);

   if (mrtdReader.Errors == MRTDErrors.NoError)
   {
      foreach (var value in mrtdReader.Results)
      {
         Console.WriteLine(string.Format("Data Element Field: {0}", value.Key.ToString()));
         Console.WriteLine(string.Format("Data Element Value: {0}", value.Value.ReadableValue));
         Console.WriteLine(string.Format("Data Element Code : {0}", value.Value.MrzCharacters));
         Console.WriteLine(string.Format("Data Element Valid: {0}", value.Value.IsValid.ToString()));
         Console.WriteLine("************************************");
      }
   }

   ocrEngine.Shutdown();
}

static class LEAD_VARS
{
public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
}
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         Leadtools.Forms.Commands.MRTDField

Requirements

Target Platforms

See Also

Reference

Leadtools.Forms.Commands Namespace

Error processing SSI file
Leadtools.Forms.Commands requires a Document or Medical toolkit license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features