Skip to content

Toolbar

  • Change the size of the toolbar (the area where the buttons are located):
DocumentReader.setConfig({
    customization: {
        toolbarSize: 46.0
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });

Torch

  • Show/hide the Torch icon:
DocumentReader.setConfig({
    functionality: {
        showTorchButton: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
  • Change the Torch icon for both ON and OFF states:
DocumentReader.setConfig({
    customization: {
        torchButtonOnImage: "Base64String", //For the ON state
        torchButtonOffImage: "Base64String" // For the OFF state
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });

Close

  • Show/hide the Close icon:
DocumentReader.setConfig({
    functionality: {
        showCloseButton: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });

Info

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

  • Change the Close icon:
DocumentReader.setConfig({
    customization: {
        closeButtonImage: "Base64String"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });

Capture

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

  • Show/hide the Capture button:
DocumentReader.setConfig({
    functionality: {
        showCaptureButton: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
  • Set a time interval between the document detection moment and the Capture button appearance. By default, it is 5 seconds:
DocumentReader.setConfig({
    functionality: {
        showCaptureButtonDelayFromDetect: 5
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
  • Set a time interval between the scanning process start and the Capture button appearance. By default, it is 10 seconds:
DocumentReader.setConfig({
    functionality: {
        showCaptureButtonDelayFromStart: 10
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
  • Change the Capture icon:
DocumentReader.setConfig({
    customization: {
        captureButtonImage: "Base64String"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });

Camera Frame Switch

  • Show/hide the Change Frame icon:
DocumentReader.setConfig({
    functionality: {
        showChangeFrameButton: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
  • Change the Change Frame icon for both ON and OFF states:
DocumentReader.setConfig({
    customization: {
        changeFrameButtonExpandImage: "Base64String", //For the ON state
        changeFrameButtonCollapseImage: "Base64String" // For the OFF state
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });

Camera Switch

  • Show/hide the Switch Camera button:
DocumentReader.setConfig({
    functionality: {
        showCameraSwitchButton: true
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });
  • Change the Camera Switch icon:
DocumentReader.setConfig({
    customization: {
        cameraSwitchButtonImage: "Base64String"
    },
}, (str) => { console.log(str) }, (error) => { console.log(error) });

Next Steps