cordova-plugin-documentreader-mrz
Cordova plugin for reading and validation of identification documents. Using Regula Document Reader with MRZ Core inside for iOS version.
Install
Install plugn:
cordova plugin add cordova-plugin-documentreader-mrz --variable CAMERA_USAGE_DESCRIPTION="To take photo" --save
Usage
You can get trial license for demo application at licensing.regulaforensics.com (regula.license
file).
InitializeReader:
DocumentReader;
ScanDocument:
DocumentReader;
How to build demo application
- Open terminal inside empty folder and run
cordova create testdocumentreader <YOUR_APPLICATION_ID> DocumentReaderTest
- Run
cd testdocumentreader
- Add plugin:
cordova plugin add cordova-plugin-documentreader-mrz --variable CAMERA_USAGE_DESCRIPTION="To take photo" --save
- Add cordova-plugin-file for get license file:
cordova plugin add cordova-plugin-file --save
- Get trial license for demo application at licensing.regulaforensics.com (
regula.license
file). When you will create license use<YOUR_APPLICATION_ID>
like bundle ID (see the first paragraph). - Put license to
www/regula.license
. - Put this code inside onDeviceReady method file
index.js
(path:www/js/index.js
) for calling DocumentReader plugin:
var app = ... { this; window; } { fileEntry; } { DocumentReader; } { // set scenarion to DocumentReader DocumentReader; // start process of scanning document DocumentReader; } ...; ...
- Run
cordova platform add ios
for iOS version - Run
cordova platform add android
for Android version - Run iOS or Android project.