Table of contents

DSMRZScanResult

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

Definition

Assembly: DynamsoftMRZScanner.xcframework

  • Objective-C
  • Swift
  1. @interface DSMRZScanResult : NSObject
    
  2. class MRZScanResult : NSObject
    

Properties

Property Type Description
data DSMRZData The parsed MRZ information.
resultStatus DSResultStatus The status of the result, which can be finished, canceled or exception.
errorCode NSInteger The error code should something go wrong during the MRZ scanning process.
errorString NSString * 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.

  • Objective-C
  • Swift
  1. @property (nonatomic, nullable, readonly) DSMRZData* data;
    
  2. var data: MRZData? {get}
    

resultStatus

The status of the result represented as an EnumResultStatus.

  • Objective-C
  • Swift
  1. @property (nonatomic, assign, readonly) DSResultStatus resultStatus;
    
  2. var resultStatus: ResultStatus {get}
    

Return Value

The status of the result, which can be finished, canceled or exception.

  • DSResultStatusFinished: The MRZ scanning is finished.
  • DSResultStatusCanceled: The MRZ scanning activity is closed before the process is finished.
  • DSResultStatusException: 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.

  • Objective-C
  • Swift
  1. @property (nonatomic, assign, readonly) NSInteger errorCode;
    
  2. var errorCode: Int { get }
    

errorString

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

  • Objective-C
  • Swift
  1. @property (nonatomic, assign, readonly) NSString * errorString;
    
  2. var errorString: String? { get }
    

Methods

Method Description
getPortraitImage Returns the captured portrait image.
getDocumentImage Returns the captured document image for the specified side.
getOriginalImage Returns the original frame image for the specified side.

getPortraitImage

Returns the captured portrait image, if available.

  • Objective-C
  • Swift
  1. - (nullable DSImageData *)getPortraitImage;
    
  2. func getPortraitImage() -> ImageData?
    

Return Value

An ImageData object containing the portrait image, or nil if no portrait was captured or returnPortraitImage was disabled in MRZScannerConfig.

getDocumentImage

Returns the captured document image for the specified side.

  • Objective-C
  • Swift
  1. - (nullable DSImageData *)getDocumentImage:(DSDocumentSide)side;
    
  2. func getDocumentImage(_ side: DocumentSide) -> ImageData?
    

Parameters

side: A DocumentSide value specifying which side of the document to retrieve. Use .mrz for the side containing the MRZ, or .opposite for the other side.

Return Value

An ImageData object containing the document image, or nil if the image was not captured or returnDocumentImage was disabled in MRZScannerConfig.

getOriginalImage

Returns the original full-frame image for the specified side.

  • Objective-C
  • Swift
  1. - (nullable DSImageData *)getOriginalImage:(DSDocumentSide)side;
    
  2. func getOriginalImage(_ side: DocumentSide) -> ImageData?
    

Parameters

side: A DocumentSide value specifying which side of the document to retrieve.

Return Value

An ImageData object containing the original frame image, or nil if the image was not captured or returnOriginalImage was disabled in MRZScannerConfig.

This page is compatible for: