Custom settings

This page covers the description of customizable settings

Contents

Process Params

Document processing

Multipage processing

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().MultipageProcessing = true;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.MultipageProcessing = true;

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.

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().DoublePageSpread = true;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.DoublePageSpread = true;

Authenticity

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().CheckHologram = true;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.CheckHologram = true;

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:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().Timeout = (Java.Lang.Double)20.0;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.Timeout = 20.0;

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:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().TimeoutFromFirstDetect = (Java.Lang.Double)5.0;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.TimeoutFromFirstDetect = 5.0;

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:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().TimeoutFromFirstDocType = (Java.Lang.Double)3.0;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.TimeoutFromFirstDocType = 3.0;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().DateFormat = "dd-mm-yy";
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.DateFormat = "dd-mm-yy";

Allows to change the measure system:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().MeasureSystem = RGLMeasureSystem.Metric;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.MeasureSystem = RGLMeasureSystem.Metric;

Logs

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().SetLogs(true);
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.Logs = true;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().DebugSaveLogs = true;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.DebugSaveLogs = true;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().DebugSaveImages = true;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.DebugSaveImages = true;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().DebugSaveCroppedImages = true;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.DebugSaveCroppedImages = true;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().DebugSaveRFIDSession = true;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.DebugSaveRFIDSession = true;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().SessionLogFolder
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.SessionLogFolder

Scenario

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().Scenario = Scenario.ScenarioBarcode;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.Scenario = Constants.RGL_SCENARIO_BARCODE;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().CaptureButtonScenario = Scenario.ScenarioLocate;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.CaptureButtonScenario = Constants.RGL_SCENARIO_LOCATE;

Barcode types

Set the types of barcodes that you wish to process:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().DoBarcodes = new String[] { BarcodeType.ValueOf(BarcodeType.Pdf417), BarcodeType.ValueOf(BarcodeType.Qrcode) };
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.BarcodeTypes = new NSNumber[] { (int)RGLBarcodeType.Pdf417, (int)RGLBarcodeType.Qrcode };

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:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().BarcodeParserType = (Java.Lang.Integer)123;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.BarcodeParserType = 123;

Filters

Set the list of the document ID's to process. All documents will be processed, if empty:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().DocumentIDList = new int[] { -274257313, -2004898043 };
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.DocumentIDList = new NSNumber[] { -274257313, -2004898043 };

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:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().FieldTypesFilter = new int[] { EVisualFieldType.FtDateOfExpiry };
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.FieldTypesFilter = new NSNumber[] { (int)RGLFieldType.Date_of_Expiry };

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().checkRequiredTextFields = true;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.CheckRequiredTextFields = true;

Detection

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().DisableFocusingCheck = true;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.DisableFocusingCheck = true;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().PerspectiveAngle = (Java.Lang.Integer)5;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.PerspectiveAngle = 5;

Output images

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().ReturnUncroppedImage = true;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.ReturnUncroppedImage = true;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().IntegralImage = true;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.IntegralImage = true;

Allows you to set the minimum acceptable DPI value:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().MinDPI = (Java.Lang.Integer)100;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.MinDPI = 100;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().ReturnCroppedBarcode = true;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.ReturnCroppedBarcode = true;

Custom params

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
// allows you to depersonalize the document's data
DocumentReader.Instance().ProcessParams().CustomParams = new Org.Json.JSONObject("{\"dePersonalize\":[{\"allTextFields\":true},{\"allGraphicFields\":true}]}");
Xamarin.iOS
// allows you to depersonalize the document's data
var dict1 = new NSDictionary("allTextFields", true);
var dict2 = new NSDictionary("allGraphicFields", true);
var data = NSArray.FromObjects(dict1, dict2);
RGLDocReader.Shared.ProcessParams.CustomParams = new NSDictionary("dePersonalize", data);

Bounds

Allows you to manually set the document's bounds:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().ProcessParams().ManualCrop = true;
Xamarin.iOS
RGLDocReader.Shared.ProcessParams.ManualCrop = true;

Functionality

Camera Frame

Set this setting to override default cropping frame on camera activity provided:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetCameraFrame(DocReaderFrame.Max).Apply();
Xamarin.iOS
RGLDocReader.Shared.Functionality.CameraFrame = RGLDocReaderFrame.Max;

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:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetShowTorchButton(true).Apply();
Xamarin.iOS
RGLDocReader.Shared.Functionality.ShowTorchButton = true;

Show/hide close button:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetShowCloseButton(true).Apply();
Xamarin.iOS
RGLDocReader.Shared.Functionality.ShowCloseButton = true;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetShowCaptureButton(true).Apply();
Xamarin.iOS
RGLDocReader.Shared.Functionality.ShowCaptureButton = true;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetShowCaptureButtonDelayFromDetect(5).Apply();
Xamarin.iOS
RGLDocReader.Shared.Functionality.ShowCaptureButtonDelayFromDetect = 5;

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:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetShowCaptureButtonDelayFromStart(10).Apply();
Xamarin.iOS
RGLDocReader.Shared.Functionality.ShowCaptureButtonDelayFromStart = 10;

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:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetShowChangeFrameButton(true).Apply();
Xamarin.iOS
RGLDocReader.Shared.Functionality.ShowChangeFrameButton = true;

Show/hide skip next page button:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetShowSkipNextPageButton(true).Apply();
Xamarin.iOS
RGLDocReader.Shared.Functionality.ShowSkipNextPageButton = true;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetShowCameraSwitchButton(true).Apply();
Xamarin.iOS
RGLDocReader.Shared.Functionality.ShowCameraSwitchButton = true;

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.

Xamarin.Android
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetIsCameraTorchCheckDisabled(true).Apply();

Detection

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetVideoCaptureMotionControl(true).Apply();
Xamarin.iOS
RGLDocReader.Shared.Functionality.VideoCaptureMotionControl = true;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetSkipFocusingFrames(true).Apply();
Xamarin.iOS
RGLDocReader.Shared.Functionality.SkipFocusingFrames = true;

Orientation

Defines orientation of activities:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetOrientation(DocReaderOrientation.Portrait).Apply();
Xamarin.iOS
RGLDocReader.Shared.Functionality.Orientation = UIInterfaceOrientationMask.Portrait;

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:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetCaptureMode(CaptureMode.CaptureVideo).Apply();
Xamarin.iOS
RGLDocReader.Shared.Functionality.CaptureMode = RGLCaptureMode.CaptureVideo;

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:

Xamarin.Android
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetPictureOnBoundsReady(true).Apply();

Allows you to control in the multipage processing mode:

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetManualMultipageMode(true).Apply();
Xamarin.iOS
RGLDocReader.Shared.Functionality.ManualMultipageMode = true;

Video Settings

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetCameraSize(1920, 1080).Apply();
Xamarin.iOS
RGLDocReader.Shared.Functionality.VideoSessionPreset = AVFoundation.AVCaptureSession.Preset1920x1080;

Allows you to set a camera API:

Xamarin.Android
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetCameraMode(CameraMode.Camera2).Apply();

Allows you to set a list of devices that must not use the camera2 API:

Xamarin.Android
Xamarin.Android
List<String> models = new List<String>() { "Nexus 5X", "Pixel 4" }; // Build.MODEL
DocumentReader.Instance().Functionality().Edit().SetExcludedCamera2Models(models).Apply();

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetZoomEnabled(true).Apply();
Xamarin.iOS
RGLDocReader.Shared.Functionality.IsZoomEnabled = true;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetZoomFactor(2.0F).Apply();
Xamarin.iOS
RGLDocReader.Shared.Functionality.ZoomFactor = 2.0F;

Allows you to record the scanning process:

Xamarin.iOS
Xamarin.iOS
RGLDocReader.Shared.Functionality.RecordScanningProcess = true;

Single Result

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

Xamarin.iOS
Xamarin.iOS
RGLDocReader.Shared.Functionality.SingleResult = true;

Capture Device Position

You can specify the position of a capture device for video session:

Xamarin.iOS
Xamarin.iOS
RGLDocReader.Shared.Functionality.CameraPosition = AVFoundation.AVCaptureDevicePosition.Back;

Extra info

If set, the metadata will be displayed over the camera preview during document processing, namely the perspective angle value:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Functionality().Edit().SetDisplayMetadata(true).Apply();
Xamarin.iOS
RGLDocReader.Shared.Functionality.ShowMetadataInfo = true;

Customization

Camera Frame

Set thickness of document bounds border on the video preview (dp):

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetCameraFrameBorderWidth((Java.Lang.Integer)10).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.CameraFrameBorderWidth = 10;

Hex string of document bounds border color in default state:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetCameraFrameDefaultColor("#ff0000").Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.CameraFrameDefaultColor = UIColor.Red;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetCameraFrameActiveColor("#ca7afd").Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.CameraFrameActiveColor = UIColor.Purple;

Defines the shape of document bounds border:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetCameraFrameShapeType((Java.Lang.Integer)FrameShapeType.Corner).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.CameraFrameShapeType = RGLCameraFrameShapeType.Corners;

Defines the length (dp) of the corner side in the corner shape mode of the camera frame:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetCameraFrameLineLength((Java.Lang.Integer)25).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.CameraFrameLineLength = 25;

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:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetCameraFrameCornerRadius((Java.Lang.Float)10.0F).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.CameraFrameCornerRadius = 10;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetCameraFrameLineCap(Paint.Cap.Round).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.CameraFrameLineCap = CoreGraphics.CGLineCap.Round;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetCameraFrameOffsetWidth((Java.Lang.Integer)50).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.CameraFrameOffsetWidth = 50;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetCameraFramePortraitAspectRatio((Java.Lang.Float)1.0F).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.CameraFramePortraitAspectRatio = 1.0F;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetCameraFrameLandscapeAspectRatio((Java.Lang.Float)1.0F).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.CameraFrameLandscapeAspectRatio = 1.0F;

Allows to change the position of the camera frame vertically:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetCameraFrameVerticalPositionMultiplier((Java.Lang.Float)0.5F).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.CameraFrameVerticalPositionMultiplier = 0.5F;

Buttons

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
// For the ON state
DocumentReader.Instance().Customization().Edit().SetTorchImageOn(GetDrawable(Resource.Drawable.icon)).Apply();
// For the OFF state
DocumentReader.Instance().Customization().Edit().SetTorchImageOff(GetDrawable(Resource.Drawable.icon)).Apply();
Xamarin.iOS
// For the ON state
RGLDocReader.Shared.Customization.TorchButtonOnImage = UIImage.FromBundle("Image");
// For the OFF state
RGLDocReader.Shared.Customization.TorchButtonOffImage = UIImage.FromBundle("Image");

Allows to change the Close button's icon:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetCloseButtonImage(GetDrawable(Resource.Drawable.icon)).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.CloseButtonImage = UIImage.FromBundle("Image");

Allows to change the Capture button's icon:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetCaptureButtonImage(GetDrawable(Resource.Drawable.icon)).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.CaptureButtonImage = UIImage.FromBundle("Image");

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
// For the ON state
DocumentReader.Instance().Customization().Edit().SetChangeFrameExpandButtonImage(GetDrawable(Resource.Drawable.icon)).Apply();
// For the OFF state
DocumentReader.Instance().Customization().Edit().SetChangeFrameCollapseButtonImage(GetDrawable(Resource.Drawable.icon)).Apply();
Xamarin.iOS
// For the ON state
RGLDocReader.Shared.Customization.ChangeFrameButtonExpandImage = UIImage.FromBundle("Image");
// For the OFF state
RGLDocReader.Shared.Customization.ChangeFrameButtonCollapseImage = UIImage.FromBundle("Image");

Allows to change the Camera Switch button's icon:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetCameraSwitchButtonImage(GetDrawable(Resource.Drawable.icon)).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.CameraSwitchButtonImage = UIImage.FromBundle("Image");

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetToolbarSize((Java.Lang.Float)46.0F).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.ToolbarSize = 46.0F;

Status Message

Set a status message next to the frame:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetStatus("Hello, world!").Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.Status = "Hello";

Turn on/off status message:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetShowStatusMessages(true).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.ShowStatusMessages = true;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetStatusTextFont(Typeface.Serif).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.StatusTextFont = UIFont.PreferredBody.WithSize(18);

Size of main text status (sp):

Xamarin.Android
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetStatusTextSize((Java.Lang.Integer)14).Apply();

Hex string of main text status color:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetStatusTextColor("#ff0000").Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.StatusTextColor = UIColor.Red;

Hex string of current text status background color:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetStatusBackgroundColor("#32a852").Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.StatusBackgroundColor = UIColor.Green;

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:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetStatusPositionMultiplier((Java.Lang.Float)0.5F).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.StatusPositionMultiplier = 0.5F;

Result Status Message

Set a result status message next to the frame:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetResultStatus("Hello, world!").Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.ResultStatus = "Hello";

Turn on/off result status message:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetShowResultStatusMessages(true).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.ShowResultStatusMessages = true;

Set the text font for the current status:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetResultStatusTextFont(Typeface.Serif).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.ResultStatusTextFont = UIFont.PreferredBody.WithSize(18);

Set the size of current text status (sp):

Xamarin.Android
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetResultStatusTextSize((Java.Lang.Integer)14).Apply();

Hex string of current text status color:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetResultStatusTextColor("#ff0000").Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.ResultStatusTextColor = UIColor.Red;

Hex string of current text status background color:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetResultStatusBackgroundColor("#32a852").Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.ResultStatusBackgroundColor = UIColor.Black;

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:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetResultStatusPositionMultiplier((Java.Lang.Float)0.5F).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.ResultStatusPositionMultiplier = 0.5F;

Custom Status Message

Allows to create a custom status as SpannableString (Xamarin.Android) / NSAttributedString (Xamarin.iOS):

Xamarin.Android
Xamarin.iOS
Xamarin.Android
SpannableString str = new SpannableString("Hello, world!");
str.SetSpan(new ForegroundColorSpan(Color.Red), 0, str.Length(), SpanTypes.ExclusiveExclusive);
DocumentReader.Instance().Customization().Edit().SetCustomLabelStatus(str).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.CustomLabelStatus = new NSAttributedString("Hello, world!", foregroundColor: UIColor.Red, font: UIFont.ItalicSystemFontOfSize(18.0F));

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:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetCustomStatusPositionMultiplier((Java.Lang.Float)1.0F).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.CustomStatusPositionMultiplier = 1.0F;

Animation

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetShowHelpAnimation(true).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.ShowHelpAnimation = true;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetHelpAnimationImage(GetDrawable(Resource.Drawable.icon)).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.HelpAnimationImage = UIImage.FromBundle("icon.png");
Xamarin.Android
Xamarin.iOS
Xamarin.Android

Allows to change the scaling of the help animation image, use one of ImageView.ScaleType members:

DocumentReader.Instance().Customization().Edit().SetHelpAnimationImageScaleType(ImageView.ScaleType.Matrix).Apply();
Matrix matrix = new Matrix();
DocumentReader.Instance().Customization().Edit().SetHelpAnimationImageMatrix(matrix).Apply();
Xamarin.iOS

Allows to change the content mode of the help animation image, use one of UIView.ContentMode members:

RGLDocReader.Shared.Customization.HelpAnimationImageContentMode = UIViewContentMode.ScaleAspectFit;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetShowNextPageAnimation(true).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.ShowNextPageAnimation = true;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetMultipageAnimationFrontImage(GetDrawable(Resource.Drawable.icon)).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.MultipageAnimationFrontImage = UIImage.FromBundle("icon.png");
Xamarin.Android
Xamarin.iOS
Xamarin.Android

Allows to change the scaling of front image of the multipage animation, use one of ImageView.ScaleType members:

DocumentReader.Instance().Customization().Edit().SetMultipageAnimationFrontImageScaleType(ImageView.ScaleType.Matrix).Apply();
Matrix matrix = new Matrix();
DocumentReader.Instance().Customization().Edit().SetMultipageAnimationFrontImageMatrix(matrix).Apply();
Xamarin.iOS

Allows to change the content mode of the front image of the multipage animation, use one of UIView.ContentMode members:

RGLDocReader.Shared.Customization.MultipageAnimationFrontImageContentMode = UIViewContentMode.ScaleAspectFit;

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReader.Instance().Customization().Edit().SetMultipageAnimationBackImage(GetDrawable(Resource.Drawable.icon)).Apply();
Xamarin.iOS
RGLDocReader.Shared.Customization.MultipageAnimationBackImage = UIImage.FromBundle("icon.png");
Xamarin.Android
Xamarin.iOS
Xamarin.Android

Allows to change the scaling of back image of the multipage animation, use one of ImageView.ScaleType members:

DocumentReader.Instance().Customization().Edit().SetMultipageAnimationBackImageScaleType(ImageView.ScaleType.Matrix).Apply();
Matrix matrix = new Matrix();
DocumentReader.Instance().Customization().Edit().SetMultipageAnimationBackImageMatrix(matrix).Apply();
Xamarin.iOS

Allows to change the content mode of the back image of the multipage animation, use one of UIView.ContentMode members: