Skip to content

Output Data

  • You can change the format of dates displayed in the results. The mask examples are "dd/mm/yyyy", "mm/dd/yyyy", "dd-mm-yyyy", "mm-dd-yyyy", "dd/mm/yy":
DocReader.shared.processParams.dateFormat = "dd-mm-yyyy"
[RGLDocReader shared].processParams.dateFormat = @"dd-mm-yyyy";
DocumentReader.Instance().processParams().dateFormat = "dd-mm-yyyy"
DocumentReader.Instance().processParams().dateFormat = "dd-mm-yyyy";
DocumentReader.instance.processParams.dateFormat = "dd-mm-yyyy";
DocumentReader.setProcessParams({
    dateFormat: "dd-mm-yy",
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    dateFormat: "dd-mm-yy"
});
DocumentReader.setProcessParams({
    dateFormat: "dd-mm-yy",
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().DateFormat = "dd-mm-yy";

// iOS
RGLDocReader.Shared.ProcessParams.DateFormat = "dd-mm-yy";
  • Change the measure system:
DocReader.shared.processParams.measureSystem = MeasureSystem.metric
[RGLDocReader shared].processParams.measureSystem = RGLMeasureSystemMetric;
DocumentReader.Instance().processParams().measureSystem = RGLMeasureSystem.METRIC
DocumentReader.Instance().processParams().measureSystem = RGLMeasureSystem.METRIC;
DocumentReader.instance.processParams.measureSystem = MeasureSystem.METRIC;
DocumentReader.setProcessParams({
    measureSystem: Enum.RGLMeasureSystem.METRIC,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    measureSystem: Enum.RGLMeasureSystem.METRIC
});
DocumentReader.setProcessParams({
    measureSystem: DocumentReader.Enum.RGLMeasureSystem.METRIC,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().MeasureSystem = (Java.Lang.Integer)RGLMeasureSystem.Metric;

// iOS
RGLDocReader.Shared.ProcessParams.MeasureSystem = RGLMeasureSystem.Metric;
  • If a document contains Visual zone, you can set the list of field types to extract. In this case, other fields are skipped during the processing, i.e. document recognition becomes faster. This filter is not applicable to the MRZ, barcode or RFID. If the fieldTypesFilter is empty, all fields are extracted:
DocReader.shared.processParams.fieldTypesFilter = [FieldType.ft_Date_of_Expiry.rawValue as NSNumber]
[RGLDocReader shared].processParams.fieldTypesFilter = @[@(RGLFieldTypeFt_Date_of_Expiry)];
DocumentReader.Instance().processParams().fieldTypesFilter = intArrayOf(eVisualFieldType.FT_DATE_OF_EXPIRY)
DocumentReader.Instance().processParams().fieldTypesFilter = new int[]{eVisualFieldType.FT_DATE_OF_EXPIRY};
DocumentReader.instance.processParams.fieldTypesFilter = [
  FieldType.DATE_OF_EXPIRY
];
DocumentReader.setProcessParams({
    fieldTypesFilter: [Enum.eVisualFieldType.FT_DATE_OF_EXPIRY],
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    fieldTypesFilter: [Enum.eVisualFieldType.FT_DATE_OF_EXPIRY]
});
DocumentReader.setProcessParams({
    fieldTypesFilter: [Enum.eVisualFieldType.FT_DATE_OF_EXPIRY],
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().FieldTypesFilter = new int[] { EVisualFieldType.FtDateOfExpiry };

// iOS
RGLDocReader.Shared.ProcessParams.FieldTypesFilter = new NSNumber[] { (int)RGLFieldType.Date_of_Expiry };
  • The list of LCID types to ignore during the recognition. If empty, values with all LCID types will be extracted. Narrowing down the list can reduce processing time. Empty by default.
DocReader.shared.processParams.lcidIgnoreFilter = [LCID.lithuanian.rawValue as NSNumber]
[RGLDocReader shared].processParams.lcidIgnoreFilter = @[@(RGLLCIDLithuanian)];
DocumentReader.Instance().processParams().lcidIgnoreFilter = intArrayOf(LCID.LITHUANIAN)
DocumentReader.Instance().processParams().lcidIgnoreFilter = new int[]{LCID.LITHUANIAN};
DocumentReader.instance.processParams.lcidIgnoreFilter = [
  LCID.LITHUANIAN
];
DocumentReader.setProcessParams({
    lcidIgnoreFilter: [Enum.LCID.LITHUANIAN],
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    lcidIgnoreFilter: [Enum.LCID.LITHUANIAN]
});
DocumentReader.setProcessParams({
    lcidIgnoreFilter: [Enum.LCID.LITHUANIAN],
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().LcidIgnoreFilter = new int[] { LCID.Lithuanian };

// iOS
RGLDocReader.Shared.ProcessParams.LcidIgnoreFilter = new NSNumber[] { (int)RGLLCID.Lithuanian };
  • The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default.
DocReader.shared.processParams.lcidFilter = [LCID.lithuanian.rawValue as NSNumber]
[RGLDocReader shared].processParams.lcidFilter = @[@(RGLLCIDLithuanian)];
DocumentReader.Instance().processParams().lcidFilter = intArrayOf(LCID.LITHUANIAN)
DocumentReader.Instance().processParams().lcidFilter = new int[]{LCID.LITHUANIAN};
DocumentReader.instance.processParams.lcidFilter = [
  LCID.LITHUANIAN
];
DocumentReader.setProcessParams({
    lcidFilter: [Enum.LCID.LITHUANIAN],
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    lcidFilter: [Enum.LCID.LITHUANIAN]
});
DocumentReader.setProcessParams({
    lcidFilter: [Enum.LCID.LITHUANIAN],
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().LcidFilter = new int[] { LCID.Lithuanian };

// iOS
RGLDocReader.Shared.ProcessParams.LcidFilter = new NSNumber[] { (int)RGLLCID.Lithuanian };
  • In case the required fields are not read, their values are returned as empty:
DocReader.shared.processParams.checkRequiredTextFields = true
[RGLDocReader shared].processParams.checkRequiredTextFields = @YES;
DocumentReader.Instance().processParams().checkRequiredTextFields = true
DocumentReader.Instance().processParams().checkRequiredTextFields = true;
DocumentReader.instance.processParams.checkRequiredTextFields = true;
DocumentReader.setProcessParams({
    checkRequiredTextFields: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    checkRequiredTextFields: true
});
DocumentReader.setProcessParams({
    checkRequiredTextFields: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().checkRequiredTextFields = (Java.Lang.Boolean)true;

// iOS
RGLDocReader.Shared.ProcessParams.CheckRequiredTextFields = true;
  • Set the parameter to return the original (uncropped) image in the processing results:
DocReader.shared.processParams.returnUncroppedImage = true
[RGLDocReader shared].processParams.returnUncroppedImage = @YES;
DocumentReader.Instance().processParams().returnUncroppedImage = true
DocumentReader.Instance().processParams().returnUncroppedImage = true;
DocumentReader.instance.processParams.returnUncroppedImage = true;
DocumentReader.setProcessParams({
    returnUncroppedImage: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    returnUncroppedImage: true
});
DocumentReader.setProcessParams({
    returnUncroppedImage: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().ReturnUncroppedImage = (Java.Lang.Boolean)true;

// iOS
RGLDocReader.Shared.ProcessParams.ReturnUncroppedImage = true;
  • Build an integral image taking into account the quality of fixation of each of the individual images:
DocReader.shared.processParams.integralImage = true
[RGLDocReader shared].processParams.integralImage = @YES;
 DocumentReader.Instance().processParams().integralImage = true
DocumentReader.Instance().processParams().integralImage = true;
DocumentReader.instance.processParams.integralImage = true;
DocumentReader.setProcessParams({
    integralImage: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    integralImage: true
});
DocumentReader.setProcessParams({
    integralImage: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().IntegralImage = (Java.Lang.Boolean)true;

// iOS
RGLDocReader.Shared.ProcessParams.IntegralImage = true;
  • Return an image with a cropped barcode:
DocReader.shared.processParams.returnCroppedBarcode = true
[RGLDocReader shared].processParams.returnCroppedBarcode = @YES;
DocumentReader.Instance().processParams().returnCroppedBarcode = true
DocumentReader.Instance().processParams().returnCroppedBarcode = true;
DocumentReader.instance.processParams.returnCroppedBarcode = true;
DocumentReader.setProcessParams({
    returnCroppedBarcode: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    returnCroppedBarcode: true
});
DocumentReader.setProcessParams({
    returnCroppedBarcode: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().ReturnCroppedBarcode = (Java.Lang.Boolean)true;

// iOS
RGLDocReader.Shared.ProcessParams.ReturnCroppedBarcode = true;
  • Specify the types of results to return:
DocReader.shared.processParams.resultTypeOutput = [ResultType.mrzOCRExtended.rawValue as NSNumber, ResultType.visualOCRExtended.rawValue as NSNumber]
RGLDocReader.shared.processParams.resultTypeOutput = @[@(RGLResultTypeMrzOCRExtended), @(RGLResultTypeVisualOCRExtended)];
DocumentReader.Instance().processParams().resultTypeOutput = intArrayOf(
    eRPRM_ResultType.RPRM_RESULT_TYPE_MRZ_OCR_EXTENDED,
    eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED
)
DocumentReader.Instance().processParams().resultTypeOutput = new int[]{eRPRM_ResultType.RPRM_RESULT_TYPE_MRZ_OCR_EXTENDED, eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED};
DocumentReader.instance.processParams.resultTypeOutput = [
  ResultType.MRZ_OCR_EXTENDED,
  ResultType.VISUAL_OCR_EXTENDED
];
DocumentReader.setProcessParams({
    resultTypeOutput: [
        eRPRM_ResultType.RPRM_RESULT_TYPE_MRZ_OCR_EXTENDED,
        eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED
    ],
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    resultTypeOutput: [
        eRPRM_ResultType.RPRM_RESULT_TYPE_MRZ_OCR_EXTENDED,
        eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED
    ]
});
DocumentReader.setProcessParams({
    resultTypeOutput: [
        eRPRM_ResultType.RPRM_RESULT_TYPE_MRZ_OCR_EXTENDED,
        eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED
    ],
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().ResultTypeOutput = new int[] { ERPRM_ResultType.RprmResultTypeMrzOcrExtended, ERPRM_ResultType.RprmResultTypeVisualOcrExtended };

// iOS
RGLDocReader.Shared.ProcessParams.ResultTypeOutput = new NSNumber[] { (int)RGLResultType.MrzOCRExtended, (int)RGLResultType.VisualOCRExtended };
  • Return two aligned and straighten passport pages from an input image as if it was captured from the flatbed scanner:
DocReader.shared.processParams.generateDoublePageSpreadImage = true
RGLDocReader.shared.processParams.generateDoublePageSpreadImage = @YES;
DocumentReader.Instance().processParams().generateDoublePageSpreadImage = true
DocumentReader.Instance().processParams().generateDoublePageSpreadImage = true;
DocumentReader.instance.processParams.generateDoublePageSpreadImage = true;
DocumentReader.setProcessParams({
    generateDoublePageSpreadImage: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    generateDoublePageSpreadImage: true
});
DocumentReader.setProcessParams({
    generateDoublePageSpreadImage: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().GenerateDoublePageSpreadImage = (Java.Lang.Boolean)true;

// iOS
RGLDocReader.Shared.ProcessParams.GenerateDoublePageSpreadImage = true;
  • Set the maximum DPI for an output image (if set to zero, the image is not resized):
DocReader.shared.processParams.imageDpiOutMax = 300
RGLDocReader.shared.processParams.imageDpiOutMax = @300;
DocumentReader.Instance().processParams().imageDpiOutMax = 300
DocumentReader.Instance().processParams().imageDpiOutMax = 300;
DocumentReader.instance.processParams.imageDpiOutMax = 300;
DocumentReader.setProcessParams({
    imageDpiOutMax: 300,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    imageDpiOutMax: 300
});
DocumentReader.setProcessParams({
    imageDpiOutMax: 300,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().ImageDpiOutMax = (Java.Lang.Integer)300;

// iOS
RGLDocReader.Shared.ProcessParams.ImageDpiOutMax = 300;
  • Define the maximum height for the document image. The size of the result image will be reduced according to the indicated maximum height while the aspect ration of the image will be preserved:
DocReader.shared.processParams.imageOutputMaxHeight = 800
RGLDocReader.shared.processParams.imageOutputMaxHeight = @800;
DocumentReader.Instance().processParams().imageOutputMaxHeight = 200
DocumentReader.Instance().processParams().imageOutputMaxHeight = 200;
DocumentReader.instance.processParams.imageOutputMaxHeight = 200;
DocumentReader.setProcessParams({
    "imageOutputMaxHeight": 200
}, _ => { }, _ => { });
DocumentReader.setProcessParams({
    "imageOutputMaxHeight": 200
});
DocumentReader.setProcessParams({
    "imageOutputMaxHeight": 200
}, function (m) { }, function (e) { });
// Android
DocumentReader.Instance().ProcessParams().ImageOutputMaxHeight = (Java.Lang.Integer)200;

// iOS
RGLDocReader.Shared.ProcessParams.ImageOutputMaxHeight = 200;
  • Define the maximum width for the document image. The size of the result image will be reduced according to the indicated maximum height/width while the aspect ration of the image will be preserved:
DocReader.shared.processParams.imageOutputMaxWidth = 600
RGLDocReader.shared.processParams.imageOutputMaxWidth = @600;
DocumentReader.Instance().processParams().imageOutputMaxWidth = 300
DocumentReader.Instance().processParams().imageOutputMaxWidth = 300;
DocumentReader.instance.processParams.imageOutputMaxWidth = 300;
DocumentReader.setProcessParams({
    "imageOutputMaxWidth": 300
}, _ => { }, _ => { });
DocumentReader.setProcessParams({
    "imageOutputMaxWidth": 300
});
DocumentReader.setProcessParams({
    "imageOutputMaxWidth": 300
}, function (m) { }, function (e) { });
// Android
DocumentReader.Instance().ProcessParams().ImageOutputMaxWidth = (Java.Lang.Integer)300;

// iOS
RGLDocReader.Shared.ProcessParams.ImageOutputMaxWidth = 300;
  • Do not crop graphic fields from a document image (parameter has no effect in FullAuth processing scenario):
DocReader.shared.processParams.noGraphics = true
RGLDocReader.shared.processParams.noGraphics = @YES;
DocumentReader.Instance().processParams().noGraphics = true
DocumentReader.Instance().processParams().noGraphics = true;
DocumentReader.instance.processParams.noGraphics = true;
DocumentReader.setProcessParams({
    noGraphics: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    noGraphics: true
});
DocumentReader.setProcessParams({
    noGraphics: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().NoGraphics = (Java.Lang.Boolean)true;

// iOS
RGLDocReader.Shared.ProcessParams.NoGraphics = true;
  • Shift the date of expiry into the future or past for the specified number of months:
DocReader.shared.processParams.shiftExpiryDate = 1
RGLDocReader.shared.processParams.shiftExpiryDate = @1;
DocumentReader.Instance().processParams().shiftExpiryDate = 1
DocumentReader.Instance().processParams().shiftExpiryDate = 1;
DocumentReader.instance.processParams.shiftExpiryDate = 1;
DocumentReader.setProcessParams({
    shiftExpiryDate: 1,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    shiftExpiryDate: 1
});
DocumentReader.setProcessParams({
    shiftExpiryDate: 1,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().ShiftExpiryDate = (Java.Lang.Integer)1;

// iOS
RGLDocReader.Shared.ProcessParams.ShiftExpiryDate = 1;
  • Get the OCR validity failed if there is a glare over the text field on the image:
DocReader.shared.processParams.updateOCRValidityByGlare = true
RGLDocReader.shared.processParams.updateOCRValidityByGlare = @YES;
DocumentReader.Instance().processParams().updateOCRValidityByGlare = true
DocumentReader.Instance().processParams().updateOCRValidityByGlare = true;
DocumentReader.instance.processParams.updateOCRValidityByGlare = true;
DocumentReader.setProcessParams({
    updateOCRValidityByGlare: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    updateOCRValidityByGlare: true
});
DocumentReader.setProcessParams({
    updateOCRValidityByGlare: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().UpdateOCRValidityByGlare = (Java.Lang.Boolean)true;

// iOS
RGLDocReader.Shared.ProcessParams.UpdateOCRValidityByGlare = true;
  • Specify the minimal age of the document holder (in years):
DocReader.shared.processParams.minimalHolderAge = 18
RGLDocReader.shared.processParams.minimalHolderAge = @18;
DocumentReader.Instance().processParams().minimalHolderAge = 18
DocumentReader.Instance().processParams().minimalHolderAge = 18;
DocumentReader.instance.processParams.minimalHolderAge = 18;
DocumentReader.setProcessParams({
    minimalHolderAge: 18,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    minimalHolderAge: 18
});
DocumentReader.setProcessParams({
    minimalHolderAge: 18,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().MinimalHolderAge = (Java.Lang.Integer)18;

// iOS
RGLDocReader.Shared.ProcessParams.MinimalHolderAge = 18;
  • When set to true, the rawResults property of DocumentReaderResults will contain the encrypted containers of the scanning results that may be used for later reprocessing.
DocReader.shared.processParams.shouldReturnPackageForReprocess = true
RGLDocReader.shared.processParams.shouldReturnPackageForReprocess = @YES;
DocumentReader.Instance().processParams().shouldReturnPackageForReprocess = true
DocumentReader.Instance().processParams().shouldReturnPackageForReprocess = true;
DocumentReader.instance.processParams.shouldReturnPackageForReprocess = true;
DocumentReader.setProcessParams({
    shouldReturnPackageForReprocess: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    shouldReturnPackageForReprocess: true
});
DocumentReader.setProcessParams({
    shouldReturnPackageForReprocess: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().ShouldReturnPackageForReprocess = (Java.Lang.Boolean)true;

// iOS
RGLDocReader.Shared.ProcessParams.ShouldReturnPackageForReprocess = true;
  • There are documents that contain barcodes with data that can be parsed only if the document type verification is performed. Use the following property to set up the barcode parser type which should be used during the recognition. In this case, the barcode data will be parced without performing the document type verification:
DocReader.shared.processParams.barcodeParserType = 123
[RGLDocReader shared].processParams.barcodeParserType = @123;
DocumentReader.Instance().processParams().barcodeParserType = 123
DocumentReader.Instance().processParams().barcodeParserType = 123;
DocumentReader.instance.processParams.barcodeParserType = 123;
DocumentReader.setProcessParams({
    barcodeParserType: 123,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
    barcodeParserType: 123
});
DocumentReader.setProcessParams({
    barcodeParserType: 123,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().BarcodeParserType = (Java.Lang.Integer)123;

// iOS
RGLDocReader.Shared.ProcessParams.BarcodeParserType = 123;

Next Steps