Table of contents

MRZScanResult

MRZScanResult is a result class that contains the parsed MRZ information and the corresponding additional information.

Definition

Assembly: Dynamsoft.MRZScannerBundle.Maui

Namespace: Dynamsoft.MRZScannerBundle.Maui

class MRZScanResult

Properties

Property Type Description
Data MRZData? The parsed MRZ data.
ResultStatus EnumResultStatus The status of the result, which can be finished, canceled or exception.
ErrorCode int The error code should something go wrong during the MRZ scanning process.
ErrorString string? The error message associated with the error code should something go wrong during the MRZ scanning process.

Data

The parsed MRZ information as a MRZData object.

MRZData? Data { get; }

ResultStatus

The status of the result represented as an EnumResultStatus.

EnumResultStatus ResultStatus { get; }
  • Finished: The MRZ scanning is finished.
  • Canceled: The MRZ scanning activity is closed before the process is finished.
  • Exception: Failed to start MRZ scanning or an error occurs when scanning the MRZ.

ErrorCode

The error code should something go wrong during the MRZ scanning process.

int ErrorCode { get; }

ErrorString

The error message associated with the error code should something go wrong during the MRZ scanning process.

string? ErrorString { get; }

Methods

Method Description
GetPortraitImage Returns the detected portrait image.
GetDocumentImage Returns the cropped document image for the specified document side.
GetOriginalImage Returns the original full-frame image for the specified document side.

GetPortraitImage

Returns the detected portrait image extracted from the document.

ImageData? GetPortraitImage();

Return Value

An ImageData object containing the portrait image, or null if not available. Call .ToImageSource() on the result to convert it to a MAUI ImageSource.

Returns null in the following cases:

  • ReturnPortraitImage was set to false in MRZScannerConfig.
  • No portrait was detected in the document.

GetDocumentImage

Returns the cropped document image for the specified side of the document.

ImageData? GetDocumentImage(EnumDocumentSide documentSide);

Parameter(s)

documentSide: An EnumDocumentSide value specifying which side of the document to retrieve the image for.

Return Value

An ImageData object containing the cropped document image, or null if not available. Call .ToImageSource() on the result to convert it to a MAUI ImageSource.

Returns null in the following cases:

  • ReturnDocumentImage was set to false in MRZScannerConfig.
  • EnumDocumentSide.Opposite was requested but the document is single-sided (e.g. passports).
  • EnumDocumentSide.Opposite was requested but the opposite side could not be captured.

GetOriginalImage

Returns the original full-frame camera image for the specified side of the document. Disabled by default — enable by setting ReturnOriginalImage = true in MRZScannerConfig.

ImageData? GetOriginalImage(EnumDocumentSide documentSide);

Parameter(s)

documentSide: An EnumDocumentSide value specifying which side of the document to retrieve the image for.

Return Value

An ImageData object containing the original full-frame image, or null if not available. Call .ToImageSource() on the result to convert it to a MAUI ImageSource.

Returns null in the following cases:

  • ReturnOriginalImage was set to false in MRZScannerConfig (this is the default).
  • EnumDocumentSide.Opposite was requested but the document is single-sided (e.g. passports).
  • EnumDocumentSide.Opposite was requested but the opposite side could not be captured.

This page is compatible for: