---
description: This page covers the description of custom settings
---

# Custom settings

## Contents

* [Process Params](#process-params)
  * [Document processing](#document-processing)
    * [Multipage processing](#multipage-processing)
    * [Double-page spread processing](#double-page-spread-processing)
    * [Authenticity](#authenticity)
  * [Timeouts](#timeouts)
  * [Display formats](#display-formats)
  * [Logs](#logs)
  * [Scenario](#scenario)
  * [Barcode types](#barcode-types)
  * [Filters](#filters)
  * [Detection](#detection)
  * [Output images](#output-images)
  * [Custom params](#custom-params)
  * [Bounds](#bounds)
* [Functionality](#functionality)
  * [Camera Frame](#camera-frame)
  * [Buttons](#buttons)
  * [Detection](#detection-1)
  * [Orientation](#orientation)
  * [Scanning modes](#scanning-modes)
  * [Video settings](#video-settings)
  * [Single Result](#single-result)
  * [Capture Device Position](#capture-device-position)
  * [Extra info](#extra-info)
* [Customization](#customization)
  * [Camera Frame](#camera-frame-1)
  * [Buttons](#buttons-1)
  * [Status Message](#status-message)
  * [Result Status Message](#result-status-message)
  * [Custom Status Message](#custom-status-message)
  * [Animation](#animation)
  * [Visual Elements](#visual-elements)
  * [Skip Button](#skip-button)
  * [Loading Indicator](#loading-indicator)
  * [Background](#background)
* [RFID](#rfid)
* [Other](#other)
  * [Logs](#logs-1)
  * [Camera Session](#camera-session)

## Process Params

### Document processing

#### Multipage processing

Multipage processing allows to read more than one page. Turn on/off multipage:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        multipageProcessing: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

{% hint style="info" %}
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.
{% endhint %}

#### 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):

{% hint style="info" %}
This option is available for the following [scenarios](scenarios): DocType, Ocr, FullProcess, MrzOrBarcodeOrOcr, MrzOrOcr, LocateVisual\_And\_MrzOrOcr.
{% endhint %}

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        doublePageSpread: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

#### Authenticity

Allows you to define whether a document's holograms have to be checked:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        checkHologram: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### 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:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        timeout: 20.0
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

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:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        timeoutFromFirstDetect: 5.0
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

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:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        timeoutFromFirstDocType: 3.0
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### 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":

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        dateFormat: "dd-mm-yy"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

If you want to change the measure system, use one of the [`RGLMeasureSystem`](enumerations/rglmeasuresystem) members:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        measureSystem: Regula.DocumentReader.Enum.RGLMeasureSystem.METRIC
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Logs

If set, Core logs will be written to the console:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        logs: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

If set, deep logs will be saved (in case of reading problems). Turn on/off logs saving:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        debugSaveLogs: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

If set, input images will be saved (in case of reading problems). Turn on/off images saving:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        debugSaveImages: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

If set, input images will be cropped and saved. Turn on/off image saving:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        debugSaveCroppedImages: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows to save RFID session data to the file in binary format:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        debugSaveRFIDSession: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Scenario

Set proper scenario. You can find information of how to get available scenarios [here](scenarios):

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        scenario: "Barcode"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

You can assign a scenario to the _Capture button_. This scenario will be used if you press the button:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        captureButtonScenario: "Locate"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Barcode types

Set the types of [barcodes](enumerations/barcodetype) that you wish to process:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        barcodeTypes: [Regula.DocumentReader.Enum.BarcodeType.PDF417, Regula.DocumentReader.Enum.BarcodeType.QRCODE]
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

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:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        barcodeParserType: 123
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Filters

Set the [list of the document ID's](https://downloads.regulaforensics.com/work/SDK/doc/AllDocs/Documents%20List.xls) to process. All documents will be processed, if empty:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        documentIDList: [-274257313, -2004898043]
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

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](enumerations/evisualfieldtype) that you wish to extract, other fields will be skipped during processing. All fields will be extracted, if the _fieldTypesFilter_ is empty:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        fieldTypesFilter: [Regula.DocumentReader.Enum.eVisualFieldType.FT_DATE_OF_EXPIRY]
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

If set, in case required fields are not read, their values will be empty:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        checkRequiredTextFields: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Detection

If you enable this parameter, document focus check will be omitted:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        disableFocusingCheck: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows you to set the maximum value of the deviation of the corners of the document from the value of 90 degrees:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        perspectiveAngle: 5
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Output images

If set, an original (uncropped) image will be received, which is sent to Core for processing:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        returnUncroppedImage: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows to build an integral image, taking into account the quality of fixation of each of the individual images:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        integralImage: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows you to set the minimum acceptable DPI value:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        minDPI: 100
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

If set, an image with cropped barcode will be returned:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        returnCroppedBarcode: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Custom params

Allows to transfer custom JSON to Core, which should be processed:

```javascript
// allows you to depersonalize the document's data
Regula.DocumentReader.setConfig({
    processParams: {
        customParams: { "dePersonalize": [{ "allTextFields": true }, { "allGraphicFields": true }] }
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Bounds

Allows you to manually set the document's bounds:

```javascript
Regula.DocumentReader.setConfig({
    processParams: {
        manualCrop: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

## Functionality

### Camera Frame

![](https://img.regulaforensics.com/Screenshots/SDK-5.0/Huawei-P20-Pro-1.png)

Set this setting to override default cropping frame on camera activity provided by scenario using one of `DocReaderFrame` members:

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        cameraFrame: Regula.DocumentReader.Enum.DocReaderFrame.MAX
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

{% hint style="warning" %}
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](#camera-frame-1).
{% endhint %}

### Buttons

![](https://img.regulaforensics.com/Screenshots/SDK-5.0/iPhone-XS-Max-7.png)

Show/hide torch button:

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        showTorchButton: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Show/hide close button:

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        showCloseButton: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

{% hint style="info" %}
You can close camera view manually using _stopScanner()._
{% endhint %}

_Capture_ allows to take picture and process as a single frame. Show/hide _capture_ button:

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        showCaptureButton: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

You can set the time interval when _Capture button_ should be displayed after the document is detected. 5 seconds is used by default:

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        showCaptureButtonDelayFromDetect: 5
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

{% hint style="warning" %}
To use this setting you should enable the ShowCaptureButton parameter.
{% endhint %}

You can set the time interval when _Capture button_ should be displayed after the scanning process is started. 10 seconds is used by default:

```javascript
RegulaDocumentReader.setConfig({
    functionality: {
        showCaptureButtonDelayFromStart: 10
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

{% hint style="warning" %}
To use this setting you should enable the ShowCaptureButton parameter.
{% endhint %}

If set, frame expanding button will be shown on video capture screen. Show/hide change frame button:

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        showChangeFrameButton: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Show/hide skip next page button:

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        showSkipNextPageButton: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Show/hide the button for switching between cameras during processing:

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        showCameraSwitchButton: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

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:

{% hint style="danger" %}
Please use this setting at your own risk as the end app may crash.
{% endhint %}

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        isCameraTorchCheckDisabled: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Detection

Document Reader will receive data from Motion Sensor and pause scanning when device is moving. Turn on/off video capture motion control:

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        videoCaptureMotionControl: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

If set, scanning will be paused while camera is focusing (it can decrease camera processing speed):

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        skipFocusingFrames: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Orientation

Defines orientation of activities:

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        orientation: Platform.OS === 'ios' ? Regula.DocumentReader.Enum.UIInterfaceOrientationMask.Portrait : Regula.DocumentReader.Enum.DocReaderOrientation.PORTRAIT
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

{% hint style="danger" %}
Make sure that selected orientation corresponds to your application’s orientation. Otherwise, it may lead to unexpected behavior.
{% endhint %}

### Scanning modes

Allows you to set the scanning mode:

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        captureMode: Regula.DocumentReader.Enum.CaptureMode.CAPTURE_VIDEO
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

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:

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        pictureOnBoundsReady: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Video settings

Set the frame resolution, i.e. camera preview size:

{% tabs %}
{% tab title="Android" %}
```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        cameraSize: { width: 1920, height: 1080 }
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```
{% endtab %}

{% tab title="iOS" %}
```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        videoSessionPreset: Regula.DocumentReader.Enum.AVCaptureSessionPreset.Hd1920x1080
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```
{% endtab %}
{% endtabs %}

Allows you to set a camera API:

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        cameraMode: Regula.DocumentReader.Enum.CameraMode.CAMERA2
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows you to set a list of [devices](https://developer.android.com/reference/android/os/Build#MODEL) that must not use the [camera2 API](enumerations/cameramode):

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        excludedCamera2Models: ["Redmi 6A"]
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

If set, allows you to adjust a zoom level using the pinch gesture (its range from 1x to 10x):

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        isZoomEnabled: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows you to set the desired zoom level (its range from 1x to 10x):

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        zoomFactor: 2.0
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows you to record the scanning process:

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        recordScanningProcess: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Single Result

If set, the result will be displayed as soon as it is received:

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        singleResult: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Capture Device Position

You can specify the [position](enumerations/avcapturedeviceposition) of a capture device for video session:

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        cameraPosition: Regula.DocumentReader.Enum.AVCaptureDevicePosition.Front
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Extra info

If set, the metadata will be displayed over the camera preview during document processing, namely the [perspective angle value](#detection):

```javascript
Regula.DocumentReader.setConfig({
    functionality: {
        displayMetadata: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

## Customization

### Camera Frame

![](https://img.regulaforensics.com/Screenshots/SDK-5.0/Huawei-P20-Pro-1.png)

&#x20;Set thickness of document bounds border on the video preview (dp):

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        cameraFrameBorderWidth: 20
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Hex string of document bounds border color in default state:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        cameraFrameDefaultColor: "#e02712"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Hex string of document bounds border color in document detected state:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        cameraFrameActiveColor: "#3812e0"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Defines the shape of document bounds border. Use one of [`FrameShapeType`](enumerations/frameshapetype) members:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        cameraFrameShapeType: Regula.DocumentReader.Enum.FrameShapeType.CORNER
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Defines the length (dp) of the corner side in shape mode[`FrameShapeType.Corner`](enumerations/frameshapetype):

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        cameraFrameLineLength: 20
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

{% hint style="warning" %}
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](#camera-frame) page to find out how to do it.
{% endhint %}

Allows to change the corners' radius of the camera frame:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        cameraFrameCornerRadius: 20
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows to customize the beginning and ending of stroked lines of the camera frame:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        cameraFrameLineCap: Regula.DocumentReader.Enum.LineCap.Round
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows to specify the offsetWidth for the camera frame (only for the portrait orientation):

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        cameraFrameOffsetWidth: 50
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows to change the aspect ratio of the camera frame for portrait mode:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        cameraFramePortraitAspectRatio: 1.0
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows to change the aspect ratio of the camera frame for landscape mode:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        cameraFrameLandscapeAspectRatio: 1.0
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows to change the position of the camera frame vertically:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        cameraFrameVerticalPositionMultiplier: 0.5
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Buttons

![](https://img.regulaforensics.com/Screenshots/SDK-5.0/iPhone-XS-Max-7.png)

Allows to change the Torch button's icon for both ON and OFF states:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        torchButtonOnImage: "Base64String", //For the ON state
        torchButtonOffImage: "Base64String" // For the OFF state
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows to change the Close button's icon:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        closeButtonImage: "Base64String"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows to change the Capture button's icon:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        captureButtonImage: "Base64String"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows to change the Change Frame button's icon for both ON and OFF states:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        changeFrameButtonExpandImage: "Base64String", //For the ON state
        changeFrameButtonCollapseImage: "Base64String" // For the OFF state
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows to change the Camera Switch button's icon:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        cameraSwitchButtonImage: "Base64String"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows you to change the size of the toolbar (the area where the buttons are located):

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        toolbarSize: 46.0
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Status Message

![](https://img.regulaforensics.com/Screenshots/SDK-5.0/iPhone-XS-Max-2.png)

Set a status message next to the frame:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        status: "Hello"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Turn on/off status message:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        showStatusMessages: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Set the text font for the status message, so-called hint message:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        statusTextFont: "Avenir-HeavyOblique"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Set a font style to the status message:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        statusTextFontStyle: Regula.DocumentReader.Enum.FontStyle.BOLD
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

{% hint style="info" %}
Make sure that _statusTextFont_ is set, otherwise the default value is used.
{% endhint %}

Size of main text status (sp):

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        statusTextSize: 16
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Hex string of main text status color:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        statusTextColor: "#e02712"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

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:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        statusPositionMultiplier: 0.5
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Result Status Message

![](https://img.regulaforensics.com/Screenshots/SDK-5.0/Huawei-P20-Pro-4.png)

Set a result status message next to the frame:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        resultStatus: "Hello"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Turn on/off result status message:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        showResultStatusMessages: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Set the text font for the current status:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        resultStatusTextFont: "Avenir-HeavyOblique"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Set a font style to the result status message:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        resultStatusTextFontStyle: Regula.DocumentReader.Enum.FontStyle.BOLD
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

{% hint style="info" %}
Make sure that _resultStatusTextFont_ is set, otherwise the default value is used.
{% endhint %}

Set the size of current text status (sp):

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        resultStatusTextSize: 16
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Hex string of current text status color:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        resultStatusTextColor: "#e02712"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Hex string of current text status background color:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        resultStatusBackgroundColor: "#3812e0"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows you to change the location of the results 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:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        resultStatusPositionMultiplier: 0.5
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Custom Status Message

Allows to create a custom status:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        customLabelStatus: "Hello, world!"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows you to change the location of the custom 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:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        customStatusPositionMultiplier: 0.5
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Animation

![](https://img.regulaforensics.com/Screenshots/SDK-5.0/iPhone-XS-Max-8.png)

If set, animation showing how to position document will be displayed. Show/hide help animation:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        showHelpAnimation: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

You can set image for the help animation. If not set, default image will be used:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        helpAnimationImage: "Base64String"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

If set, expecting page turn animation will be shown. Turn on/off next page animation:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        showNextPageAnimation: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

You can set front image for the multipage animation. If not set, default image will be used:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        multipageAnimationFrontImage: "Base64String"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

You can set a back image for the multipage animation. If not set, default image will be used:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        multipageAnimationBackImage: "Base64String"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Visual Elements

![](https://img.regulaforensics.com/Screenshots/SDK-5.0/iPhone-XS-Max-6.png)

Hex string of visual elements color (one for all):

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        tintColor: "#e02712"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Skip Button

![](https://img.regulaforensics.com/Screenshots/SDK-5.0/iPhone-XS-Max-4.png)

Set the background color to the multipage button:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        multipageButtonBackgroundColor: "#e02712"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Loading Indicator

![](https://img.regulaforensics.com/Screenshots/SDK-5.0/Huawei-P20-Pro-8.png)

Hex string of loading indicator(s) color. You can see it if you press the capture button:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        activityIndicatorColor: "#3812e0"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

### Background

![](https://img.regulaforensics.com/Screenshots/SDK-5.0/Huawei-P20-Pro-9.png)

If set, background will be darkened around the document detection frame. Show/hide background mask:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        showBackgroundMask: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows to change the intensity of the background mask:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        backgroundMaskAlpha: 0.5
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

Allows to set image within [camera frame](#camera-frame-1):

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        borderBackgroundImage: "Base64String"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

#### iOS

Allows to change the content mode of image, which is located within [camera frame](#camera-frame-1), use one of `UIViewContentMode` members:

```javascript
Regula.DocumentReader.setConfig({
    customization: {
        borderBackgroundImageContentMode: Regula.DocumentReader.Enum.UIViewContentMode.ScaleAspectFit
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

## RFID

RFID-chip reading parameters:

```javascript
Regula.DocumentReader.setRfidScenario({
    mrz: accessKey,
    pacePasswordType: Regula.DocumentReader.Enum.eRFID_Password_Type.PPT_MRZ,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
```

## Other

### Logs

Allows you to get the path to the folder of the current session. Before using this, enable save [logs](#logs). Each new session provides different path:

```javascript
Regula.DocumentReader.getSessionLogFolder((str) => {
  console.log(str);
},
(error) => {
  console.log(error);
});
```

### Camera Session

If set, camera session will be paused as soon as the result is received:

```javascript
Regula.DocumentReader.setCameraSessionIsPaused(true, (str) => {
  console.log(str);
},
(error) => {
  console.log(error);
});
```
