Skip to content

Toolbar

  • Change the size of the toolbar (the area where the buttons are located):
DocReader.shared.customization.toolbarSize = 46.0
[RGLDocReader shared].customization.toolbarSize = 46.0;
DocumentReader.Instance().customization().edit().setToolbarSize(46.0F).apply()
DocumentReader.Instance().customization().edit().setToolbarSize(46.0F).apply();
DocumentReader.instance.customization.toolbarSize = 46;
DocumentReader.setCustomization({
    toolbarSize: 46.0,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
    toolbarSize: 46.0
});
DocumentReader.setCustomization({
    toolbarSize: 46.0,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetToolbarSize((Java.Lang.Float)46.0F).Apply();

// iOS
RGLDocReader.Shared.Customization.ToolbarSize = 46.0F;

Torch

  • Show/hide the Torch icon:
DocReader.shared.functionality.showTorchButton = true
[RGLDocReader shared].functionality.showTorchButton = YES;
DocumentReader.Instance().functionality().edit().setShowTorchButton(true).apply()
DocumentReader.Instance().functionality().edit().setShowTorchButton(true).apply();
DocumentReader.instance.functionality.showTorchButton = true;
DocumentReader.setFunctionality({
    showTorchButton: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setFunctionality({
    showTorchButton: true
});
DocumentReader.setFunctionality({
    showTorchButton: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Functionality().Edit().SetShowTorchButton(true).Apply();

// iOS
RGLDocReader.Shared.Functionality.ShowTorchButton = true;
  • Change the Torch icon for both ON and OFF states:
// For the ON state
DocReader.shared.customization.torchButtonOnImage = UIImage(named: "icon")

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

// For the OFF state
[RGLDocReader shared].customization.torchButtonOffImage = [UIImage imageNamed:@"icon"];
// 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()
// 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();
DocumentReader.instance.customization.torchButtonOnImage = await rootBundle.load("icon");
DocumentReader.instance.customization.torchButtonOffImage = await rootBundle.load("icon");
DocumentReader.setCustomization({
    torchButtonOnImage: "Base64String", //For the ON state
    torchButtonOffImage: "Base64String" // For the OFF state,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
    torchButtonOnImage: "Base64String", // For the ON state
    torchButtonOffImage: "Base64String" // For the OFF state
});
DocumentReader.setCustomization({
    torchButtonOnImage: "Base64String", //For the ON state
    torchButtonOffImage: "Base64String" // For the OFF state,
}, function (m) { }, function (e) { console.log(e); });
// 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();

// iOS
// For the ON state
RGLDocReader.Shared.Customization.TorchButtonOnImage = UIImage.FromBundle("Image");

// For the OFF state
RGLDocReader.Shared.Customization.TorchButtonOffImage = UIImage.FromBundle("Image");
  • Allows you to disable all validations of having a torch in case Android OS returns that it's not available, but it can be used when checks are skipped (Android-only):

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();

Close

  • Show/hide the Close icon:
DocReader.shared.functionality.showCloseButton = true
[RGLDocReader shared].functionality.showCloseButton = YES;
DocumentReader.Instance().functionality().edit().setShowCloseButton(true).apply()
DocumentReader.Instance().functionality().edit().setShowCloseButton(true).apply();
DocumentReader.instance.functionality.showCloseButton = true;
DocumentReader.setFunctionality({
    showCloseButton: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setFunctionality({
    showCloseButton: true
});
DocumentReader.setFunctionality({
    showCloseButton: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Functionality().Edit().SetShowCloseButton(true).Apply();

// iOS
RGLDocReader.Shared.Functionality.ShowCloseButton = true;

Info

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

  • Change the Close icon:
DocReader.shared.customization.closeButtonImage = UIImage(named: "icon")
[RGLDocReader shared].customization.closeButtonImage = [UIImage imageNamed:@"icon"];
DocumentReader.Instance().customization().edit().setCloseButtonImage(getDrawable(R.drawable.icon)).apply()
DocumentReader.Instance().customization().edit().setCloseButtonImage(getResources().getDrawable(R.drawable.icon)).apply();
DocumentReader.instance.customization.closeButtonImage = await rootBundle.load("icon");
DocumentReader.setCustomization({
    closeButtonImage: "Base64String",
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
    closeButtonImage: "Base64String"
});
DocumentReader.setCustomization({
    closeButtonImage: "Base64String",
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetCloseButtonImage(GetDrawable(Resource.Drawable.icon)).Apply();

// iOS
RGLDocReader.Shared.Customization.CloseButtonImage = UIImage.FromBundle("Image");

Capture

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

  • Show/hide the Capture button:
DocReader.shared.functionality.showCaptureButton = true
[RGLDocReader shared].functionality.showCaptureButton = YES;
DocumentReader.Instance().functionality().edit().setShowCaptureButton(true).apply()
DocumentReader.Instance().functionality().edit().setShowCaptureButton(true).apply();
DocumentReader.instance.functionality.showCaptureButton = true;
DocumentReader.setFunctionality({
    showCaptureButton: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setFunctionality({
    showCaptureButton: true
});
DocumentReader.setFunctionality({
    showCaptureButton: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Functionality().Edit().SetShowCaptureButton(true).Apply();

// iOS
RGLDocReader.Shared.Functionality.ShowCaptureButton = true;
  • Set a time interval between the document detection moment and the Capture button appearance. By default, it is 5 seconds:
DocReader.shared.functionality.showCaptureButtonDelayFromDetect = 5
[RGLDocReader shared].functionality.showCaptureButtonDelayFromDetect = 5;
DocumentReader.Instance().functionality().edit().setShowCaptureButtonDelayFromDetect(5).apply()
DocumentReader.Instance().functionality().edit().setShowCaptureButtonDelayFromDetect(5).apply();
DocumentReader.instance.functionality.showCaptureButtonDelayFromDetect = 5;
DocumentReader.setFunctionality({
    showCaptureButtonDelayFromDetect: 5,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setFunctionality({
    showCaptureButtonDelayFromDetect: 5
});
DocumentReader.setFunctionality({
    showCaptureButtonDelayFromDetect: 5,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Functionality().Edit().SetShowCaptureButtonDelayFromDetect(5).Apply();

// iOS
RGLDocReader.Shared.Functionality.ShowCaptureButtonDelayFromDetect = 5;
  • Set a time interval between the scanning process start and the Capture button appearance. By default, it is 10 seconds:
DocReader.shared.functionality.showCaptureButtonDelayFromStart = 10
[RGLDocReader shared].functionality.showCaptureButtonDelayFromStart = 10;
DocumentReader.Instance().functionality().edit().setShowCaptureButtonDelayFromStart(10).apply()
DocumentReader.Instance().functionality().edit().setShowCaptureButtonDelayFromStart(10).apply();
DocumentReader.instance.functionality.showCaptureButtonDelayFromStart = 10;
DocumentReader.setFunctionality({
    showCaptureButtonDelayFromStart: 10,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setFunctionality({
    showCaptureButtonDelayFromStart: 10
});
DocumentReader.setFunctionality({
    showCaptureButtonDelayFromStart: 10,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Functionality().Edit().SetShowCaptureButtonDelayFromStart(10).Apply();

// iOS
RGLDocReader.Shared.Functionality.ShowCaptureButtonDelayFromStart = 10;
  • Change the Capture icon:
DocReader.shared.customization.captureButtonImage = UIImage(named: "icon")
[RGLDocReader shared].customization.captureButtonImage = [UIImage imageNamed:@"icon"];
DocumentReader.Instance().customization().edit().setCaptureButtonImage(getDrawable(R.drawable.icon)).apply()
DocumentReader.Instance().customization().edit().setCaptureButtonImage(getResources().getDrawable(R.drawable.icon)).apply();
DocumentReader.instance.customization.captureButtonImage = await rootBundle.load("icon");
DocumentReader.setCustomization({
    captureButtonImage: "Base64String",
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
    captureButtonImage: "Base64String"
});
DocumentReader.setCustomization({
    captureButtonImage: "Base64String",
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetCaptureButtonImage(GetDrawable(Resource.Drawable.icon)).Apply();

// iOS
RGLDocReader.Shared.Customization.CaptureButtonImage = UIImage.FromBundle("Image");

Camera Frame Switch

  • Show/hide the Change Frame icon:
DocReader.shared.functionality.showChangeFrameButton = true
[RGLDocReader shared].functionality.showChangeFrameButton = YES;
DocumentReader.Instance().functionality().edit().setShowChangeFrameButton(true).apply()
DocumentReader.Instance().functionality().edit().setShowChangeFrameButton(true).apply();
DocumentReader.instance.functionality.showChangeFrameButton = true;
DocumentReader.setFunctionality({
    showChangeFrameButton: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setFunctionality({
    showChangeFrameButton: true
});
DocumentReader.setFunctionality({
    showChangeFrameButton: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Functionality().Edit().SetShowChangeFrameButton(true).Apply();

// iOS
RGLDocReader.Shared.Functionality.ShowChangeFrameButton = true;
  • Change the Change Frame icon for both ON and OFF states:
// For the ON state
DocReader.shared.customization.changeFrameButtonExpandImage = UIImage(named: "icon")

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

// For the OFF state
[RGLDocReader shared].customization.changeFrameButtonCollapseImage = [UIImage imageNamed:@"icon"];
// 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()
// 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();
DocumentReader.instance.customization.changeFrameButtonExpandImage = await rootBundle.load("icon");
DocumentReader.instance.customization.changeFrameButtonCollapseImage = await rootBundle.load("icon");
DocumentReader.setCustomization({
    changeFrameButtonExpandImage: "Base64String", //For the ON state
    changeFrameButtonCollapseImage: "Base64String" // For the OFF state,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
    changeFrameButtonExpandImage: "Base64String", //For the ON state
    changeFrameButtonCollapseImage: "Base64String" // For the OFF state
});
DocumentReader.setCustomization({
    changeFrameButtonExpandImage: "Base64String", //For the ON state
    changeFrameButtonCollapseImage: "Base64String" // For the OFF state,
}, function (m) { }, function (e) { console.log(e); });
// 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();

// iOS
// For the ON state
RGLDocReader.Shared.Customization.ChangeFrameButtonExpandImage = UIImage.FromBundle("Image");

// For the OFF state
RGLDocReader.Shared.Customization.ChangeFrameButtonCollapseImage = UIImage.FromBundle("Image");

Camera Switch

  • Show/hide the Switch Camera button:
DocReader.shared.functionality.showCameraSwitchButton = true
[RGLDocReader shared].functionality.showCameraSwitchButton = YES;
DocumentReader.Instance().functionality().edit().setShowCameraSwitchButton(true).apply()
DocumentReader.Instance().functionality().edit().setShowCameraSwitchButton(true).apply();
DocumentReader.instance.functionality.showCameraSwitchButton = true;
DocumentReader.setFunctionality({
    showCameraSwitchButton: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setFunctionality({
    showCameraSwitchButton: true
});
DocumentReader.setFunctionality({
    showCameraSwitchButton: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Functionality().Edit().SetShowCameraSwitchButton(true).Apply();

// iOS
RGLDocReader.Shared.Functionality.ShowCameraSwitchButton = true;
  • Change the Camera Switch icon:
DocReader.shared.customization.cameraSwitchButtonImage = UIImage(named: "icon")
[RGLDocReader shared].customization.cameraSwitchButtonImage = [UIImage imageNamed:@"icon"];
DocumentReader.Instance().customization().edit().setCameraSwitchButtonImage(getDrawable(R.drawable.icon)).apply()
DocumentReader.Instance().customization().edit().setCameraSwitchButtonImage(getResources().getDrawable(R.drawable.icon)).apply();
DocumentReader.instance.customization.cameraSwitchButtonImage = await rootBundle.load("icon");
DocumentReader.setCustomization({
    cameraSwitchButtonImage: "Base64String",
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
    cameraSwitchButtonImage: "Base64String"
});
DocumentReader.setCustomization({
    cameraSwitchButtonImage: "Base64String",
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetCameraSwitchButtonImage(GetDrawable(Resource.Drawable.icon)).Apply();

// iOS
RGLDocReader.Shared.Customization.CameraSwitchButtonImage = UIImage.FromBundle("Image");

Next Steps