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:

DocumentReader.Instance().processParams().multipageProcessing = true;
DocumentReader.Instance().processParams().multipageProcessing = true

Info

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. If there are any child documents (second page, back side) for this document type, the multipage processing is triggered. It concerns scenarios that recognize document types.

The only exception is 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):

Info

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

DocumentReader.Instance().processParams().doublePageSpread = true;
DocumentReader.Instance().processParams().doublePageSpread = true

Authenticity

Define whether to check the holograms:

DocumentReader.Instance().processParams().checkHologram = true;
DocumentReader.Instance().processParams().checkHologram = true

Timeouts

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:
DocumentReader.Instance().processParams().timeout = 20.0;
DocumentReader.Instance().processParams().timeout = 20.0
  • Start the countdown from the moment the document is detected:
DocumentReader.Instance().processParams().timeoutFromFirstDetect = 5.0;
DocumentReader.Instance().processParams().timeoutFromFirstDetect = 5.0
  • Start the countdown from the moment the document type is recognized:
DocumentReader.Instance().processParams().timeoutFromFirstDocType = 3.0;
DocumentReader.Instance().processParams().timeoutFromFirstDocType = 3.0

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"

DocumentReader.Instance().processParams().dateFormat = "dd-mm-yyyy";
DocumentReader.Instance().processParams().dateFormat = "dd-mm-yyyy"

To change the measure system, use one of the RGLMeasureSystem members:

DocumentReader.Instance().processParams().measureSystem = RGLMeasureSystem.METRIC;
DocumentReader.Instance().processParams().measureSystem = RGLMeasureSystem.METRIC

Logs

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

Scenario

  • To set a scenario, invoke:
DocumentReader.Instance().processParams().scenario = Scenario.SCENARIO_BARCODE;
DocumentReader.Instance().processParams().scenario = Scenario.SCENARIO_BARCODE

Info

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

  • You can assing a scenario that will be used upon tapping the Capture button:
DocumentReader.Instance().processParams().captureButtonScenario = Scenario.SCENARIO_LOCATE;
DocumentReader.Instance().processParams().captureButtonScenario = Scenario.SCENARIO_LOCATE

Barcode types

Set the types of barcodes to process:

DocumentReader.Instance().processParams().doBarcodes = new String[]{BarcodeType.valueOf(BarcodeType.PDF417), BarcodeType.valueOf(BarcodeType.QRCODE)};
DocumentReader.Instance().processParams().doBarcodes = arrayOf(BarcodeType.valueOf(BarcodeType.PDF417), BarcodeType.valueOf(BarcodeType.QRCODE))

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:

DocumentReader.Instance().processParams().barcodeParserType = 123;
DocumentReader.Instance().processParams().barcodeParserType = 123

Filters

DocumentReader.Instance().processParams().documentIDList = new int[]{-274257313, -2004898043};
DocumentReader.Instance().processParams().documentIDList = intArrayOf(-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:

DocumentReader.Instance().processParams().fieldTypesFilter = new int[]{eVisualFieldType.FT_DATE_OF_EXPIRY};
DocumentReader.Instance().processParams().fieldTypesFilter = intArrayOf(eVisualFieldType.FT_DATE_OF_EXPIRY)
  • In case the required fields are not read, their values are returned as empty:
DocumentReader.Instance().processParams().checkRequiredTextFields = true;
DocumentReader.Instance().processParams().checkRequiredTextFields = true

Detection

  • To omit the document focus check, enable the following parameter:
DocumentReader.Instance().processParams().disableFocusingCheck = false;
DocumentReader.Instance().processParams().disableFocusingCheck = false
  • Set the maximum value of the deviation of the corners of the document from the 90 degrees value:
DocumentReader.Instance().processParams().perspectiveAngle = 5;
DocumentReader.Instance().processParams().perspectiveAngle = 5

Output images

  • Set the parameter to send the original (uncropped) image to Core for processing:
DocumentReader.Instance().processParams().returnUncroppedImage = true;
DocumentReader.Instance().processParams().returnUncroppedImage = true
  • Build an integral image taking into account the quality of fixation of each of the individual images:
DocumentReader.Instance().processParams().integralImage = true;
 DocumentReader.Instance().processParams().integralImage = true
  • Set the minimum acceptable DPI value:
DocumentReader.Instance().processParams().minDPI = 100;
DocumentReader.Instance().processParams().minDPI = 100
  • Return an image with a cropped barcode:
DocumentReader.Instance().processParams().returnCroppedBarcode = true;
DocumentReader.Instance().processParams().returnCroppedBarcode = true

Custom params

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

// allows you to depersonalize the document's data
DocumentReader.Instance().processParams().customParams = new JSONObject("{\"dePersonalize\":[{\"allTextFields\":true},{\"allGraphicFields\":true}]}");

// allows you to set the maximum DPI for an output image (if set to zero, an image won't be resized):
DocumentReader.Instance().processParams().customParams = new JSONObject("{\"imageDpiOutMax\":0}");
// allows you to depersonalize the document's data
DocumentReader.Instance().processParams().customParams = JSONObject("{\"dePersonalize\":[{\"allTextFields\":true},{\"allGraphicFields\":true}]}")

// allows you to set the maximum DPI for an output image (if set to zero, an image won't be resized):
DocumentReader.Instance().processParams().customParams = JSONObject("{\"imageDpiOutMax\":0}")

Bounds

To manually set the document's bounds, invoke:

DocumentReader.Instance().processParams().manualCrop = true;
DocumentReader.Instance().processParams().manualCrop = true

Other

  • Specify the types of results to return:
DocumentReader.Instance().processParams().resultTypeOutput = new int[]{eRPRM_ResultType.RPRM_RESULT_TYPE_MRZ_OCR_EXTENDED, eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED};
  • Return two aligned and straighten passport pages from an input image as if it was captured from the flatbed scanner:
DocumentReader.Instance().processParams().generateDoublePageSpreadImage = true;
  • Set the maximum DPI for an output image (if set to zero, the image is not resized):
DocumentReader.Instance().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:
DocumentReader.Instance().processParams().alreadyCropped = true;
  • Use a specific template ID and skip the document type identification step:
DocumentReader.Instance().processParams().forceDocID = 123;
  • Ignore assumptions based on the field mask in the template:
DocumentReader.Instance().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:
DocumentReader.Instance().processParams().fastDocDetect = true;
  • Get the OCR validity failed if there is a glare over the text field on the image:
DocumentReader.Instance().processParams().updateOCRValidityByGlare = true;
  • Do not crop graphic fields from a document image:
DocumentReader.Instance().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:
DocumentReader.Instance().processParams().documentAreaMin = 0.7;
  • Shift the date of expiry into the future or past for the specified number of months:
DocumentReader.Instance().processParams().shiftExpiryDate = 1;
  • Specify the minimal age of the document holder (in years):
DocumentReader.Instance().processParams().minimalHolderAge = 18;
  • Guarantee that an output image contains the correct MRZ on it in the series process mode:
DocumentReader.Instance().processParams().forceReadMrzBeforeLocate = true;
  • Limit MRZ formats to be recognized by specifying them in array:
DocumentReader.Instance().processParams().mrzFormatsFilter = new String[]{MRZFormat.FORMAT_2X44, MRZFormat.FORMAT_3X30};
  • Set the threshold for an actual document DPI below which the check fails:
DocumentReader.Instance().processParams().imageQA.dpiThreshold = 150;
  • Set the threshold for an actual document perspective angle above which the check fails:
DocumentReader.Instance().processParams().imageQA.angleThreshold = 5;
  • Disable the focus check for the image quality validation:
DocumentReader.Instance().processParams().imageQA.focusCheck = true;
  • Disable the glares check for the image quality validation:
DocumentReader.Instance().processParams().imageQA.glaresCheck = true;
  • Disable the colorness check for the image quality validation:
DocumentReader.Instance().processParams().imageQA.colornessCheck = true;
  • Disable the moire patterns check for the image quality validation:
DocumentReader.Instance().processParams().imageQA.moireCheck = true;

Functionality

Camera Frame

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

DocumentReader.Instance().functionality().edit().setCameraFrame(DocReaderFrame.MAX).apply();
DocumentReader.Instance().functionality().edit().setCameraFrame(DocReaderFrame.MAX).apply()

Warning

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 scanning process. You can also set the camera frame width.

Icons

  • Show/hide Torch icon:
DocumentReader.Instance().functionality().edit().setShowTorchButton(true).apply();
DocumentReader.Instance().functionality().edit().setShowTorchButton(true).apply()
  • Show/hide the Close icon:
DocumentReader.Instance().functionality().edit().setShowCloseButton(true).apply();
DocumentReader.Instance().functionality().edit().setShowCloseButton(true).apply()
  • Tapping the Capture button enables taking a picture and processing it as a single frame.

Show/hide the Capture button:

DocumentReader.Instance().functionality().edit().setShowCaptureButton(true).apply();
DocumentReader.Instance().functionality().edit().setShowCaptureButton(true).apply()
  • Set a time interval between the document detection moment and the Capture button appearance. By default, it is 5 seconds:
DocumentReader.Instance().functionality().edit().setShowCaptureButtonDelayFromDetect(5).apply();
DocumentReader.Instance().functionality().edit().setShowCaptureButtonDelayFromDetect(5).apply()

Warning

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:
DocumentReader.Instance().functionality().edit().setShowCaptureButtonDelayFromStart(10).apply();
DocumentReader.Instance().functionality().edit().setShowCaptureButtonDelayFromStart(10).apply()

Warning

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:

DocumentReader.Instance().functionality().edit().setShowChangeFrameButton(true).apply();
DocumentReader.Instance().functionality().edit().setShowChangeFrameButton(true).apply()
  • Show/hide the Skip Page button:
DocumentReader.Instance().functionality().edit().setShowSkipNextPageButton(true).apply();
DocumentReader.Instance().functionality().edit().setShowSkipNextPageButton(true).apply()
  • Show/hide the Switch Camera button:
DocumentReader.Instance().functionality().edit().setShowCameraSwitchButton(true).apply();
DocumentReader.Instance().functionality().edit().setShowCameraSwitchButton(true).apply()
  • 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:

Danger

Please use this setting at your own risk as the end app may crash.

DocumentReader.Instance().functionality().edit().setIsCameraTorchCheckDisabled(true).apply();
DocumentReader.Instance().functionality().edit().setIsCameraTorchCheckDisabled(true).apply()

Detection

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

  • Turn on/off the video capture motion control:
DocumentReader.Instance().functionality().edit().setVideoCaptureMotionControl(true).apply();
DocumentReader.Instance().functionality().edit().setVideoCaptureMotionControl(true).apply()
  • Pause scanning while a camera is focusing (may decrease the camera processing speed):
DocumentReader.Instance().functionality().edit().setSkipFocusingFrames(true).apply();
DocumentReader.Instance().functionality().edit().setSkipFocusingFrames(true).apply()

Orientation

Defines the orientation of activities by using one of the DocReaderOrientation members:

DocumentReader.Instance().functionality().edit().setOrientation(DocReaderOrientation.PORTRAIT).apply();
DocumentReader.Instance().functionality().edit().setOrientation(DocReaderOrientation.PORTRAIT).apply()

Scanning modes

  • Set the scanning mode:
DocumentReader.Instance().functionality().edit().setCaptureMode(CaptureMode.CAPTURE_VIDEO);
DocumentReader.Instance().functionality().edit().setCaptureMode(CaptureMode.CAPTURE_VIDEO)
  • If set, as soon as a document is detected during the scanning process, a picture will be taken and processed as a single frame. It is used for devices with poor-quality video preview:
DocumentReader.Instance().functionality().edit().setPictureOnBoundsReady(true).apply();
DocumentReader.Instance().functionality().edit().setPictureOnBoundsReady(true).apply()
  • Control in the multipage processing mode:
DocumentReader.Instance().functionality().edit().setManualMultipageMode(true).apply();
DocumentReader.Instance().functionality().edit().setManualMultipageMode(true).apply()

Warning

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

Video settings

  • Set the frame resolution—the camera preview size:
DocumentReader.Instance().functionality().edit().setCameraSize(1920, 1080).apply();
DocumentReader.Instance().functionality().edit().setCameraSize(1920, 1080).apply()
  • Set a camera API:
DocumentReader.Instance().functionality().edit().setCameraMode(CameraMode.CAMERA2).apply();
DocumentReader.Instance().functionality().edit().setCameraMode(CameraMode.CAMERA2).apply()
List<String> models = Arrays.asList("Nexus 5X", "Pixel 4"); // Build.MODEL
DocumentReader.Instance().functionality().edit().setExcludedCamera2Models(models).apply();
val models = Arrays.asList("Nexus 5X", "Pixel 4") // Build.MODEL
DocumentReader.Instance().functionality().edit().setExcludedCamera2Models(models).apply()
  • Adjust a zoom level using the pinch gesture (in a range from 1x to 10x):
DocumentReader.Instance().functionality().edit().setZoomEnabled(true).apply();
DocumentReader.Instance().functionality().edit().setZoomEnabled(true).apply()
  • Set the zoom level (in a range from 1x to 10x):
DocumentReader.Instance().functionality().edit().setZoomFactor(2.0F).apply();
DocumentReader.Instance().functionality().edit().setZoomFactor(2.0F).apply()
  • Record the scanning process:

❗ As we use a weak reference to handle the callback object, into setVideoEncoderCompletion, you should put an object with a life cycle longer than the method life cycle. For example, you can create a variable and put it into the method.

private final VideoEncoderCompletion videoEncoderCompletion;
//in constructor:
this.videoEncoderCompletion = new VideoEncoderCompletion();
//implementation:
private class VideoEncoderCompletion implements IVideoEncoderCompletion { ... }
// set up completion
DocumentReader.Instance().setVideoEncoderCompletion(videoEncoderCompletion);
private var videoEncoderCompletion: VideoEncoderCompletion? = null
//in constructor:
videoEncoderCompletion = VideoEncoderCompletion()
//implementation:
private class VideoEncoderCompletion : IVideoEncoderCompletion { ... }
// set up completion
DocumentReader.Instance().setVideoEncoderCompletion(videoEncoderCompletion)

Extra info

  • If set, the metadata will be displayed over the camera preview during a document processing, namely the perspective angle value:
DocumentReader.Instance().functionality().edit().setDisplayMetadata(true).apply();
DocumentReader.Instance().functionality().edit().setDisplayMetadata(true).apply()

Customization

Camera Frame

  • Set the thickness of document bounds border in the video preview (dp):
DocumentReader.Instance().customization().edit().setCameraFrameBorderWidth(5).apply();
DocumentReader.Instance().customization().edit().setCameraFrameBorderWidth(5).apply()
  • Set the hex color code for the document borders in the default state:
DocumentReader.Instance().customization().edit().setCameraFrameDefaultColor("#ff0000").apply();
DocumentReader.Instance().customization().edit().setCameraFrameDefaultColor("#ff0000").apply()
  • Set the hex color code for the document border in the document detected state
DocumentReader.Instance().customization().edit().setCameraFrameActiveColor("#c300ff").apply();
DocumentReader.Instance().customization().edit().setCameraFrameActiveColor("#c300ff").apply()
  • To define the shape of document borders, use one of the FrameShapeType members:
DocumentReader.Instance().customization().edit().setCameraFrameShapeType(FrameShapeType.CORNER).apply();
DocumentReader.Instance().customization().edit().setCameraFrameShapeType(FrameShapeType.CORNER).apply()
DocumentReader.Instance().customization().edit().setCameraFrameLineLength(50).apply();
DocumentReader.Instance().customization().edit().setCameraFrameLineLength(50).apply()

Warning

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:
DocumentReader.Instance().customization().edit().setCameraFrameCornerRadius(10.0F).apply();
DocumentReader.Instance().customization().edit().setCameraFrameCornerRadius(10.0F).apply()
  • Customize the beginning and ending of stroked lines of the camera frame:
DocumentReader.Instance().customization().edit().setCameraFrameLineCap(Paint.Cap.ROUND).apply();
DocumentReader.Instance().customization().edit().setCameraFrameLineCap(Paint.Cap.ROUND).apply()
  • Specify the offsetWidth for the camera frame (only for the portrait orientation):
DocumentReader.Instance().customization().edit().setCameraFrameOffsetWidth(50).apply();
DocumentReader.Instance().customization().edit().setCameraFrameOffsetWidth(50).apply()
  • Change the aspect ratio of the camera frame for portrait mode:
DocumentReader.Instance().customization().edit().setCameraFramePortraitAspectRatio(1.0F).apply();
DocumentReader.Instance().customization().edit().setCameraFramePortraitAspectRatio(1.0F).apply()
  • Change the aspect ratio of the camera frame for landscape mode:
DocumentReader.Instance().customization().edit().setCameraFrameLandscapeAspectRatio(1.0F).apply();
DocumentReader.Instance().customization().edit().setCameraFrameLandscapeAspectRatio(1.0F).apply()
  • Change the position of the camera frame to vertical:
DocumentReader.Instance().customization().edit().setCameraFrameVerticalPositionMultiplier(0.5F).apply();
DocumentReader.Instance().customization().edit().setCameraFrameVerticalPositionMultiplier(0.5F).apply()

Icons

  • Change the Torch icon for both ON and OFF states:
// For the ON state
DocumentReader.Instance().customization().edit().setTorchImageOn(getResources().getDrawable(R.drawable.icon)).apply();

// For the OFF state
DocumentReader.Instance().customization().edit().setTorchImageOff(getResources().getDrawable(R.drawable.icon)).apply();
// For the ON state
DocumentReader.Instance().customization().edit().setTorchImageOn(getDrawable(R.drawable.icon)).apply()

// For the OFF state
DocumentReader.Instance().customization().edit().setTorchImageOff(getDrawable(R.drawable.icon)).apply()
  • Change the Close icon:
DocumentReader.Instance().customization().edit().setCloseButtonImage(getResources().getDrawable(R.drawable.icon)).apply();
DocumentReader.Instance().customization().edit().setCloseButtonImage(getDrawable(R.drawable.icon)).apply()
  • Change the Capture icon:
DocumentReader.Instance().customization().edit().setCaptureButtonImage(getResources().getDrawable(R.drawable.icon)).apply();
DocumentReader.Instance().customization().edit().setCaptureButtonImage(getDrawable(R.drawable.icon)).apply()
  • Change the Change Frame icon for both ON and OFF states:
// For the ON state
DocumentReader.Instance().customization().edit().setChangeFrameExpandButtonImage(getResources().getDrawable(R.drawable.icon)).apply();

// For the OFF state
DocumentReader.Instance().customization().edit().setChangeFrameCollapseButtonImage(getResources().getDrawable(R.drawable.icon)).apply();
// For the ON state
DocumentReader.Instance().customization().edit().setChangeFrameExpandButtonImage(getDrawable(R.drawable.icon)).apply()

// For the OFF state
DocumentReader.Instance().customization().edit().setChangeFrameCollapseButtonImage(getDrawable(R.drawable.icon)).apply()
  • Change the Camera Switch icon:
DocumentReader.Instance().customization().edit().setCameraSwitchButtonImage(getResources().getDrawable(R.drawable.icon)).apply();
DocumentReader.Instance().customization().edit().setCameraSwitchButtonImage(getDrawable(R.drawable.icon)).apply()
  • Change the size of the toolbar (the area where the buttons are located):
DocumentReader.Instance().customization().edit().setToolbarSize(46.0F).apply();
DocumentReader.Instance().customization().edit().setToolbarSize(46.0F).apply()

Status Message

  • Set a status message next to the frame:
DocumentReader.Instance().customization().edit().setStatus("Hello").apply();
DocumentReader.Instance().customization().edit().setStatus("Hello").apply()
  • Turn on/off the status message:
DocumentReader.Instance().customization().edit().setShowStatusMessages(true).apply();
DocumentReader.Instance().customization().edit().setShowStatusMessages(true).apply()
  • Set the text font for the status message:
DocumentReader.Instance().customization().edit().setStatusTextFont(Typeface.SERIF).apply();
DocumentReader.Instance().customization().edit().setStatusTextFont(Typeface.SERIF).apply()
  • Set the size of the main text status (sp):
DocumentReader.Instance().customization().edit().setStatusTextSize(14).apply();
DocumentReader.Instance().customization().edit().setStatusTextSize(14).apply()
  • Set the hex color code for the main text status:
DocumentReader.Instance().customization().edit().setStatusTextColor("#ff0000").apply();
DocumentReader.Instance().customization().edit().setStatusTextColor("#ff0000").apply()
  • Set the hex color code for the current text status background:
DocumentReader.Instance().customization().edit().setStatusBackgroundColor("#32a852").apply();
DocumentReader.Instance().customization().edit().setStatusBackgroundColor("#32a852").apply()
  • 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:
DocumentReader.Instance().customization().edit().setStatusPositionMultiplier(0.5F).apply();
DocumentReader.Instance().customization().edit().setStatusPositionMultiplier(0.5F).apply()

Result Status Message

  • Set a result status message next to the frame:
DocumentReader.Instance().customization().edit().setResultStatus("Hello").apply();
DocumentReader.Instance().customization().edit().setResultStatus("Hello").apply()
  • Turn the result status message on/off:
DocumentReader.Instance().customization().edit().setShowResultStatusMessages(true).apply();
DocumentReader.Instance().customization().edit().setShowResultStatusMessages(true).apply()
  • Set the text font for the current status:
DocumentReader.Instance().customization().edit().setResultStatusTextFont(Typeface.SERIF).apply();
DocumentReader.Instance().customization().edit().setResultStatusTextFont(Typeface.SERIF).apply()
  • Set the size of the current text status (sp):
DocumentReader.Instance().customization().edit().setResultStatusTextSize(14).apply();
DocumentReader.Instance().customization().edit().setResultStatusTextSize(14).apply()
  • Set the hex color code for the current text status:
DocumentReader.Instance().customization().edit().setResultStatusTextColor("#ff0000").apply();
DocumentReader.Instance().customization().edit().setResultStatusTextColor("#ff0000").apply()
  • Set the hex color code for the current text status background:
DocumentReader.Instance().customization().edit().setResultStatusBackgroundColor("#ff0000").apply();
DocumentReader.Instance().customization().edit().setResultStatusBackgroundColor("#ff0000").apply()
  • 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:
DocumentReader.Instance().customization().edit().setResultStatusPositionMultiplier(0.5F).apply();
DocumentReader.Instance().customization().edit().setResultStatusPositionMultiplier(0.5F).apply()

Custom Status Message

SpannableString str = new SpannableString("Hello, world!");
str.setSpan(new ForegroundColorSpan(Color.RED), 0, str.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
DocumentReader.Instance().customization().edit().setCustomLabelStatus(str).apply();
val str = SpannableString("Hello, world!")
str.setSpan(ForegroundColorSpan(Color.RED), 0, str.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
DocumentReader.Instance().customization().edit().setCustomLabelStatus(str).apply()
  • 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:
DocumentReader.Instance().customization().edit().setCustomStatusPositionMultiplier(1.0F).apply();
DocumentReader.Instance().customization().edit().setCustomStatusPositionMultiplier(1.0F).apply()

Animation

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

Show/hide the help animation:

DocumentReader.Instance().customization().edit().setShowHelpAnimation(true).apply();
DocumentReader.Instance().customization().edit().setShowHelpAnimation(true).apply()
  • You can add an image for the help animation. If not set, the default image is used:
DocumentReader.Instance().customization().edit().setHelpAnimationImage(getResources().getDrawable(R.drawable.icon)).apply();
DocumentReader.Instance().customization().edit().setHelpAnimationImage(getDrawable(R.drawable.icon)).apply()
  • To change the scaling of the help animation image, use one of the ImageView.ScaleType members:
DocumentReader.Instance().customization().edit().setHelpAnimationImageScaleType(ImageView.ScaleType.MATRIX).apply();
Matrix matrix = new Matrix();
DocumentReader.Instance().customization().edit().setHelpAnimationImageMatrix(matrix).apply();
DocumentReader.Instance().customization().edit().setHelpAnimationImageScaleType(ImageView.ScaleType.MATRIX).apply()
val matrix = Matrix()
DocumentReader.Instance().customization().edit().setHelpAnimationImageMatrix(matrix).apply()
  • If set, expecting page turn animation will be shown. Turn on/off the next page animation:
DocumentReader.Instance().customization().edit().setShowNextPageAnimation(true).apply();
DocumentReader.Instance().customization().edit().setShowNextPageAnimation(true).apply()
  • You can set a front image for the multipage animation. If not set, the default image is used:
DocumentReader.Instance().customization().edit().setMultipageAnimationFrontImage(getResources().getDrawable(R.drawable.icon)).apply();
DocumentReader.Instance().customization().edit().setMultipageAnimationFrontImage(getDrawable(R.drawable.icon)).apply()
  • To change the scaling of front image of the multipage animation, use one of the ImageView.ScaleType members:
DocumentReader.Instance().customization().edit().setMultipageAnimationFrontImageScaleType(ImageView.ScaleType.MATRIX).apply();
Matrix matrix = new Matrix();
DocumentReader.Instance().customization().edit().setMultipageAnimationFrontImageMatrix(matrix).apply();
DocumentReader.Instance().customization().edit().setMultipageAnimationFrontImageScaleType(ImageView.ScaleType.MATRIX).apply()
val matrix = Matrix()
DocumentReader.Instance().customization().edit().setMultipageAnimationFrontImageMatrix(matrix).apply()
  • You can set a back image for the multipage animation. If not set, the default image is used:
DocumentReader.Instance().customization().edit().setMultipageAnimationBackImage(getResources().getDrawable(R.drawable.icon)).apply();
DocumentReader.Instance().customization().edit().setMultipageAnimationBackImage(getDrawable(R.drawable.icon)).apply()
  • To change the scaling of a back image of the multipage animation, use one of the ImageView.ScaleType members:
DocumentReader.Instance().customization().edit().setMultipageAnimationBackImageScaleType(ImageView.ScaleType.MATRIX).apply();
Matrix matrix = new Matrix();
DocumentReader.Instance().customization().edit().setMultipageAnimationBackImageMatrix(matrix).apply();
DocumentReader.Instance().customization().edit().setMultipageAnimationBackImageScaleType(ImageView.ScaleType.MATRIX).apply()
val matrix = Matrix()
DocumentReader.Instance().customization().edit().setMultipageAnimationBackImageMatrix(matrix).apply()

Visual Elements

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

DocumentReader.Instance().customization().edit().setTintColor("#ff0000").apply();
DocumentReader.Instance().customization().edit().setTintColor("#ff0000").apply()

Skip Button

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

DocumentReader.Instance().customization().edit().setMultipageButtonBackgroundColor("#ff0000").apply();
DocumentReader.Instance().customization().edit().setMultipageButtonBackgroundColor("#ff0000").apply()

Loading Indicator

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

DocumentReader.Instance().customization().edit().setActivityIndicatorColor("#ff0000").apply();
DocumentReader.Instance().customization().edit().setActivityIndicatorColor("#ff0000").apply()

Background

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

Show/hide the background mask:

DocumentReader.Instance().customization().edit().setShowBackgroundMask(true).apply();
DocumentReader.Instance().customization().edit().setShowBackgroundMask(true).apply()
  • Change the intensity of the background mask:
DocumentReader.Instance().customization().edit().setBackgroundMaskAlpha(0.5F).apply();
DocumentReader.Instance().customization().edit().setBackgroundMaskAlpha(0.5F).apply()
DocumentReader.Instance().customization().edit().setBorderBackgroundImage(getResources().getDrawable(R.drawable.icon)).apply();
DocumentReader.Instance().customization().edit().setBorderBackgroundImage(getDrawable(R.drawable.icon)).apply()

RFID

  • 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:
DocumentReader.Instance().rfidScenario().setAutoSettings(true);
DocumentReader.Instance().rfidScenario().isAutoSettings = true
  • Set an authentication procedure type, which should be conducted if all the objective conditions are met:
DocumentReader.Instance().rfidScenario().setAuthProcType(eRFID_AuthenticationProcedureType.aptAdvanced);
DocumentReader.Instance().rfidScenario().setAuthProcType(eRFID_AuthenticationProcedureType.aptAdvanced)
  • Set a type of priority mechanism for organizing an SM-channel (Security Messaging is a mechanism of protected data exchanging):
DocumentReader.Instance().rfidScenario().setBaseSMProcedure(eRFID_AccessControl_ProcedureType.ACPT_BAC);
DocumentReader.Instance().rfidScenario().setBaseSMProcedure(eRFID_AccessControl_ProcedureType.ACPT_BAC)
  • Set a data access type for the PACE procedure:
DocumentReader.Instance().rfidScenario().setPacePasswordType(eRFID_Password_Type.PPT_MRZ);
DocumentReader.Instance().rfidScenario().setPacePasswordType(eRFID_Password_Type.PPT_MRZ)
  • Priority of using DS-certificates:
DocumentReader.Instance().rfidScenario().setPkdDSCertPriority(false);
DocumentReader.Instance().rfidScenario().isPkdDSCertPriority = false
  • Use of CSCA-certificates submitted by individual data files only:
DocumentReader.Instance().rfidScenario().setPkdUseExternalCSCA(false);
DocumentReader.Instance().rfidScenario().isPkdUseExternalCSCA = false
  • Level of trust to CSCA-certificates from PKD:
DocumentReader.Instance().rfidScenario().setTrustedPKD(false);
DocumentReader.Instance().rfidScenario().isTrustedPKD = false
  • Logical sign of passive authentication performance:
DocumentReader.Instance().rfidScenario().setPassiveAuth(true);
DocumentReader.Instance().rfidScenario().isPassiveAuth = true
  • Logical sign of a cancellation of an active authentication procedure (AA) after the successful performance of a chip authentication (CA) procedure:
DocumentReader.Instance().rfidScenario().setSkipAA(false);
DocumentReader.Instance().rfidScenario().isSkipAA = false
  • Select the type of logical data profiler to use with an electronic document:
DocumentReader.Instance().rfidScenario().setProfilerType(eRFID_SDK_ProfilerType.SPT_DOC_9303_EDITION_2006);
DocumentReader.Instance().rfidScenario().setProfilerType(eRFID_SDK_ProfilerType.SPT_DOC_9303_EDITION_2006)
  • Strict ISO protocol:
DocumentReader.Instance().rfidScenario().setStrictProcessing(false);
DocumentReader.Instance().rfidScenario().isStrictProcessing = false
  • Specify whether the ePassport must be read or not:
DocumentReader.Instance().rfidScenario().setReadEPassport(true);
DocumentReader.Instance().rfidScenario().isReadEPassport = true
  • Specify the data groups of the ePassport that must be read:
DocumentReader.Instance().rfidScenario().ePassportDataGroups().setDG1(true);
DocumentReader.Instance().rfidScenario().ePassportDataGroups().isDG1 = true
  • Specify whether the eID must be read or not:
DocumentReader.Instance().rfidScenario().setReadEID(false);
DocumentReader.Instance().rfidScenario().isReadEID = false
  • Specify which data groups of the eID must be read:
DocumentReader.Instance().rfidScenario().eIDDataGroups().setDG1(true);
DocumentReader.Instance().rfidScenario().eIDDataGroups().isDG1 = true
  • Specify whether the eDL must read or not:
DocumentReader.Instance().rfidScenario().setReadEDL(true);
DocumentReader.Instance().rfidScenario().isReadEDL = true
  • Specify which data groups of the eDL must be read:
DocumentReader.Instance().rfidScenario().eDLDataGroups().setDG1(true);
DocumentReader.Instance().rfidScenario().eDLDataGroups().isDG1 = true
Back to top