4.0.0 • Published 3 months ago

capacitor-plugin-dynamsoft-document-normalizer v4.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

capacitor-plugin-dynamsoft-document-normalizer

A document scanning plugin for Capacitor using Dynamsoft Document Normalizer.

Online demo

Versions

For Capacitor v7, use versions 4.x.

For Capacitor v6, use versions 3.x.

For Capacitor v5, use versions 1.x and 2.x.

For Capacitor v4, use v0.x.

SDK Versions Used for Different Platforms

ProductAndroidiOSWeb
Dynamsoft Document Normalizer2.x2.x2.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>
ParamType
options{ license: string; }

initRuntimeSettingsFromString(...)

initRuntimeSettingsFromString(options: { template: string; }) => Promise<void>
ParamType
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

ParamType
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.

ParamType
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

ParamType
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

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

Returns: Promise<{ result: NormalizedImageResult; }>


setEngineResourcePaths(...)

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

Web Only

ParamType
options{ paths: any; }

Interfaces

DetectedQuadResultItem

PropTypeDescription
locationQuadrilateral
confidenceAsDocumentBoundarynumber
CrossVerificationStatusEnumCrossVerificationStatusIndicates whether the DetectedQuadResultItem has passed corss verification.

Quadrilateral

PropType
pointsPoint, Point, Point, Point
areanumber

Point

PropType
xnumber
ynumber

NormalizedImageResult

PropType
base64string
pathstring

Enums

EnumCrossVerificationStatus

MembersValueDescription
CVS_NOT_VERIFIED0The cross verification has not been performed yet.
CVS_PASSED1The cross verification has been passed successfully.
CVS_FAILED2The cross verification has failed.
4.0.0

3 months ago

3.2.1

5 months ago

3.1.1

7 months ago

3.1.0

7 months ago

3.0.0

10 months ago

2.2.1

1 year ago

2.2.0

1 year ago

2.1.1

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.1.0

2 years ago

1.0.0

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.4

2 years ago

0.1.5

2 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.1

3 years ago