Initialization

This page covers the description of the initialization process

The DocumentReader initialization works fully offline. It simply use license file, which you can get here: licensing.regulaforensics.com. You should add the regula.license file to your project.

window.resolveLocalFileSystemURL(
cordova.file.applicationDirectory + "www/regula.license",
function (fileEntry) {
fileEntry.file(function (file) {
var reader = new FileReader();
reader.onloadend = function (e) {
var license = this.result;
DocumentReader.initializeReader(
license,
function (message) {
console.log(message);
},
function (error) {
console.log(error);
}
);
}
reader.readAsArrayBuffer(file);
});
},
function (e) {
console.log("Error");
}
);