Appearance
Mobile Document Scanner API Reference / DocumentResultViewConfig
Interface: DocumentResultViewConfig
Defined in: src/views/DocumentResultView.ts:154
The DocumentResultViewConfig interface passes settings to the DocumentScanner constructor through the DocumentScannerConfig to apply UI and business logic customizations for the DocumentResultView.
Remarks
Only rare and edge-case scenarios require editing MDS source code. MDS uses sensible default values for all omitted properties.
Example
javascript
const documentScanner = new Dynamsoft.DocumentScanner({
license: "YOUR_LICENSE_KEY_HERE", // Replace this with your actual license key
resultViewConfig: {
onDone: async (result) =>
{
const canvas = result.correctedImageResult.toCanvas();
resultContainer.appendChild(canvas);
}
}
});Properties
container?
optionalcontainer?:string|HTMLElement
Defined in: src/views/DocumentResultView.ts:160
The HTML container element or selector for the DocumentResultView UI.
onDone?
optionalonDone?: (result) =>Promise<void>
Defined in: src/views/DocumentResultView.ts:176
Handler called when the user clicks the "Done" button.
Parameters
result
The DocumentResult of the scan, including the original image, corrected image, detected boundaries, and scan status
Returns
Promise<void>
onUpload?
optionalonUpload?: (result) =>Promise<void>
Defined in: src/views/DocumentResultView.ts:184
Handler called when the user clicks the "Upload" button.
Parameters
result
The DocumentResult of the scan, including the original image, corrected image, detected boundaries, and scan status
Returns
Promise<void>
toolbarButtonsConfig?
optionaltoolbarButtonsConfig?:DocumentResultViewToolbarButtonsConfig
Defined in: src/views/DocumentResultView.ts:168
Configure the appearance and labels of the buttons for the DocumentResultView UI.