Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# MrzHelper.decode Method

Module: MrzHelper

## Definition

Decodes an MRZ of a given type and returns the values of the various fields.

Python

    @staticmethod
    decode(text: str, type: MrzType) -> StringDict

Parameters

> `text` str
> in The input MRZ.
> `type` MrzType
> in The input MRZ type according to ICAO-9303 standard.

Returns

> StringDict
> A dictionary containing the fields and values decoded in the MRZ.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Dart

    static StringDict decode(String? text, MrzType type)

Parameters

> `text` String
> in The input MRZ.
> `type` MrzType
> in The input MRZ type according to ICAO-9303 standard.

Returns

> StringDict
> A dictionary containing the fields and values decoded in the MRZ.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

C#

    public static StringDict Decode(string text, MrzType type)

Parameters

> `text` string
> in The input MRZ.
> `type` MrzType
> in The input MRZ type according to ICAO-9303 standard.

Returns

> StringDict
> A dictionary containing the fields and values decoded in the MRZ.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Java

    public static StringDict decode(String text, MrzType type) throws DocumentException

Parameters

> `text` String
> in The input MRZ.
> `type` MrzType
> in The input MRZ type according to ICAO-9303 standard.

Returns

> StringDict
> A dictionary containing the fields and values decoded in the MRZ.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Swift

    public static func decode(text: String, type: MrzType) throws -> StringDict

Parameters

> `text` String
> in The input MRZ.
> `type` MrzType
> in The input MRZ type according to ICAO-9303 standard.

Returns

> StringDict
> A dictionary containing the fields and values decoded in the MRZ.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

C

    int id3DocumentMrzHelper_Decode (
        const char * text,
        id3DocumentMrzType eType,
        ID3_DOCUMENT_STRING_DICT hFields)

Parameters

> `text` const char *
> in The input MRZ.
> `eType` id3DocumentMrzType
> in The input MRZ type according to ICAO-9303 standard.
> `hFields` ID3_DOCUMENT_STRING_DICT
> out A dictionary containing the fields and values decoded in the MRZ.

Returns

> `int`
> An error code.
> See id3DocumentError file for the list of possible error codes.