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";
  • Change the measure system:
DocReader.shared.processParams.measureSystem = MeasureSystem.metric
[RGLDocReader shared].processParams.measureSystem = RGLMeasureSystemMetric;
  • 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. If the fieldTypesFilter is empty, all fields are extracted:


This filter is not applicable to the MRZ.

DocReader.shared.processParams.fieldTypesFilter = [FieldType.ft_Date_of_Expiry.rawValue as NSNumber]
[RGLDocReader shared].processParams.fieldTypesFilter = @[@(RGLFieldTypeFt_Date_of_Expiry)];
  • In case the required fields are not read, their values are returned as empty:
DocReader.shared.processParams.checkRequiredTextFields = true
[RGLDocReader shared].processParams.checkRequiredTextFields = @YES;
  • Set the parameter to send the original (uncropped) image to Core for processing:
DocReader.shared.processParams.returnUncroppedImage = true
[RGLDocReader shared].processParams.returnUncroppedImage = @YES;
  • 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;
  • Return an image with a cropped barcode:
DocReader.shared.processParams.returnCroppedBarcode = true
[RGLDocReader shared].processParams.returnCroppedBarcode = @YES;
  • Specify the types of results to return:
DocReader.shared.processParams.resultTypeOutput = [ResultType.mrzOCRExtended.rawValue as NSNumber, ResultType.visualOCRExtended.rawValue as NSNumber]
  • 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
  • Set the maximum DPI for an output image (if set to zero, the image is not resized):
DocReader.shared.processParams.imageDpiOutMax = 300
  • Do not crop graphic fields from a document image:
DocReader.shared.processParams.noGraphics = true
  • 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
  • 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
  • Shift the date of expiry into the future or past for the specified number of months:
DocReader.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
  • Specify the minimal age of the document holder (in years):
DocReader.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

Next Steps