Home

Awesome

capacitor-plugin-dynamsoft-label-recognizer

Capacitor plugin of Dynamsoft Label Recognizer which brings text recognition ability to your apps.

Versions

For Capacitor v6, use v2.x.

For Capacitor v5, use v1.x.

For Capacitor v4, use v0.x.

SDK Versions Used for Different Platforms

ProductAndroidiOSWeb
Dynamsoft Label Recognizer2.x2.x2.x

Install

npm install capacitor-plugin-dynamsoft-label-recognizer
npx cap sync

Demo

Vanilla JS example

API

<docgen-index> </docgen-index> <docgen-api> <!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

initialize()

initialize() => Promise<void>

initLicense(...)

initLicense(options: { license: string; }) => Promise<void>
ParamType
options<code>{ license: string; }</code>

recognizeBase64String(...)

recognizeBase64String(options: { base64: string; }) => Promise<{ results: DLRResult[]; }>
ParamType
options<code>{ base64: string; }</code>

Returns: <code>Promise<{ results: DLRResult[]; }></code>


recognizeBitmap(...)

recognizeBitmap(options: { className?: string; methodName?: string; }) => Promise<{ results: DLRResult[]; }>

Android and iOS only method which directly read camera frames from capacitor-plugin-camera

ParamType
options<code>{ className?: string; methodName?: string; }</code>

Returns: <code>Promise<{ results: DLRResult[]; }></code>


updateRuntimeSettings(...)

updateRuntimeSettings(options: { settings: RuntimeSettings; }) => Promise<void>
ParamType
options<code>{ settings: <a href="#runtimesettings">RuntimeSettings</a>; }</code>

resetRuntimeSettings()

resetRuntimeSettings() => Promise<void>

setEngineResourcesPath(...)

setEngineResourcesPath(options: { path: string; }) => Promise<void>
ParamType
options<code>{ path: string; }</code>

addListener('onResourcesLoadStarted', ...)

addListener(eventName: 'onResourcesLoadStarted', listenerFunc: onResourcesLoadStartedListener) => Promise<PluginListenerHandle>
ParamType
eventName<code>'onResourcesLoadStarted'</code>
listenerFunc<code><a href="#onresourcesloadstartedlistener">onResourcesLoadStartedListener</a></code>

Returns: <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>


addListener('onResourcesLoaded', ...)

addListener(eventName: 'onResourcesLoaded', listenerFunc: onResourcesLoadedListener) => Promise<PluginListenerHandle>
ParamType
eventName<code>'onResourcesLoaded'</code>
listenerFunc<code><a href="#onresourcesloadedlistener">onResourcesLoadedListener</a></code>

Returns: <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>


removeAllListeners()

removeAllListeners() => Promise<void>

Interfaces

DLRResult

PropType
location<code><a href="#dlrquadrilateral">DLRQuadrilateral</a></code>
confidence<code>number</code>
lineResults<code>DLRLineResult[]</code>

DLRQuadrilateral

PropType
points<code>DLRPoint[]</code>

DLRPoint

PropType
x<code>number</code>
y<code>number</code>

DLRLineResult

PropType
text<code>string</code>
location<code><a href="#dlrquadrilateral">DLRQuadrilateral</a></code>
confidence<code>number</code>
isCheckDigitMatched<code>boolean</code>

RuntimeSettings

PropType
template<code>string</code>
customModelConfig<code><a href="#custommodelconfig">CustomModelConfig</a></code>

CustomModelConfig

PropType
customModelFolder<code>string</code>
customModelFileNames<code>string[]</code>

PluginListenerHandle

PropType
remove<code>() => Promise<void></code>

Type Aliases

onResourcesLoadStartedListener

<code>(resourcePath: string): void</code>

onResourcesLoadedListener

<code>(resourcePath: string): void</code>

</docgen-api>