Regula Document Reader SDK allows you to read various kinds of identification documents, passports, driving licenses, ID cards, etc. All processing is performed completely offline on your device. No any data leaving your device.You can use native camera to scan the documents or image from gallery for extract all data from it.This repository contains the source code of the Document Reader API, and the sample application that demonstrates the API calls you can use to interact with the Document Reader library.
npm install document-reader
npx cap sync
initializeReaderAutomatically()
getAvailableScenarios()
parseCoreResults(...)
getAPIVersion()
getCoreVersion()
getCoreMode()
getDatabaseID()
getDatabaseVersion()
getDatabaseDate()
getDatabaseDescription()
getDatabaseCountriesNumber()
getDatabaseDocumentsNumber()
isAuthenticatorAvailableForUse()
getConfig()
getRfidScenario()
selectedScenario()
getScenario(...)
getLicenseExpiryDate()
getLicenseCountryFilter()
licenseIsRfidAvailable()
getDocumentReaderIsReady()
getDocumentReaderStatus()
isRFIDAvailableForUse()
getSessionLogFolder()
setTCCParams(...)
initializeReader()
deinitializeReader()
startNewSession()
startNewPage()
recognizeImageWithOpts(...)
recognizeData(...)
recognizeImages(...)
recognizeImagesWithImageInputs(...)
removeDatabase()
cancelDBUpdate()
resetConfiguration()
setEnableCoreLogs(...)
addPKDCertificates(...)
clearPKDCertificates()
recognizeVideoFrame(...)
showScannerWithCameraID(...)
showScanner(...)
showScannerWithCameraIDAndOpts(...)
stopScanner()
startRFIDReader()
stopRFIDReader()
prepareDatabase(...)
runAutoUpdate(...)
setRfidScenario(...)
setConfig(...)
readRFID()
providePACertificates(...)
provideTACertificates(...)
provideTASignature(...)
setRfidDelegate(...)
- Interfaces
initializeReaderAutomatically() => any
Returns: any
getAvailableScenarios() => any
Returns: any
parseCoreResults(options: { json: string; }) => any
Param | Type |
---|---|
options |
{ json: string; } |
Returns: any
getAPIVersion() => any
Returns: any
getCoreVersion() => any
Returns: any
getCoreMode() => any
Returns: any
getDatabaseID() => any
Returns: any
getDatabaseVersion() => any
Returns: any
getDatabaseDate() => any
Returns: any
getDatabaseDescription() => any
Returns: any
getDatabaseCountriesNumber() => any
Returns: any
getDatabaseDocumentsNumber() => any
Returns: any
isAuthenticatorAvailableForUse() => any
Returns: any
getConfig() => any
Returns: any
getRfidScenario() => any
Returns: any
selectedScenario() => any
Returns: any
getScenario(options: { scenario: string; }) => any
Param | Type |
---|---|
options |
{ scenario: string; } |
Returns: any
getLicenseExpiryDate() => any
Returns: any
getLicenseCountryFilter() => any
Returns: any
licenseIsRfidAvailable() => any
Returns: any
getDocumentReaderIsReady() => any
Returns: any
getDocumentReaderStatus() => any
Returns: any
isRFIDAvailableForUse() => any
Returns: any
getSessionLogFolder() => any
Returns: any
setTCCParams(options: { params: any; }) => any
Param | Type |
---|---|
options |
{ params: any; } |
Returns: any
initializeReader() => any
Returns: any
deinitializeReader() => any
Returns: any
startNewSession() => any
Returns: any
startNewPage() => any
Returns: any
recognizeImageWithOpts(options: { opts: any; base64Image: string; }) => any
Param | Type |
---|---|
options |
{ opts: any; base64Image: string; } |
Returns: any
recognizeData(options: { data: any; }) => any
Param | Type |
---|---|
options |
{ data: any; } |
Returns: any
recognizeImages(options: { base64Images: string[]; }) => any
Param | Type |
---|---|
options |
{ base64Images: {}; } |
Returns: any
recognizeImagesWithImageInputs(options: { base64Images: string[]; }) => any
Param | Type |
---|---|
options |
{ base64Images: {}; } |
Returns: any
removeDatabase() => any
Returns: any
cancelDBUpdate() => any
Returns: any
resetConfiguration() => any
Returns: any
setEnableCoreLogs(options: { enableLogs: boolean; }) => any
Param | Type |
---|---|
options |
{ enableLogs: boolean; } |
Returns: any
addPKDCertificates(options: { certificatesJSON: PKDCertificate[]; }) => any
Param | Type |
---|---|
options |
{ certificatesJSON: {}; } |
Returns: any
clearPKDCertificates() => any
Returns: any
recognizeVideoFrame(options: { opts: any; byteString: string; }) => any
Param | Type |
---|---|
options |
{ opts: any; byteString: string; } |
Returns: any
showScannerWithCameraID(options: { cameraID: number; }) => any
Param | Type |
---|---|
options |
{ cameraID: number; } |
Returns: any
showScanner(options: { cameraID: -1; }) => any
Param | Type |
---|---|
options |
{ cameraID: -1; } |
Returns: any
showScannerWithCameraIDAndOpts(options: { opts: any; cameraID: number; }) => any
Param | Type |
---|---|
options |
{ opts: any; cameraID: number; } |
Returns: any
stopScanner() => any
Returns: any
startRFIDReader() => any
Returns: any
stopRFIDReader() => any
Returns: any
prepareDatabase(options: { dbID: string; }) => any
Param | Type |
---|---|
options |
{ dbID: string; } |
Returns: any
runAutoUpdate(options: { dbID: string; }) => any
Param | Type |
---|---|
options |
{ dbID: string; } |
Returns: any
setRfidScenario(options: { opts: RfidScenario; }) => any
Param | Type |
---|---|
options |
{ opts: RfidScenario; } |
Returns: any
setConfig(options: { opts: RegulaConfig; }) => any
Param | Type |
---|---|
options |
{ opts: RegulaConfig; } |
Returns: any
readRFID() => any
Returns: any
providePACertificates(options: { certificatesJSON: PKDCertificate[]; }) => any
Param | Type |
---|---|
options |
{ certificatesJSON: {}; } |
Returns: any
provideTACertificates(options: { certificatesJSON: PKDCertificate[]; }) => any
Param | Type |
---|---|
options |
{ certificatesJSON: {}; } |
Returns: any
provideTASignature(options: { signature: any; }) => any
Param | Type |
---|---|
options |
{ signature: any; } |
Returns: any
setRfidDelegate(options: { delegate: number; }) => any
Param | Type |
---|---|
options |
{ delegate: number; } |
Returns: any
Prop | Type |
---|---|
binaryData |
string |
resourceType |
number |
privateKey |
string |
Prop | Type |
---|---|
paceStaticBinding |
boolean |
signManagementAction |
number |
readingBuffer |
number |
onlineTAToSignDataType |
number |
onlineTA |
boolean |
writeEid |
boolean |
profilerType |
number |
authProcType |
number |
baseSMProcedure |
number |
pacePasswordType |
number |
terminalType |
number |
universalAccessRights |
boolean |
authorizedRestrictedIdentification |
boolean |
auxVerificationCommunityID |
boolean |
auxVerificationDateOfBirth |
boolean |
skipAA |
boolean |
strictProcessing |
boolean |
pkdDSCertPriority |
boolean |
pkdUseExternalCSCA |
boolean |
trustedPKD |
boolean |
passiveAuth |
boolean |
password |
string |
useSFI |
boolean |
pkdPA |
string |
pkdEAC |
string |
readEPassport |
boolean |
readEID |
boolean |
readEDL |
boolean |
mrz |
string |
eSignPINDefault |
string |
eSignPINNewValue |
string |
authorizedSTSignature |
boolean |
authorizedSTQSignature |
boolean |
authorizedWriteDG17 |
boolean |
authorizedWriteDG18 |
boolean |
authorizedWriteDG19 |
boolean |
authorizedWriteDG20 |
boolean |
authorizedWriteDG21 |
boolean |
authorizedVerifyAge |
boolean |
authorizedVerifyCommunityID |
boolean |
authorizedPrivilegedTerminal |
boolean |
authorizedCANAllowed |
boolean |
authorizedPINManagement |
boolean |
authorizedInstallCert |
boolean |
authorizedInstallQCert |
boolean |
applyAmendments |
boolean |
autoSettings |
boolean |
ePassportDataGroups |
any |
eIDDataGroups |
any |
eDLDataGroups |
any |
reprocessParams |
any |
defaultReadingBufferSize |
number |
Prop | Type |
---|---|
customization |
Customization |
functionality |
Functionality |
processParams |
ProcessParams |
Prop | Type |
---|---|
status |
string |
resultStatus |
string |
cameraFrameDefaultColor |
string |
cameraFrameActiveColor |
string |
statusTextColor |
string |
resultStatusTextColor |
string |
resultStatusBackgroundColor |
string |
multipageButtonBackgroundColor |
string |
tintColor |
string |
activityIndicatorColor |
string |
showStatusMessages |
boolean |
showResultStatusMessages |
boolean |
showHelpAnimation |
boolean |
showNextPageAnimation |
boolean |
showBackgroundMask |
boolean |
cameraFrameBorderWidth |
number |
statusTextSize |
number |
cameraFrameLineLength |
number |
cameraFrameShapeType |
number |
resultStatusTextSize |
number |
cameraFrameOffsetWidth |
number |
customLabelStatus |
string |
multipageAnimationFrontImage |
string |
multipageAnimationBackImage |
string |
borderBackgroundImage |
string |
helpAnimationImage |
string |
statusPositionMultiplier |
string |
resultStatusPositionMultiplier |
number |
backgroundMaskAlpha |
number |
statusTextFont |
string |
statusTextFontStyle |
number |
resultStatusTextFont |
string |
resultStatusTextFontStyle |
number |
helpAnimationImageScaleType |
string |
multipageAnimationFrontImageScaleType |
string |
multipageAnimationBackImageScaleType |
string |
helpAnimationImageMatrix |
any |
multipageAnimationFrontImageMatrix |
any |
multipageAnimationBackImageMatrix |
any |
customStatusPositionMultiplier |
number |
cameraFrameVerticalPositionMultiplier |
number |
cameraFrameLandscapeAspectRatio |
number |
cameraFramePortraitAspectRatio |
number |
cameraFrameCornerRadius |
number |
cameraFrameLineCap |
number |
closeButtonImage |
string |
captureButtonImage |
string |
changeFrameCollapseButtonImage |
string |
changeFrameExpandButtonImage |
string |
cameraSwitchButtonImage |
string |
torchButtonOnImage |
string |
torchButtonOffImage |
string |
changeFrameButtonExpandImage |
string |
changeFrameButtonCollapseImage |
string |
toolbarSize |
number |
statusBackgroundColor |
string |
hologramAnimationImage |
string |
hologramAnimationPositionMultiplier |
number |
hologramAnimationImageMatrix |
any |
hologramAnimationImageScaleType |
string |
uiCustomizationLayer |
any |
Prop | Type |
---|---|
pictureOnBoundsReady |
boolean |
showTorchButton |
boolean |
showCloseButton |
boolean |
videoCaptureMotionControl |
boolean |
showCaptureButton |
boolean |
showChangeFrameButton |
boolean |
showCaptureButtonDelayFromDetect |
number |
showCaptureButtonDelayFromStart |
number |
databaseAutoupdate |
boolean |
showSkipNextPageButton |
boolean |
useAuthenticator |
boolean |
skipFocusingFrames |
boolean |
showCameraSwitchButton |
boolean |
cameraFrame |
string |
btDeviceName |
string |
orientation |
number |
startDocReaderForResult |
boolean |
captureMode |
number |
displayMetadata |
boolean |
cameraSize |
{ width: number; height: number; } |
cameraMode |
number |
excludedCamera2Models |
any |
isZoomEnabled |
boolean |
zoomFactor |
number |
isCameraTorchCheckDisabled |
boolean |
recordScanningProcess |
boolean |
manualMultipageMode |
boolean |
exposure |
number |
rfidTimeout |
number |
onlineProcessingConfiguration |
any |
Prop | Type |
---|---|
multipageProcessing |
boolean |
dateFormat |
string |
logs |
boolean |
debugSaveImages |
boolean |
debugSaveLogs |
boolean |
returnUncroppedImage |
boolean |
customParams |
any |
uvTorchEnabled |
boolean |
debugSaveCroppedImages |
boolean |
scenario |
string |
measureSystem |
number |
captureButtonScenario |
string |
disableFocusingCheck |
boolean |
debugSaveRFIDSession |
boolean |
doublePageSpread |
boolean |
barcodeParserType |
number |
documentIDList |
any |
fieldTypesFilter |
any |
barcodeTypes |
any |
faceMetaData |
any |
timeout |
number |
timeoutFromFirstDetect |
number |
timeoutFromFirstDocType |
number |
manualCrop |
boolean |
perspectiveAngle |
number |
integralImage |
boolean |
minDPI |
number |
returnCroppedBarcode |
boolean |
checkHologram |
boolean |
checkRequiredTextFields |
boolean |
depersonalizeLog |
boolean |
resultTypeOutput |
any |
generateDoublePageSpreadImage |
boolean |
imageDpiOutMax |
number |
alreadyCropped |
boolean |
forceDocID |
number |
matchTextFieldMask |
boolean |
fastDocDetect |
boolean |
updateOCRValidityByGlare |
boolean |
imageQA |
any |