capacitor-plugin-dynamsoft-document-normalizer
TypeScript icon, indicating that this package has built-in type declarations

2.2.1 • Public • Published

capacitor-plugin-dynamsoft-document-normalizer

A document scanning plugin for Capacitor using Dynamsoft Document Normalizer.

Online demo

Versions

For Capacitor v5, use versions >= 1.0.

For Capacitor v4, use v0.x.

Supported Platforms

  • Web
  • Android
  • iOS

Install

npm install capacitor-plugin-dynamsoft-document-normalizer
npx cap sync

API

initialize()

initialize() => Promise<void>

initLicense(...)

initLicense(options: { license: string; }) => Promise<void>
Param Type
options { license: string; }

initRuntimeSettingsFromString(...)

initRuntimeSettingsFromString(options: { template: string; }) => Promise<void>
Param Type
options { template: string; }

detect(...)

detect(options: { path?: string; source?: string | HTMLImageElement | HTMLCanvasElement; template?: string; }) => Promise<{ results: DetectedQuadResultItem[]; }>

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

Param Type
options { path?: string; source?: any; template?: string; }

Returns: Promise<{ results: DetectedQuadResultItem[]; }>


detectBitmap(...)

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

Android and iOS only method which directly reads camera frames from capacitor-plugin-camera. Pass a template name to specify the template.

Param Type
options { className?: string; methodName?: string; template?: string; }

Returns: Promise<{ results: DetectedQuadResultItem[]; }>


normalize(...)

normalize(options: { path?: string; source?: string | HTMLImageElement | HTMLCanvasElement; quad: Quadrilateral; template?: string; saveToFile?: boolean; includeBase64?: boolean; }) => Promise<{ result: NormalizedImageResult; }>

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

Param Type
options { path?: string; source?: any; quad: Quadrilateral; template?: string; saveToFile?: boolean; includeBase64?: boolean; }

Returns: Promise<{ result: NormalizedImageResult; }>


detectAndNormalize(...)

detectAndNormalize(options: { path?: string; source?: string | HTMLImageElement | HTMLCanvasElement; template?: string; saveToFile?: boolean; includeBase64?: boolean; }) => Promise<{ result: NormalizedImageResult; }>

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

Param Type
options { path?: string; source?: any; template?: string; saveToFile?: boolean; includeBase64?: boolean; }

Returns: Promise<{ result: NormalizedImageResult; }>


setEngineResourcePaths(...)

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

Web Only

Param Type
options { paths: any; }

Interfaces

DetectedQuadResultItem

Prop Type
location Quadrilateral
confidenceAsDocumentBoundary number

Quadrilateral

Prop Type
points [Point, Point, Point, Point]

Point

Prop Type
x number
y number

NormalizedImageResult

Prop Type
base64 string
path string

Package Sidebar

Install

npm i capacitor-plugin-dynamsoft-document-normalizer

Weekly Downloads

0

Version

2.2.1

License

MIT

Unpacked Size

166 kB

Total Files

32

Last publish

Collaborators

  • xulihang