Output Data
- You can change the format of dates displayed in the results. The mask examples are "dd/mm/yyyy", "mm/dd/yyyy", "dd-mm-yyyy", "mm-dd-yyyy", "dd/mm/yy":
DocumentReader.setConfig({
processParams: {
dateFormat: "dd-mm-yy"
},
}, function (m) { }, function (e) { console.log(e); });
- Change the measure system:
DocumentReader.setConfig({
processParams: {
measureSystem: DocumentReader.Enum.RGLMeasureSystem.METRIC
},
}, function (m) { }, function (e) { console.log(e); });
- If a document contains Visual zone, you can set the list of field types to extract. In this case, other fields are skipped during the processing, i.e. document recognition becomes faster. If the fieldTypesFilter is empty, all fields are extracted:
Info
This filter is not applicable to the MRZ.
DocumentReader.setConfig({
processParams: {
fieldTypesFilter: [DocumentReader.Enum.eVisualFieldType.FT_DATE_OF_EXPIRY]
},
}, function (m) { }, function (e) { console.log(e); });
- In case the required fields are not read, their values are returned as empty:
DocumentReader.setConfig({
processParams: {
checkRequiredTextFields: true
},
}, function (m) { }, function (e) { console.log(e); });
- Set the parameter to send the original (uncropped) image to Core for processing:
DocumentReader.setConfig({
processParams: {
returnUncroppedImage: true
},
}, function (m) { }, function (e) { console.log(e); });
- Build an integral image taking into account the quality of fixation of each of the individual images:
DocumentReader.setConfig({
processParams: {
integralImage: true
},
}, function (m) { }, function (e) { console.log(e); });
- Return an image with a cropped barcode:
DocumentReader.setConfig({
processParams: {
returnCroppedBarcode: true
},
}, function (m) { }, function (e) { console.log(e); });
- Specify the types of results to return:
DocumentReader.setConfig({
processParams: {
resultTypeOutput: [
eRPRM_ResultType.RPRM_RESULT_TYPE_MRZ_OCR_EXTENDED,
eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED
]
},
}, function (m) { }, function (e) { console.log(e); });
- Return two aligned and straighten passport pages from an input image as if it was captured from the flatbed scanner:
DocumentReader.setConfig({
processParams: {
generateDoublePageSpreadImage: true
},
}, function (m) { }, function (e) { console.log(e); });
- Set the maximum DPI for an output image (if set to zero, the image is not resized):
DocumentReader.setConfig({
processParams: {
imageDpiOutMax: 300
},
}, function (m) { }, function (e) { console.log(e); });
- Do not crop graphic fields from a document image:
DocumentReader.setConfig({
processParams: {
noGraphics: true
},
}, function (m) { }, function (e) { console.log(e); });
- Shift the date of expiry into the future or past for the specified number of months:
DocumentReader.setConfig({
processParams: {
shiftExpiryDate: 1
},
}, function (m) { }, function (e) { console.log(e); });
- Get the OCR validity failed if there is a glare over the text field on the image:
DocumentReader.setConfig({
processParams: {
updateOCRValidityByGlare: true
},
}, function (m) { }, function (e) { console.log(e); });
- Specify the minimal age of the document holder (in years):
DocumentReader.setConfig({
processParams: {
minimalHolderAge: 18
},
}, function (m) { }, function (e) { console.log(e); });
- When set to
true
, therawResults
property ofDocumentReaderResults
will contain the encrypted containers of the scanning results that may be used for later reprocessing.
DocumentReader.setConfig({
processParams: {
shouldReturnPackageForReprocess: true
},
}, function (m) { }, function (e) { console.log(e); });