Skip to content

Latest commit

 

History

History
994 lines (670 loc) · 28.8 KB

README.md

File metadata and controls

994 lines (670 loc) · 28.8 KB

document-reader

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.

Install

npm install document-reader
npx cap sync

API

initializeReaderAutomatically()

initializeReaderAutomatically() => any

Returns: any


getAvailableScenarios()

getAvailableScenarios() => any

Returns: any


parseCoreResults(...)

parseCoreResults(options: { json: string; }) => any
Param Type
options { json: string; }

Returns: any


getAPIVersion()

getAPIVersion() => any

Returns: any


getCoreVersion()

getCoreVersion() => any

Returns: any


getCoreMode()

getCoreMode() => any

Returns: any


getDatabaseID()

getDatabaseID() => any

Returns: any


getDatabaseVersion()

getDatabaseVersion() => any

Returns: any


getDatabaseDate()

getDatabaseDate() => any

Returns: any


getDatabaseDescription()

getDatabaseDescription() => any

Returns: any


getDatabaseCountriesNumber()

getDatabaseCountriesNumber() => any

Returns: any


getDatabaseDocumentsNumber()

getDatabaseDocumentsNumber() => any

Returns: any


isAuthenticatorAvailableForUse()

isAuthenticatorAvailableForUse() => any

Returns: any


getConfig()

getConfig() => any

Returns: any


getRfidScenario()

getRfidScenario() => any

Returns: any


selectedScenario()

selectedScenario() => any

Returns: any


getScenario(...)

getScenario(options: { scenario: string; }) => any
Param Type
options { scenario: string; }

Returns: any


getLicenseExpiryDate()

getLicenseExpiryDate() => any

Returns: any


getLicenseCountryFilter()

getLicenseCountryFilter() => any

Returns: any


licenseIsRfidAvailable()

licenseIsRfidAvailable() => any

Returns: any


getDocumentReaderIsReady()

getDocumentReaderIsReady() => any

Returns: any


getDocumentReaderStatus()

getDocumentReaderStatus() => any

Returns: any


isRFIDAvailableForUse()

isRFIDAvailableForUse() => any

Returns: any


getSessionLogFolder()

getSessionLogFolder() => any

Returns: any


setTCCParams(...)

setTCCParams(options: { params: any; }) => any
Param Type
options { params: any; }

Returns: any


initializeReader()

initializeReader() => any

Returns: any


deinitializeReader()

deinitializeReader() => any

Returns: any


startNewSession()

startNewSession() => any

Returns: any


startNewPage()

startNewPage() => any

Returns: any


recognizeImageWithOpts(...)

recognizeImageWithOpts(options: { opts: any; base64Image: string; }) => any
Param Type
options { opts: any; base64Image: string; }

Returns: any


recognizeData(...)

recognizeData(options: { data: any; }) => any
Param Type
options { data: any; }

Returns: any


recognizeImages(...)

recognizeImages(options: { base64Images: string[]; }) => any
Param Type
options { base64Images: {}; }

Returns: any


recognizeImagesWithImageInputs(...)

recognizeImagesWithImageInputs(options: { base64Images: string[]; }) => any
Param Type
options { base64Images: {}; }

Returns: any


removeDatabase()

removeDatabase() => any

Returns: any


cancelDBUpdate()

cancelDBUpdate() => any

Returns: any


resetConfiguration()

resetConfiguration() => any

Returns: any


setEnableCoreLogs(...)

setEnableCoreLogs(options: { enableLogs: boolean; }) => any
Param Type
options { enableLogs: boolean; }

Returns: any


addPKDCertificates(...)

addPKDCertificates(options: { certificatesJSON: PKDCertificate[]; }) => any
Param Type
options { certificatesJSON: {}; }

Returns: any


clearPKDCertificates()

clearPKDCertificates() => any

Returns: any


recognizeVideoFrame(...)

recognizeVideoFrame(options: { opts: any; byteString: string; }) => any
Param Type
options { opts: any; byteString: string; }

Returns: any


showScannerWithCameraID(...)

showScannerWithCameraID(options: { cameraID: number; }) => any
Param Type
options { cameraID: number; }

Returns: any


showScanner(...)

showScanner(options: { cameraID: -1; }) => any
Param Type
options { cameraID: -1; }

Returns: any


showScannerWithCameraIDAndOpts(...)

showScannerWithCameraIDAndOpts(options: { opts: any; cameraID: number; }) => any
Param Type
options { opts: any; cameraID: number; }

Returns: any


stopScanner()

stopScanner() => any

Returns: any


startRFIDReader()

startRFIDReader() => any

Returns: any


stopRFIDReader()

stopRFIDReader() => any

Returns: any


prepareDatabase(...)

prepareDatabase(options: { dbID: string; }) => any
Param Type
options { dbID: string; }

Returns: any


runAutoUpdate(...)

runAutoUpdate(options: { dbID: string; }) => any
Param Type
options { dbID: string; }

Returns: any


setRfidScenario(...)

setRfidScenario(options: { opts: RfidScenario; }) => any
Param Type
options { opts: RfidScenario; }

Returns: any


setConfig(...)

setConfig(options: { opts: RegulaConfig; }) => any
Param Type
options { opts: RegulaConfig; }

Returns: any


readRFID()

readRFID() => any

Returns: any


providePACertificates(...)

providePACertificates(options: { certificatesJSON: PKDCertificate[]; }) => any
Param Type
options { certificatesJSON: {}; }

Returns: any


provideTACertificates(...)

provideTACertificates(options: { certificatesJSON: PKDCertificate[]; }) => any
Param Type
options { certificatesJSON: {}; }

Returns: any


provideTASignature(...)

provideTASignature(options: { signature: any; }) => any
Param Type
options { signature: any; }

Returns: any


setRfidDelegate(...)

setRfidDelegate(options: { delegate: number; }) => any
Param Type
options { delegate: number; }

Returns: any


Interfaces

PKDCertificate

Prop Type
binaryData string
resourceType number
privateKey string

RfidScenario

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

RegulaConfig

Prop Type
customization Customization
functionality Functionality
processParams ProcessParams

Customization

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

Functionality

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

ProcessParams

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