Skip to main content

Scanner


A scanner is a tool for capturing user documents (such as Aadhaar, PAN, Driving License, Passport, Voter ID, and Cheque). It offers two ways of capturing the desired documents - (primarily) by allowing the users to upload files directly from their devices, and second (if the user is on a mobile device), they can use their device's (front/back) cameras to capture these documents. Note: The widget can also parse the data from these uploaded IDs, which can be used as needed.

Scanner Properties

FeatureDescription
Modal Header LogoAllows adding an image (logo) to the front face of the app. To add, paste the image/logo's URL here.
TextWhat you enter here will be displayed below the widget.
AlignSets the alignment of the above text within the widget's space.
Document TypeSelects the document that needs to be uploaded.
(Available options are: Aadhaar Front/Back, PAN, Driving License, Passport, Voter ID, and Cheque)
ParseReads the data from the scanned IDs, which can then be used in other fields.
Parse Bind VariablesEnabling it allows the parsed info to be assigned to a variable.
Masking Aadhar (Image)Masks the cardholder's pic on the Aadhaar scan.
Masking Aadhar (Number)The first eight digits of the Aadhaar no. are masked on the scan.

Use external API

Enables the use of custom methods to carry out actions within the widget - such as "to turn on the camera", "to switch to either the back or the front camera", "to capture the image", "to either accept the clicked image", or "to go for a retake".

Sample-code:

1) To use the clicked pic: a8forms.Scanner().useThis()

2) To go for a retake: a8forms.Scanner().reTake()

Selecting "Parse Bind Variable" implies that the following fields are displayed per their respective document type.

Document TypeNameID/Acct. No.Date Of BirthGender (Sex)S/D/W Of (Father's Name)AddressStatePinCodeOthers
Aadhaar Front----Checksum Status
Aadhaar Back----Checksum Status
PAN-----
Driving License-Date Of Expiry (NT), Date of Expiry (T), Date of Issue, Blood Group
Passport----Date of Expiry, SurName, Type
Voter ID--
Cheque-------Bank, Branch, City, District, IFSC, MICR

Event Handlers

Event handlers allow you to set triggers for various actions based on the fired events. [Example: You can set it so that an external service is called for sorting or taking a backup of the user data when the "onParseComplete" event is staged.]

onDelete

onDelete- On deleting a file that's uploaded.

onParse

onParse- On initiating the parsing process. These are the four stages (or events) to the process, namely:

  • initiated - On process initiation
  • inProgress - While the process is in action
  • completed - On completion of the action
  • failed - If the process fails in any of these steps

onChange

onChange- On any action made within the scanner widget. (Example: When a file is uploaded.)

onParseComplete

onParseComplete- When the parsing process is completed.


Assigned variables

These are the "variables" assigned to the data that's parsed by the system:

Document TypeOn Parse (Variables, as parsed by the API)On Parse Complete (Variables, after being sorted into the Studio)
Aadhar (Front/Back)scannerscanner
PANscannerscanner
Driving Licensescanner(None...)
Passportscannerscanner
Voter IDscannerscanner
Chequescannerscanner

Camera

On accessing the app via a mobile device, there's an "additional" option to capture the document over the device's camera. The steps that follow are as illustrated below:

010203
On clicking the scanner widget, you will have the option to either "Upload Image" or select "Camera".scannerBy choosing Camera, a pop-up with a request for access to the device's camera will open. (You have to click "Allow" in order to proceed further.scannerNow, you can either use the front or the back camera - to change your currently selected camera, click "Switch Camera" or click "Capture" to take the picture.scanner
04-05
The next screen allows the users to either "Retake" or "Use This" picture as they see fit.scanner-On confirming the capture, a preview is displayed. Also, the parsing of the image happens here. (You will notice the parsed data displayed on its assigned field in the following example.) scanner Note: Here, there's an option to "Remove" the image.