Skip to content

Custom settings

Learn all about the Document Reader SDK custom settings.

Process Params

Document Processing

Multipage Processing

Use the setting to process more than one page of a document for several iterations:

DocReader.shared.processParams.multipageProcessing = true
[RGLDocReader shared].processParams.multipageProcessing = @YES;


If the multipage processing is enabled, the SDK processes the front side of the document, recognizes the document type and checks in the database how many pages should be available for this document type. If there are any child documents (second page, back side) for this document type, the multipage processing is triggered. This concerns scenarios that recognize document types.

The only exception is the MrzAndLocate and Locate scenarios. In this case, if the SDK detects an ID1-sized document, it asks for the second page. The multipage processing is not triggered for documents of other formats.

Double-Page Spread Processing

Use the setting to process up to two pages of the document (a so-called "double-page spread") in one shot if they are presented on the frame (image):


This option is available for the following scenarios only: DocType, Ocr, FullProcess, MrzOrBarcodeOrOcr, MrzOrOcr, LocateVisual_And_MrzOrOcr.

DocReader.shared.processParams.doublePageSpread = true
[RGLDocReader shared].processParams.doublePageSpread = @YES;


Define whether to check the holograms:

DocReader.shared.processParams.checkHologram = true
[RGLDocReader shared].processParams.checkHologram = @YES;


Use the parameter to set the time limit (in seconds) for the document recognition, beyond which the recognition does not continue regardless of its result.

You can define the moment for the countdown to start.

  • Start the countdown from the moment the scenario starts:
DocReader.shared.processParams.timeout = 20
[RGLDocReader shared].processParams.timeout = @20;
  • Start the countdown from the moment the document is detected:
DocReader.shared.processParams.timeoutFromFirstDetect = 5
[RGLDocReader shared].processParams.timeoutFromFirstDetect = @5;
  • Start the countdown from the moment the document type is recognized:
DocReader.shared.processParams.timeoutFromFirstDocType = 3
[RGLDocReader shared].processParams.timeoutFromFirstDocType = @3;

Display Formats

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;


  • To write the Core logs in the console, invoke:
DocReader.shared.processParams.logs = true
[RGLDocReader shared].processParams.logs = @YES;
  • Turn on/off deep logs saving (in case of reading problems):
DocReader.shared.processParams.debugSaveLogs = true
[RGLDocReader shared].processParams.debugSaveLogs = @YES;
  • Turn on/off input images saving (in case of reading problems):
DocReader.shared.processParams.debugSaveImages = true
[RGLDocReader shared].processParams.debugSaveImages = @YES;
  • Turn on/off input images cropping and saving:
DocReader.shared.processParams.debugSaveCroppedImages = true
[RGLDocReader shared].processParams.debugSaveCroppedImages = @YES;
  • Save the RFID session data to the file in binary format:
DocReader.shared.processParams.debugSaveRFIDSession = true
[RGLDocReader shared].processParams.debugSaveRFIDSession = @YES;
  • Get the path to the folder of the current session. Before using this, save logs. Each new session provides a different path:
[RGLDocReader shared].processParams.sessionLogFolder
  • Remove personal information from logs:
DocReader.shared.processParams.depersonalizeLog = true
[RGLDocReader shared].processParams.depersonalizeLog = @YES;


  • To set a scenario, invoke:
DocReader.shared.processParams.scenario = RGL_SCENARIO_BARCODE
[RGLDocReader shared].processParams.scenario = RGL_SCENARIO_BARCODE;
  • You can assing a scenario that will be used upon tapping the Capture button:
DocReader.shared.processParams.captureButtonScenario = RGL_SCENARIO_LOCATE
[RGLDocReader shared].processParams.captureButtonScenario = RGL_SCENARIO_LOCATE;


To find information on how to get available scenarios, visit the Scenarios page.

Barcode Types

Set the types of barcodes to process:

DocReader.shared.processParams.barcodeTypes = [BarcodeType.QRCODE.rawValue as NSNumber, BarcodeType.AZTEC.rawValue as NSNumber]
[RGLDocReader shared].processParams.barcodeTypes = @[@(RGLBarcodeTypeQRCODE), @(RGLBarcodeTypeAZTEC)];

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;


DocReader.shared.processParams.documentIDList = [-274257313, -2004898043]
[RGLDocReader shared].processParams.documentIDList = @[@(-274257313), @(-2004898043)];
  • If a document contains MRZ, all fields are extracted.

  • If a document contains OCR, you can set the list of field types to extract. In this case, other fields are skipped during the processing.

  • 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)];
  • In case the required fields are not read, their values are returned as empty:
DocReader.shared.processParams.checkRequiredTextFields = true
[RGLDocReader shared].processParams.checkRequiredTextFields = @YES;


  • To omit the document focus check, enable the following parameter:
DocReader.shared.processParams.disableFocusingCheck = true
[RGLDocReader shared].processParams.disableFocusingCheck = @YES;
  • Set the maximum value of the deviation of the corners of the document from the 90 degrees value:
DocReader.shared.processParams.perspectiveAngle = 5
[RGLDocReader shared].processParams.perspectiveAngle = @5;

Output Images

  • 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;
  • Set the minimum acceptable DPI value:
DocReader.shared.processParams.minDPI = 100
[RGLDocReader shared].processParams.minDPI = @100;
  • Return an image with a cropped barcode:
DocReader.shared.processParams.returnCroppedBarcode = true
[RGLDocReader shared].processParams.returnCroppedBarcode = @YES;

Custom Params

Set a custom JSON that should be processed along with other process params:

// depersonalize the document's data
let data = [["allTextFields": true], ["allGraphicFields": true]]
DocReader.shared.processParams.customParams = ["dePersonalize": data]

// set the maximum DPI for an output image (if set to zero, the image is not resized):
DocReader.shared.processParams.customParams = ["imageDpiOutMax": 0]
// depersonalize the document's data
NSArray *data = @[@{@"allTextFields": @YES}, @{@"allGraphicFields": @YES}];
[RGLDocReader shared].processParams.customParams = @{@"dePersonalize": data};

// set the maximum DPI for an output image (if set to zero, the image is not resized):
[RGLDocReader shared].processParams.customParams = @{@"imageDpiOutMax": @0};


To manually set the document's bounds, invoke:

DocReader.shared.processParams.manualCrop = true
[RGLDocReader shared].processParams.manualCrop = @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
  • Set the following option to true if you know for sure that the image you provide contains an already cropped by edges document:
DocReader.shared.processParams.alreadyCropped = true
  • Use a specific template ID and skip the document type identification step:
DocReader.shared.processParams.forceDocID = 123
  • Ignore assumptions based on the field mask in the template:
DocReader.shared.processParams.matchTextFieldMask = true
  • Shorten the list of candidates to process during the document detection in a single image process mode. The option reduces the processing time for specific backgrounds:
DocReader.shared.processParams.fastDocDetect = true
  • Get the OCR validity failed if there is a glare over the text field on the image:
DocReader.shared.processParams.updateOCRValidityByGlare = true
  • Do not crop graphic fields from a document image:
DocReader.shared.processParams.noGraphics = true
  • Specify the minimal area of an image that a document should cover to be treated as a candidate when locating. The value should be in a range from 0 to 1, where 1 is for the document that fully covers the image:
DocReader.shared.processParams.documentAreaMin = 0.7
  • Shift the date of expiry into the future or past for the specified number of months:
DocReader.shared.processParams.shiftExpiryDate = 1
  • Specify the minimal age of the document holder (in years):
DocReader.shared.processParams.minimalHolderAge = 18
  • Guarantee that an output image contains the correct MRZ on it in the series process mode:
DocReader.shared.processParams.forceReadMrzBeforeLocate = true
  • Limit MRZ formats to be recognized by specifying them in array:
DocReader.shared.processParams.mrzFormatsFilter = [MRZFormat.ID2.rawValue as NSNumber, MRZFormat.ID1.rawValue as NSNumber]
  • Set the threshold for an actual document DPI below which the check fails:
DocReader.shared.processParams.imageQA.dpiThreshold = 150
  • Set the threshold for an actual document perspective angle above which the check fails:
DocReader.shared.processParams.imageQA.angleThreshold = 5
  • Disable the focus check for the image quality validation:
DocReader.shared.processParams.imageQA.focusCheck = true
  • Disable the glares check for the image quality validation:
DocReader.shared.processParams.imageQA.glaresCheck = true
  • Disable the colorness check for the image quality validation:
DocReader.shared.processParams.imageQA.colornessCheck = true
  • Disable the moire patterns check for the image quality validation:
DocReader.shared.processParams.imageQA.moireCheck = true
  • This option controls the quality checks that the image should pass to be considered a valid input during the scanning process.
DocReader.shared.processParams.imageQA.expectedPass = [.imageResolution, .imageGlares]
  • 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


Camera Frame

To override the default cropping frame on the camera activity provided by the scenario, set:

DocReader.shared.functionality.cameraFrame = DocReaderFrame.max
[RGLDocReader shared].functionality.cameraFrame = RGLDocReaderFrameMax;


A frame is cropped by the camera frame. If you set the camera frame to full screen, Core will crop the frame by phone borders. Note that using this setting may lead to lower performance because of the huge frame size. Any changes connected to the camera frame alter the scanning process. You can also set the camera frame width.


  • Show/hide the Torch icon:
DocReader.shared.functionality.showTorchButton = true
[RGLDocReader shared].functionality.showTorchButton = YES;
  • Show/hide the Close icon:
DocReader.shared.functionality.showCloseButton = true
[RGLDocReader shared].functionality.showCloseButton = YES;


You can close the camera view manually by using the DocReader.shared.stopScanner() function.

  • Tapping the Capture button enables taking a picture and processing it as a single frame.

Show/hide the Capture button:

DocReader.shared.functionality.showCaptureButton = true
[RGLDocReader shared].functionality.showCaptureButton = YES;
  • Set a time interval between the document detection moment and the Capture button appearance. By default, it is 5 seconds:
DocReader.shared.functionality.showCaptureButtonDelayFromDetect = 5
[RGLDocReader shared].functionality.showCaptureButtonDelayFromDetect = 5;


To use this setting, enable the showCaptureButton parameter.

  • Set a time interval between the scanning process start and the Capture button appearance. By default, it is 10 seconds:
DocReader.shared.functionality.showCaptureButtonDelayFromStart = 10
[RGLDocReader shared].functionality.showCaptureButtonDelayFromStart = 10;


To use this setting, enable the showCaptureButton parameter.

  • If Change Frame is set, the frame expanding button is shown on the video capture screen.

Show/hide the Change Frame icon:

DocReader.shared.functionality.showChangeFrameButton = true
[RGLDocReader shared].functionality.showChangeFrameButton = YES;
  • Show/hide the Skip Page button:
DocReader.shared.functionality.showSkipNextPageButton = true
[RGLDocReader shared].functionality.showSkipNextPageButton = YES;
  • Show/hide the Switch Camera button:
DocReader.shared.functionality.showCameraSwitchButton = true
[RGLDocReader shared].functionality.showCameraSwitchButton = YES;


The SDK receives data from a motion sensor and pauses scanning when a device is moving.

  • Turn on/off the video capture motion control:
DocReader.shared.functionality.videoCaptureMotionControl = true
[RGLDocReader shared].functionality.videoCaptureMotionControl = YES;
  • Pause scanning while a camera is focusing (may decrease the camera processing speed):
DocReader.shared.functionality.skipFocusingFrames = true
[RGLDocReader shared].functionality.skipFocusingFrames = YES;


Define the orientation of activities by using one of the UIInterfaceOrientationMask members:

DocReader.shared.functionality.orientation = UIInterfaceOrientationMask.portrait
[RGLDocReader shared].functionality.orientation = UIInterfaceOrientationMaskPortrait;


Make sure that the selected orientation corresponds to your application’s orientation. Otherwise, it may lead to unexpected behavior.

Scanning Modes

  • Set the scanning mode:
DocReader.shared.functionality.captureMode = CaptureMode.captureVideo
[RGLDocReader shared].functionality.captureMode = RGLCaptureModeCaptureVideo;
  • Control in the multipage processing mode:
DocReader.shared.functionality.manualMultipageMode = true

!!! warning Do not use multipageProcessing and this one at the same time.

Video Settings

DocReader.shared.functionality.videoSessionPreset = AVCaptureSession.Preset.hd1920x1080
[RGLDocReader shared].functionality.videoSessionPreset = AVCaptureSessionPreset1920x1080;
  • Adjust a zoom level using the pinch gesture (in a range from 1x to 10x):
DocReader.shared.functionality.isZoomEnabled = true
[RGLDocReader shared].functionality.isZoomEnabled = YES;
  • Set the zoom level (in a range from 1x to 10x):
DocReader.shared.functionality.zoomFactor = 2.0
[RGLDocReader shared].functionality.zoomFactor = 2.0;
  • Record the scanning process:


Make sure to conform to the RecordScanningProcessDelegate protocol.

DocReader.shared.functionality.recordScanningProcess = true
DocReader.shared.functionality.recordScanningProcessDelegate = self
[RGLDocReader shared].functionality.recordScanningProcess = YES;
[RGLDocReader shared].functionality.recordScanningProcessDelegate = self;

Single Result

Display the result as soon as it is received:

DocReader.shared.functionality.singleResult = true
[RGLDocReader shared].functionality.singleResult = YES;

Capture Device Position

Specify the position of a capture device for video sessions:

DocReader.shared.functionality.cameraPosition = AVCaptureDevice.Position.back
[RGLDocReader shared].functionality.cameraPosition = AVCaptureDevicePositionBack;

Extra Info

Display the metadata over the camera preview during the document processing, namely the perspective angle value:

DocReader.shared.functionality.showMetadataInfo = true
[RGLDocReader shared].functionality.showMetadataInfo = YES;


Camera Frame

  • Set the thickness of the document borders in the video preview (in dp):
DocReader.shared.customization.cameraFrameBorderWidth = 10
[RGLDocReader shared].customization.cameraFrameBorderWidth = 10;
  • Set the hex color code for the document borders in the default state:
DocReader.shared.customization.cameraFrameDefaultColor =
[RGLDocReader shared].customization.cameraFrameDefaultColor = [UIColor redColor];
  • Set the hex color code for the document border in the document detected state:
DocReader.shared.customization.cameraFrameActiveColor = UIColor.purple
[RGLDocReader shared].customization.cameraFrameActiveColor = [UIColor purpleColor];
  • Define the shape of document borders:
DocReader.shared.customization.cameraFrameShapeType = CameraFrameShapeType.corners
[RGLDocReader shared].customization.cameraFrameShapeType = RGLCameraFrameShapeTypeCorners;
  • Define the length of the corner side in the corners shape mode (in dp):
DocReader.shared.customization.cameraFrameLineLength = 25
[RGLDocReader shared].customization.cameraFrameLineLength = 25;


A frame is cropped by the camera frame. Any changes to the camera frame may alter the scanning process. You can change the default camera frame view or remove it. Refer to the Functionality page to find out how to do it.

  • Change the corners' radius of the camera frame:
DocReader.shared.customization.cameraFrameCornerRadius = 10
[RGLDocReader shared].customization.cameraFrameCornerRadius = 10;
  • Customize the beginning and ending of stroked lines of the camera frame:
DocReader.shared.customization.cameraFrameLineCap = CGLineCap.round
[RGLDocReader shared].customization.cameraFrameLineCap = kCGLineCapRound;
  • Specify the offsetWidth for the camera frame (only for the portrait orientation):
DocReader.shared.customization.cameraFrameOffsetWidth = 50
[RGLDocReader shared].customization.cameraFrameOffsetWidth = 50;
  • Change the aspect ratio of the camera frame for portrait mode:
DocReader.shared.customization.cameraFramePortraitAspectRatio = 1.0
[RGLDocReader shared].customization.cameraFramePortraitAspectRatio = 1.0;
  • Change the aspect ratio of the camera frame for landscape mode:
DocReader.shared.customization.cameraFrameLandscapeAspectRatio = 1.0
[RGLDocReader shared].customization.cameraFrameLandscapeAspectRatio = 1.0;
  • Change the position of the camera frame to vertical:
DocReader.shared.customization.cameraFrameVerticalPositionMultiplier = 0.5
[RGLDocReader shared].customization.cameraFrameVerticalPositionMultiplier = 0.5;


  • Change the Torch icon for both ON and OFF states:
// For the ON state
DocReader.shared.customization.torchButtonOnImage = UIImage(named: "icon")

// For the OFF state
DocReader.shared.customization.torchButtonOffImage = UIImage(named: "icon")
// For the ON state
[RGLDocReader shared].customization.torchButtonOnImage = [UIImage imageNamed:@"icon"];

// For the OFF state
[RGLDocReader shared].customization.torchButtonOffImage = [UIImage imageNamed:@"icon"];
  • Change the Close icon:
DocReader.shared.customization.closeButtonImage = UIImage(named: "icon")
[RGLDocReader shared].customization.closeButtonImage = [UIImage imageNamed:@"icon"];
  • Change the Capture icon:
DocReader.shared.customization.captureButtonImage = UIImage(named: "icon")
[RGLDocReader shared].customization.captureButtonImage = [UIImage imageNamed:@"icon"];
  • Change the Change Frame icon for both ON and OFF states:
// For the ON state
DocReader.shared.customization.changeFrameButtonExpandImage = UIImage(named: "icon")

// For the OFF state
DocReader.shared.customization.changeFrameButtonCollapseImage = UIImage(named: "icon")
// For the ON state
[RGLDocReader shared].customization.changeFrameButtonExpandImage = [UIImage imageNamed:@"icon"];

// For the OFF state
[RGLDocReader shared].customization.changeFrameButtonCollapseImage = [UIImage imageNamed:@"icon"];
  • Change the Camera Switch icon:
DocReader.shared.customization.cameraSwitchButtonImage = UIImage(named: "icon")
[RGLDocReader shared].customization.cameraSwitchButtonImage = [UIImage imageNamed:@"icon"];
  • Change the size of the toolbar (the area where the buttons are located):
DocReader.shared.customization.toolbarSize = 46.0
[RGLDocReader shared].customization.toolbarSize = 46.0;

Status Message

  • Set a status message next to the frame:
DocReader.shared.customization.status = "Hello"
[RGLDocReader shared].customization.status = @"Hello";
  • Turn on/off the status message:
DocReader.shared.customization.showStatusMessages = true
[RGLDocReader shared].customization.showStatusMessages = YES;
  • Set the text font for the status message:
DocReader.shared.customization.statusTextFont = UIFont.italicSystemFont(ofSize: 14)
[RGLDocReader shared].customization.statusTextFont = [UIFont italicSystemFontOfSize:14];
  • Set the hex color code for the main text status:
DocReader.shared.customization.statusTextColor =
[RGLDocReader shared].customization.statusTextColor = [UIColor redColor];
  • Set the hex color code for the current text status background:
DocReader.shared.customization.statusBackgroundColor =
[RGLDocReader shared].customization.statusBackgroundColor = [UIColor greenColor];
  • You can change the location of the status message. For example, if you set the multiplier to 0.5 and the number of pixels by vertical is equal to 800, your message will be centralized and located at 200 px from top, that is (800 / 2) * 0.5 = 200 px. If the multiplier is equal to 1, the message will be centered. If the multiplier is equal to zero, the default location will be used:
DocReader.shared.customization.statusPositionMultiplier = 0.5
[RGLDocReader shared].customization.statusPositionMultiplier = 0.5;

Result Status Message

  • Set a result status message next to the frame:
DocReader.shared.customization.resultStatus = "Hello"
[RGLDocReader shared].customization.resultStatus = @"Hello";
  • Turn the result status message on/off:
DocReader.shared.customization.showResultStatusMessages = true
[RGLDocReader shared].customization.showResultStatusMessages = YES;
  • Set the text font for the current status:
DocReader.shared.customization.resultStatusTextFont = UIFont.italicSystemFont(ofSize: 14)
[RGLDocReader shared].customization.resultStatusTextFont = [UIFont italicSystemFontOfSize:14];
  • Set the hex color code for the current text status:
DocReader.shared.customization.resultStatusTextColor = UIColor.purple
[RGLDocReader shared].customization.resultStatusTextColor = [UIColor purpleColor];
  • Set the hex color code for the current text status background:
DocReader.shared.customization.resultStatusBackgroundColor =
[RGLDocReader shared].customization.resultStatusBackgroundColor = [UIColor redColor];
  • You can change the location of the result status message. For example, if you set the multiplier to 0.5 and the number of pixels by vertical is equal to 800, your message will be centralized and located at 200 px from top, that is (800 / 2) * 0.5 = 200 px. If the multiplier is equal to 1, the message will be centered. If the multiplier is equal to zero, the default location will be used:
DocReader.shared.customization.resultStatusPositionMultiplier = 0.5
[RGLDocReader shared].customization.resultStatusPositionMultiplier = 0.5;

Custom Status Message

DocReader.shared.customization.customLabelStatus = NSAttributedString(string: "Hello, world!", attributes: [NSAttributedString.Key.foregroundColor:, NSAttributedString.Key.font: UIFont.italicSystemFont(ofSize: 18)])
[RGLDocReader shared].customization.customLabelStatus = [[NSAttributedString alloc] initWithString:@"Hello, world!" attributes:@{ NSForegroundColorAttributeName:[UIColor redColor], NSFontAttributeName:[UIFont italicSystemFontOfSize:18] }];
  • You can change the location of the custom status message. For example, if you set the multiplier to 0.5 and the number of pixels by vertical is equal to 800, your message will be centralized and located at 200 px from top, that is (800 / 2) * 0.5 = 200 px. If the multiplier is equal to 1, the message will be centered. If the multiplier is equal to zero, the default location will be used:
DocReader.shared.customization.customStatusPositionMultiplier = 1.0
[RGLDocReader shared].customization.customStatusPositionMultiplier = 1.0;


  • The SDK can show an animation to help position a document correctly.

Show/hide the help animation:

DocReader.shared.customization.showHelpAnimation = true
[RGLDocReader shared].customization.showHelpAnimation = YES;
  • You can add an image for the help animation. If not set, the default image is used:
DocReader.shared.customization.helpAnimationImage = UIImage(named: "icon")
[RGLDocReader shared].customization.helpAnimationImage = [UIImage imageNamed:@"icon"];
  • To change the content mode of the help animation image, use one of the UIView.ContentMode members:
DocReader.shared.customization.helpAnimationImageContentMode = UIView.ContentMode.scaleAspectFit
[RGLDocReader shared].customization.helpAnimationImageContentMode = UIViewContentModeScaleAspectFit;
  • The SDK can show an expecting page turn animation.

Turn on/off the expecting page turn animation:

DocReader.shared.customization.showNextPageAnimation = true
[RGLDocReader shared].customization.showNextPageAnimation = YES;
  • You can set a front image for the multipage animation. If not set, the default image is used:
DocReader.shared.customization.multipageAnimationFrontImage = UIImage(named: "icon")
[RGLDocReader shared].customization.multipageAnimationFrontImage = [UIImage imageNamed:@"icon"];
  • To change the content mode of the front image of the multipage animation, use one of the UIView.ContentMode members:
DocReader.shared.customization.multipageAnimationFrontImageContentMode = UIView.ContentMode.scaleAspectFit
[RGLDocReader shared].customization.multipageAnimationFrontImageContentMode = UIViewContentModeScaleAspectFit;
  • You can set a back image for the multipage animation. If not set, the default image is used:
DocReader.shared.customization.multipageAnimationBackImage = UIImage(named: "icon")
[RGLDocReader shared].customization.multipageAnimationBackImage = [UIImage imageNamed:@"icon"];
  • To change the content mode of the back image of the multipage animation, use one of the UIView.ContentMode members:
DocReader.shared.customization.multipageAnimationBackImageContentMode = UIView.ContentMode.scaleAspectFit
[RGLDocReader shared].customization.multipageAnimationBackImageContentMode = UIViewContentModeScaleAspectFit;

Visual Elements

Set the hex color code for the visual elements (one for all):

DocReader.shared.customization.tintColor =
[RGLDocReader shared].customization.tintColor = [UIColor redColor];

Skip Button

Set the hex color code for the Skip Page button background:

DocReader.shared.customization.multipageButtonBackgroundColor =
[RGLDocReader shared].customization.multipageButtonBackgroundColor = [UIColor redColor];

Loading Indicator

Set the hex color code for the loading indicator(s). You can see it if you tap the Capture button:

DocReader.shared.customization.activityIndicatorColor =
[RGLDocReader shared].customization.activityIndicatorColor = [UIColor redColor];


  • You can decide whether to darken the background around the document detection frame.

Show/hide the background mask:

DocReader.shared.customization.showBackgroundMask = true
[RGLDocReader shared].customization.showBackgroundMask = YES;
  • Change the intensity of the background mask:
DocReader.shared.customization.backgroundMaskAlpha = 0.3
[RGLDocReader shared].customization.backgroundMaskAlpha = 0.3;
DocReader.shared.customization.borderBackgroundImage = UIImage(named: "icon")
[RGLDocReader shared].customization.borderBackgroundImage = [UIImage imageNamed:@"icon"];
DocReader.shared.customization.borderBackgroundImageContentMode = UIView.ContentMode.scaleAspectFit
[RGLDocReader shared].customization.borderBackgroundImageContentMode = UIViewContentModeScaleAspectFit;

Hologram Animation

  • You can add an image for the hologram animation. If not set, the default image is used:
DocReader.shared.customization.hologramAnimationImage = UIImage(named: "icon")
[RGLDocReader shared].customization.hologramAnimationImage = [UIImage imageNamed:@"icon"];
  • To change the content mode of the hologram animation image, use one of the UIView.ContentMode members:
DocReader.shared.customization.hologramAnimationImageContentMode = UIView.ContentMode.scaleAspectFit
[RGLDocReader shared].customization.hologramAnimationImageContentMode = UIViewContentModeScaleAspectFit;
  • Change the vertical position of the hologram animation image:
DocReader.shared.customization.hologramAnimationPositionMultiplier = 0.5
[RGLDocReader shared].customization.hologramAnimationPositionMultiplier = 0.5;


  • The SDK can automatically change the scenario settings depending on the type and results obtained during the scanning of the last document. The default value is true:
DocReader.shared.rfidScenario.autoSettings = true
[RGLDocReader shared].rfidScenario.autoSettings = YES;
  • Set an authentication procedure type, which should be conducted if all the objective conditions are met:
DocReader.shared.rfidScenario.authProcType = RFIDAuthenticationProcedureType.advanced
[RGLDocReader shared].rfidScenario.authProcType = RGLRFIDSdkProfilerTypeDoc9303Edition2006;
  • Set a type of priority mechanism for organizing an SM-channel (Security Messaging is a mechanism of protected data exchanging):
DocReader.shared.rfidScenario.baseSMProcedure = RFIDAccessControlProcedureType.bac
[RGLDocReader shared].rfidScenario.baseSMProcedure = RGLRFIDAccessControlProcedureTypeBac;
  • Set a data access type for the PACE procedure:
DocReader.shared.rfidScenario.pacePasswordType = RFIDPasswordType.mrz
[RGLDocReader shared].rfidScenario.pacePasswordType = RGLRFIDPasswordTypeMrz;
  • Priority of using DS-certificates:
DocReader.shared.rfidScenario.pkdDSCertPriority = false
[RGLDocReader shared].rfidScenario.pkdDSCertPriority = NO;
  • Use of CSCA-certificates submitted by individual data files only:
DocReader.shared.rfidScenario.pkdUseExternalCSCA = false
[RGLDocReader shared].rfidScenario.pkdUseExternalCSCA = NO;
  • Level of trust to CSCA-certificates from PKD:
DocReader.shared.rfidScenario.trustedPKD = false
[RGLDocReader shared].rfidScenario.trustedPKD = NO;
  • Logical sign of passive authentication performance:
DocReader.shared.rfidScenario.passiveAuth = true
[RGLDocReader shared].rfidScenario.passiveAuth = YES;
  • Logical sign of a cancellation of an active authentication procedure (AA) after the successful performance of a chip authentication (CA) procedure:
DocReader.shared.rfidScenario.skipAA = false
[RGLDocReader shared].rfidScenario.skipAA = NO;
  • Select the type of logical data profiler to use with an electronic document:
DocReader.shared.rfidScenario.profilerType = RGLRFIDSdkProfilerTypeDoc9303Edition2006
[RGLDocReader shared].rfidScenario.profilerType = RGLRFIDSdkProfilerTypeDoc9303Edition2006;
  • Strict ISO protocol:
DocReader.shared.rfidScenario.strictProcessing = false
[RGLDocReader shared].rfidScenario.strictProcessing = NO;
  • Specify whether the ePassport must be read or not:
DocReader.shared.rfidScenario.readEPassport = true
[RGLDocReader shared].rfidScenario.readEPassport = YES;
  • Specify the data groups of the ePassport that must be read:
DocReader.shared.rfidScenario.ePassportDataGroups.dG1 = true
[RGLDocReader shared].rfidScenario.ePassportDataGroups.dG1 = YES;
  • Specify whether the eID must be read or not:
DocReader.shared.rfidScenario.readEID = false
[RGLDocReader shared].rfidScenario.readEID = NO;
  • Specify which data groups of the eID must be read:
DocReader.shared.rfidScenario.eIDDataGroups.dG1 = true
[RGLDocReader shared].rfidScenario.eIDDataGroups.dG1 = YES;
  • Specify whether the eDL must read or not:
DocReader.shared.rfidScenario.readEDL = true
[RGLDocReader shared].rfidScenario.readEDL = YES;
  • Specify which data groups of the eDL must be read:
DocReader.shared.rfidScenario.eDLDataGroups.dG1 = true
[RGLDocReader shared].rfidScenario.eDLDataGroups.dG1 = YES;


Camera Session

Pause the camera session as soon as the result is received:

DocReader.shared.isCameraSessionIsPaused = true
[RGLDocReader shared].cameraSessionIsPaused = YES;