Home

Awesome

capacitor-plugin-dynamsoft-barcode-reader

version

A capacitor plugin for Dynamsoft Barcode Reader.

Install

npm install capacitor-plugin-dynamsoft-barcode-reader
npx cap sync

Supported Platforms

Capacitor Versions

For Capacitor 6, use 2.x.

For Capacitor <= 5, use 1.x.

SDK Versions Used for Different Platforms

ProductAndroidiOSWeb
Dynamsoft Barcode Reader10.4.2010.4.2010.4.20

Supported Barcode Symbologies

Demos

API

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

initLicense(...)

initLicense(options: { license: string; }) => Promise<{ success?: boolean; message?: string; }>
ParamType
options<code>{ license: string; }</code>

Returns: <code>Promise<{ success?: boolean; message?: string; }></code>


initialize()

initialize() => Promise<{ success?: boolean; message?: string; }>

Returns: <code>Promise<{ success?: boolean; message?: string; }></code>


initRuntimeSettingsFromString(...)

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

decode(...)

decode(options: { source: string | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement; template?: string; }) => Promise<{ results: TextResult[]; }>

source: Android and iOS only support base64 string. path: for Android and iOS. template: pass a template name to specify the template

ParamType
options<code>{ source: any; template?: string; }</code>

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


decodeBitmap(...)

decodeBitmap(options: { className?: string; methodName?: string; template?: string; }) => Promise<{ results: TextResult[]; }>

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

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

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


setEngineResourcePaths(...)

setEngineResourcePaths(options: { paths: any; }) => Promise<void>

Web only method to set the engine resource path

ParamType
options<code>{ paths: any; }</code>

Interfaces

TextResult

PropType
barcodeText<code>string</code>
barcodeFormat<code>string</code>
barcodeBytesBase64<code>string</code>
x1<code>number</code>
y1<code>number</code>
x2<code>number</code>
y2<code>number</code>
x3<code>number</code>
y3<code>number</code>
x4<code>number</code>
y4<code>number</code>
</docgen-api>