DocutainSDKPlugin
Main class of the Docutain SDK.
Methods
initSDK()
initSDK(options): Promise<void>
Initializes the Docutain SDK. This method needs to be called prior to using any functionality of the Docutain SDK.
Parameters
Parameter | Type |
---|---|
options | InitSDKOptions |
Returns
Promise
\<void
>
Since
1.0.0
scanDocument()
scanDocument(args): Promise<ScanDocumentResult>
Starts the document scanner.
Parameters
Parameter | Type |
---|---|
args | object |
args.config | StartDocumentScannerOptions |
Returns
Promise
\<ScanDocumentResult
>
Deprecated
Use startDocumentScanner()
to start the document scanner.
Since
1.0.0
startDocumentScanner()
startDocumentScanner(options): Promise<void>
Starts the document scanner.
Parameters
Parameter | Type |
---|---|
options | StartDocumentScannerOptions |
Returns
Promise
\<void
>
Since
1.0.0
loadFile()
loadFile(options): Promise<void>
Loads a file from the given path.
Parameters
Parameter | Type |
---|---|
options | LoadFileOptions |
Returns
Promise
\<void
>
Since
1.0.0
getText()
getText(): Promise<GetTextResult>
Detects the text of the currently loaded document and returns it.
Returns
Promise
\<GetTextResult
>
Since
1.0.0
getTextPage()
getTextPage(options): Promise<GetTextPageResult>
Detects the text of the currently loaded document page and returns it.
Parameters
Parameter | Type |
---|---|
options | GetTextPageOptions |
Returns
Promise
\<GetTextPageResult
>
Since
1.0.0
setAnalyzeConfiguration()
setAnalyzeConfiguration(args): Promise<void>
This method sets the analyze configuration.
Parameters
Parameter | Type |
---|---|
args | object |
args.config | AnalyzeConfiguration |
Returns
Promise
\<void
>
Deprecated
Use setAnalyzeConfigurationDocScan()
to sets the analyze configuration.
Since
1.0.0
setAnalyzeConfigurationDocScan()
setAnalyzeConfigurationDocScan(options): Promise<void>
This method sets the analyze configuration.
Parameters
Parameter | Type |
---|---|
options | AnalyzeConfigurationOptions |
Returns
Promise
\<void
>
Since
1.0.0
analyze()
analyze(): Promise<AnalyzeResult>
This method get the detected data.
Returns
Promise
\<AnalyzeResult
>
Since
1.0.0
writePDF()
writePDF(options): Promise<WritePDFResult>
This method generates a PDF document from the loaded or scanned pages.
Parameters
Parameter | Type |
---|---|
options | WritePDFOptions |
Returns
Promise
\<WritePDFResult
>
Since
1.0.0
setLogLevel()
setLogLevel(options): Promise<void>
This method sets the log level, which determines the severity of the message.
Parameters
Parameter | Type |
---|---|
options | SetLogLevelOptions |
Returns
Promise
\<void
>
Since
1.0.0
getTraceFile()
getTraceFile(): Promise<GetTraceFileResult>
This method returns the Trace file which includes logging and error messages.
Returns
Promise
\<GetTraceFileResult
>
Since
1.0.0
deleteTempFiles()
deleteTempFiles(options): Promise<void>
This method deletes all temporary files created by the Docutain SDK.
Parameters
Parameter | Type |
---|---|
options | DeleteTempFilesOptions |
Returns
Promise
\<void
>
Since
1.0.0
writeImage()
writeImage(options): Promise<WriteImageResult>
This method generates a JPG from the loaded or scanned page and saves it to a local file.
Parameters
Parameter | Type |
---|---|
options | WriteImageOptions |
Returns
Promise
\<WriteImageResult
>
Since
1.0.0
getImageBytes()
getImageBytes(options): Promise<GetImageBytesResult>
This method generates a JPG from the loaded or scanned page and returns it as a base64 encoded string.
Parameters
Parameter | Type |
---|---|
options | GetImageBytesOptions |
Returns
Promise
\<GetImageBytesResult
>
Since
1.0.0
pageCount()
pageCount(): Promise<PageCountResult>
This method returns the page count of the currently loaded document.
Returns
Promise
\<PageCountResult
>
Since
1.0.0
resetOnboarding()
resetOnboarding(options): Promise<void>
Resets onboarding state.
Parameters
Parameter | Type |
---|---|
options | ResetOnboardingOptions |
Returns
Promise
\<void
>
Since
1.0.0
onboardingDefaultItems()
onboardingDefaultItems(): Promise<OnboardingDefaultItemsResult>
Returns
Promise
\<OnboardingDefaultItemsResult
>
Since
1.0.0
scanTipsDefaultItems()
scanTipsDefaultItems(): Promise<ScanTipsDefaultItemsResult>
Returns
Promise
\<ScanTipsDefaultItemsResult
>
Since
1.0.0
startPhotoPayment()
startPhotoPayment(options): Promise<StartPhotoPaymentResult>
Starts the photo payment process.
Parameters
Parameter | Type |
---|---|
options | StartPhotoPaymentOptions |
Returns
Promise
\<StartPhotoPaymentResult
>
Since
1.0.0
emptyResultScreenDefaultItems()
emptyResultScreenDefaultItems(): Promise<EmptyResultScreenDefaultItemsResult>
Returns
Promise
\<EmptyResultScreenDefaultItemsResult
>
Since
1.0.0