Custom settings
This page covers the description of custom settings

Contents

Process Params

Document processing

Multipage processing

Multipage processing allows to read more than one page. Turn on/off multipage:
1
DocumentReader.setConfig({
2
processParams: {
3
multipageProcessing: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
If multipage processing is enabled, the SDK processes the front side of the document recognizes document type and checks in the database how many pages are available for this document. If there are any child documents (second page, back side) for this document type, multipage processing is triggered. It concerns scenarios which recognize document type.
The only exception is MrzAndLocate and Locate scenarios. In this case, if SDK detects an ID1-sized document, it will ask for the second page. Multi-page processing is not triggered for documents of other formats.

Double-page spread processing

Allows to process up to two pages of the document (so-called "a double-page spread") for one-shot if they are presented on the frame (image):
This option is available for the following scenarios: DocType, Ocr, FullProcess, MrzOrBarcodeOrOcr, MrzOrOcr, LocateVisual_And_MrzOrOcr.
1
DocumentReader.setConfig({
2
processParams: {
3
doublePageSpread: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Authenticity

Allows you to define whether a document's holograms have to be checked:
1
DocumentReader.setConfig({
2
processParams: {
3
checkHologram: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Timeouts

Allows you to set the time limit for document recognition (in seconds), beyond which the recognition does not continue regardless of its result. The countdown starts from the moment the scenario starts:
1
DocumentReader.setConfig({
2
processParams: {
3
timeout: 20.0
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows you to set the time limit for document recognition (in seconds), beyond which the recognition does not continue regardless of its result. The countdown starts from the moment the document is detected:
1
DocumentReader.setConfig({
2
processParams: {
3
timeoutFromFirstDetect: 5.0
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows you to set the time limit for document recognition (in seconds), beyond which the recognition does not continue regardless of its result. The countdown starts from the moment the document type is recognized:
1
DocumentReader.setConfig({
2
processParams: {
3
timeoutFromFirstDocType: 3.0
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Display formats

You can change the format string of displayed dates in the results. Mask examples: "dd/mm/yyyy", "mm/dd/yyyy", "dd-mm-yyyy", "mm-dd-yyyy", "dd/mm/yy":
1
DocumentReader.setConfig({
2
processParams: {
3
dateFormat: "dd-mm-yy"
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
If you want to change the measure system, use one of the RGLMeasureSystem members:
1
DocumentReader.setConfig({
2
processParams: {
3
measureSystem: DocumentReader.Enum.RGLMeasureSystem.METRIC
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Logs

If set, Core logs will be written to the console:
1
DocumentReader.setConfig({
2
processParams: {
3
logs: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
If set, deep logs will be saved (in case of reading problems). Turn on/off logs saving:
1
DocumentReader.setConfig({
2
processParams: {
3
debugSaveLogs: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
If set, input images will be saved (in case of reading problems). Turn on/off images saving:
1
DocumentReader.setConfig({
2
processParams: {
3
debugSaveImages: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
If set, input images will be cropped and saved. Turn on/off image saving:
1
DocumentReader.setConfig({
2
processParams: {
3
debugSaveCroppedImages: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows to save RFID session data to the file in binary format:
1
DocumentReader.setConfig({
2
processParams: {
3
debugSaveRFIDSession: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Scenario

Set proper scenario. You can find information of how to get available scenarios here:
1
DocumentReader.setConfig({
2
processParams: {
3
scenario: "Barcode"
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
You can assign a scenario to the Capture button. This scenario will be used if you press the button:
1
DocumentReader.setConfig({
2
processParams: {
3
captureButtonScenario: "Locate"
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Barcode types

Set the types of barcodes that you wish to process:
1
DocumentReader.setConfig({
2
processParams: {
3
barcodeTypes: [DocumentReader.Enum.BarcodeType.PDF417, DocumentReader.Enum.BarcodeType.QRCODE]
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
There are documents that contain barcodes which data can be parsed only if document type verification is performed. The following property allows setting the barcode parser type which should be used during recognition. It allows parsing barcode data without performing document type verification:
1
DocumentReader.setConfig({
2
processParams: {
3
barcodeParserType: 123
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Filters

Set the list of the document ID's to process. All documents will be processed, if empty:
1
DocumentReader.setConfig({
2
processParams: {
3
documentIDList: [-274257313, -2004898043]
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
If you read document which contains MRZ, all fields will be extracted. If you read document with OCR, you can set the list of field types that you wish to extract, other fields will be skipped during processing. All fields will be extracted, if the fieldTypesFilter is empty:
1
DocumentReader.setConfig({
2
processParams: {
3
fieldTypesFilter: [DocumentReader.Enum.eVisualFieldType.FT_DATE_OF_EXPIRY]
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
If set, in case required fields are not read, their values will be empty:
1
DocumentReader.setConfig({
2
processParams: {
3
checkRequiredTextFields: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Detection

If you enable this parameter, document focus check will be omitted:
1
DocumentReader.setConfig({
2
processParams: {
3
disableFocusingCheck: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows you to set the maximum value of the deviation of the corners of the document from the value of 90 degrees:
1
DocumentReader.setConfig({
2
processParams: {
3
perspectiveAngle: 5
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Output images

If set, an original (uncropped) image will be received, which is sent to Core for processing:
1
DocumentReader.setConfig({
2
processParams: {
3
returnUncroppedImage: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows to build an integral image, taking into account the quality of fixation of each of the individual images:
1
DocumentReader.setConfig({
2
processParams: {
3
integralImage: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows you to set the minimum acceptable DPI value:
1
DocumentReader.setConfig({
2
processParams: {
3
minDPI: 100
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
If set, an image with cropped barcode will be returned:
1
DocumentReader.setConfig({
2
processParams: {
3
returnCroppedBarcode: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Custom params

Allows to transfer custom JSON to Core, which should be processed:
1
DocumentReader.setConfig({
2
processParams: {
3
customParams: { "dePersonalize": [{ "allTextFields": true }, { "allGraphicFields": true }] }
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Bounds

Allows you to manually set the document's bounds:
1
DocumentReader.setConfig({
2
processParams: {
3
manualCrop: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Functionality

Camera Frame

Set this setting to override default cropping frame on camera activity provided by scenario using one of DocReaderFrame members:
1
DocumentReader.setConfig({
2
functionality: {
3
cameraFrame: DocumentReader.Enum.DocReaderFrame.MAX
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Frame is cropped by camera frame. If you set the camera frame to full screen, Core will crop frame by phone borders. Using this setting may lead to lower performance because of huge frame size. Any changes which are connected with camera frame alter scanning process. You can also set the camera frame width.

Buttons

Show/hide torch button:
1
DocumentReader.setConfig({
2
functionality: {
3
showTorchButton: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Show/hide close button:
1
DocumentReader.setConfig({
2
functionality: {
3
showCloseButton: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
You can close camera view manually using stopScanner().
Capture allows to take picture and process as a single frame. Show/hide capture button:
1
DocumentReader.setConfig({
2
functionality: {
3
showCaptureButton: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
You can set the time interval when Capture button should be displayed after the document is detected. 5 seconds is used by default:
1
DocumentReader.setConfig({
2
functionality: {
3
showCaptureButtonDelayFromDetect: 5
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
To use this setting you should enable the ShowCaptureButton parameter.
You can set the time interval when Capture button should be displayed after the scanning process is started. 10 seconds is used by default:
1
DocumentReader.setConfig({
2
functionality: {
3
showCaptureButtonDelayFromStart: 10
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
To use this setting you should enable the ShowCaptureButton parameter.
If set, frame expanding button will be shown on video capture screen. Show/hide change frame button:
1
DocumentReader.setConfig({
2
functionality: {
3
showChangeFrameButton: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Show/hide skip next page button:
1
DocumentReader.setConfig({
2
functionality: {
3
showSkipNextPageButton: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Show/hide the button for switching between cameras during processing:
1
DocumentReader.setConfig({
2
functionality: {
3
showCameraSwitchButton: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows you to disable all validations of having a torch in case Android returns that it's not available, but it can be used when checks are skipped:
Please use this setting at your own risk as the end app may crash.
1
DocumentReader.setConfig({
2
functionality: {
3
isCameraTorchCheckDisabled: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Detection

Document Reader will receive data from Motion Sensor and pause scanning when device is moving. Turn on/off video capture motion control:
1
DocumentReader.setConfig({
2
functionality: {
3
videoCaptureMotionControl: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
If set, scanning will be paused while camera is focusing (it can decrease camera processing speed):
1
DocumentReader.setConfig({
2
functionality: {
3
skipFocusingFrames: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Orientation

Defines orientation of activities:
1
DocumentReader.setConfig({
2
functionality: {
3
orientation: window.cordova.platformId === 'ios' ? DocumentReader.Enum.UIInterfaceOrientationMask.Portrait : DocumentReader.Enum.DocReaderOrientation.PORTRAIT
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Make sure that selected orientation corresponds to your application’s orientation. Otherwise, it may lead to unexpected behavior.

Scanning modes

Allows you to set the scanning mode:
1
DocumentReader.setConfig({
2
functionality: {
3
captureMode: DocumentReader.Enum.CaptureMode.CAPTURE_VIDEO
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
If set, as soon as document is located during video mode, picture will be taken and processed as single frame. It is used for devices with poor-quality video preview:
1
DocumentReader.setConfig({
2
functionality: {
3
pictureOnBoundsReady: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows you to control in the multipage processing mode:
Do not use multipageProcessing and this one at the same time.
1
DocumentReader.setConfig({
2
functionality: {
3
manualMultipageMode: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Video settings

Set the frame resolution, i.e. camera preview size:
Android
iOS
1
DocumentReader.setConfig({
2
functionality: {
3
cameraSize: { width: 1920, height: 1080 }
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
1
DocumentReader.setConfig({
2
functionality: {
3
videoSessionPreset: DocumentReader.Enum.AVCaptureSessionPreset.Hd1920x1080
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows you to set a camera API:
1
DocumentReader.setConfig({
2
functionality: {
3
cameraMode: DocumentReader.Enum.CameraMode.CAMERA2
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows you to set a list of devices that must not use the camera2 API:
1
DocumentReader.setConfig({
2
functionality: {
3
excludedCamera2Models: ["Redmi 6A"]
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
If set, allows you to adjust a zoom level using the pinch gesture (its range from 1x to 10x):
1
DocumentReader.setConfig({
2
functionality: {
3
isZoomEnabled: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows you to set the desired zoom level (its range from 1x to 10x):
1
DocumentReader.setConfig({
2
functionality: {
3
zoomFactor: 2.0
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows you to record the scanning process:
1
DocumentReader.setConfig({
2
functionality: {
3
recordScanningProcess: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Single Result

If set, the result will be displayed as soon as it is received:
1
DocumentReader.setConfig({
2
functionality: {
3
singleResult: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Capture Device Position

You can specify the position of a capture device for video session:
1
DocumentReader.setConfig({
2
functionality: {
3
cameraPosition: DocumentReader.Enum.AVCaptureDevicePosition.Back
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Extra info

If set, the metadata will be displayed over the camera preview during document processing, namely the perspective angle value:
1
DocumentReader.setConfig({
2
functionality: {
3
displayMetadata: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Customization

Camera Frame

Set thickness of document bounds border on the video preview (dp):
1
DocumentReader.setConfig({
2
customization: {
3
cameraFrameBorderWidth: 20
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Hex string of document bounds border color in default state:
1
DocumentReader.setConfig({
2
customization: {
3
cameraFrameDefaultColor: "#e02712"
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Hex string of document bounds border color in document detected state:
1
DocumentReader.setConfig({
2
customization: {
3
cameraFrameActiveColor: "#3812e0"
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Defines the shape of document bounds border. Use one of FrameShapeType members:
1
DocumentReader.setConfig({
2
customization: {
3
cameraFrameShapeType: DocumentReader.Enum.FrameShapeType.CORNER
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Defines the length (dp) of the corner side in shape modeFrameShapeType.Corner:
1
DocumentReader.setConfig({
2
customization: {
3
cameraFrameLineLength: 20
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Frame is cropped by camera frame. Any changes with camera frame may alter scanning process. You can change the default camera frame view, even remove it. Discover Functionality page to find out how to do it.
Allows to change the corners' radius of the camera frame:
1
DocumentReader.setConfig({
2
customization: {
3
cameraFrameCornerRadius: 20
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows to customize the beginning and ending of stroked lines of the camera frame:
1
DocumentReader.setConfig({
2
customization: {
3
cameraFrameLineCap: DocumentReader.Enum.LineCap.Round
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows to specify the offsetWidth for the camera frame (only for the portrait orientation):
1
DocumentReader.setConfig({
2
customization: {
3
cameraFrameOffsetWidth: 50
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows to change the aspect ratio of the camera frame for portrait mode:
1
DocumentReader.setConfig({
2
customization: {
3
cameraFramePortraitAspectRatio: 1.0
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows to change the aspect ratio of the camera frame for landscape mode:
1
DocumentReader.setConfig({
2
customization: {
3
cameraFrameLandscapeAspectRatio: 1.0
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows to change the position of the camera frame vertically:
1
DocumentReader.setConfig({
2
customization: {
3
cameraFrameVerticalPositionMultiplier: 0.5
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Buttons

Allows to change the Torch button's icon for both ON and OFF states:
1
DocumentReader.setConfig({
2
customization: {
3
torchButtonOnImage: "Base64String", //For the ON state
4
torchButtonOffImage: "Base64String" // For the OFF state
5
},
6
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows to change the Close button's icon:
1
DocumentReader.setConfig({
2
customization: {
3
closeButtonImage: "Base64String"
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows to change the Capture button's icon:
1
DocumentReader.setConfig({
2
customization: {
3
captureButtonImage: "Base64String"
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows to change the Change Frame button's icon for both ON and OFF states:
1
DocumentReader.setConfig({
2
customization: {
3
changeFrameButtonExpandImage: "Base64String", //For the ON state
4
changeFrameButtonCollapseImage: "Base64String" // For the OFF state
5
},
6
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows to change the Camera Switch button's icon:
1
DocumentReader.setConfig({
2
customization: {
3
cameraSwitchButtonImage: "Base64String"
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows you to change the size of the toolbar (the area where the buttons are located):
1
DocumentReader.setConfig({
2
customization: {
3
toolbarSize: 46.0
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!

Status Message

Set a status message next to the frame:
1
DocumentReader.setConfig({
2
customization: {
3
status: "Hello"
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Turn on/off status message:
1
DocumentReader.setConfig({
2
customization: {
3
showStatusMessages: true
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Set the text font for the status message, so-called hint message:
1
DocumentReader.setConfig({
2
customization: {
3
statusTextFont: "Avenir-HeavyOblique"
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Set a font style to the status message:
1
DocumentReader.setConfig({
2
customization: {
3
statusTextFontStyle: DocumentReader.Enum.FontStyle.BOLD
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Make sure that statusTextFont is set, otherwise the default value is used.
Size of main text status (sp):
1
DocumentReader.setConfig({
2
customization: {
3
statusTextSize: 16
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Hex string of main text status color:
1
DocumentReader.setConfig({
2
customization: {
3
statusTextColor: "#e02712"
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Hex string of current text status background color:
1
DocumentReader.setConfig({
2
customization: {
3
statusBackgroundColor: "#32a852"
4
},
5
}, function (m) { }, function (e) { console.log(e); });
Copied!
Allows you to change the location of the status. 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, i.e. (800 / 2) * 0.5 = 200 px. If multiplier is equal to 1, the message will be centered. If multiplier is equal to zero, default location will be used:
1
DocumentReader.setConfig({
2
customization: {