capacitor-plugin-dynamsoft-label-recognizer
v1.1.0
Published
Capacitor plugin of Dynamsoft Label Recognizer which brings text recognition ability to your apps.
Downloads
14
Readme
capacitor-plugin-dynamsoft-label-recognizer
Capacitor plugin of Dynamsoft Label Recognizer which brings text recognition ability to your apps.
Versions
For Capacitor v5, use v1.x.
For Capacitor v4, use v0.x.
Install
npm install capacitor-plugin-dynamsoft-label-recognizer
npx cap sync
Demo
API
initialize()
initLicense(...)
recognizeBase64String(...)
recognizeBitmap()
updateRuntimeSettings(...)
resetRuntimeSettings()
setEngineResourcesPath(...)
addListener('onResourcesLoadStarted', ...)
addListener('onResourcesLoaded', ...)
removeAllListeners()
- Interfaces
- Type Aliases
initialize()
initialize() => Promise<void>
initLicense(...)
initLicense(options: { license: string; }) => Promise<void>
| Param | Type |
| ------------- | --------------------------------- |
| options
| { license: string; } |
recognizeBase64String(...)
recognizeBase64String(options: { base64: string; }) => Promise<{ results: DLRResult[]; }>
| Param | Type |
| ------------- | -------------------------------- |
| options
| { base64: string; } |
Returns: Promise<{ results: DLRResult[]; }>
recognizeBitmap()
recognizeBitmap() => Promise<{ results: DLRResult[]; }>
Android and iOS only method which directly read camera frames from capacitor-plugin-dynamsoft-camera-preview
Returns: Promise<{ results: DLRResult[]; }>
updateRuntimeSettings(...)
updateRuntimeSettings(options: { settings: RuntimeSettings; }) => Promise<void>
| Param | Type |
| ------------- | -------------------------------------------------------------------------- |
| options
| { settings: RuntimeSettings; } |
resetRuntimeSettings()
resetRuntimeSettings() => Promise<void>
setEngineResourcesPath(...)
setEngineResourcesPath(options: { path: string; }) => Promise<void>
| Param | Type |
| ------------- | ------------------------------ |
| options
| { path: string; } |
addListener('onResourcesLoadStarted', ...)
addListener(eventName: 'onResourcesLoadStarted', listenerFunc: onResourcesLoadStartedListener) => Promise<PluginListenerHandle> & PluginListenerHandle
| Param | Type |
| ------------------ | ----------------------------------------------------------------------------------------- |
| eventName
| 'onResourcesLoadStarted' |
| listenerFunc
| onResourcesLoadStartedListener |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
addListener('onResourcesLoaded', ...)
addListener(eventName: 'onResourcesLoaded', listenerFunc: onResourcesLoadedListener) => Promise<PluginListenerHandle> & PluginListenerHandle
| Param | Type |
| ------------------ | ------------------------------------------------------------------------------- |
| eventName
| 'onResourcesLoaded' |
| listenerFunc
| onResourcesLoadedListener |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
removeAllListeners()
removeAllListeners() => Promise<void>
Interfaces
DLRResult
| Prop | Type |
| ----------------- | ------------------------------------------------------------- |
| location
| DLRQuadrilateral |
| confidence
| number |
| lineResults
| DLRLineResult[] |
DLRQuadrilateral
| Prop | Type |
| ------------ | ----------------------- |
| points
| DLRPoint[] |
DLRPoint
| Prop | Type |
| ------- | ------------------- |
| x
| number |
| y
| number |
DLRLineResult
| Prop | Type |
| ------------------------- | ------------------------------------------------------------- |
| text
| string |
| location
| DLRQuadrilateral |
| confidence
| number |
| isCheckDigitMatched
| boolean |
RuntimeSettings
| Prop | Type |
| ----------------------- | --------------------------------------------------------------- |
| template
| string |
| customModelConfig
| CustomModelConfig |
CustomModelConfig
| Prop | Type |
| -------------------------- | --------------------- |
| customModelFolder
| string |
| customModelFileNames
| string[] |
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove
| () => Promise<void> |
Type Aliases
onResourcesLoadStartedListener
(resourcePath: string): void
onResourcesLoadedListener
(resourcePath: string): void