Appearance
Mobile Document Scanner API Reference / DocumentCorrectionViewConfig
Interface: DocumentCorrectionViewConfig
Defined in: src/views/DocumentCorrectionView.ts:133
The DocumentCorrectionViewConfig interface passes settings to the DocumentScanner constructor through the DocumentScannerConfig to apply UI and business logic customizations for the DocumentCorrectionView.
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
correctionViewConfig: {
onFinish: (result) => {
const canvas = result.correctedImageResult.toCanvas();
resultContainer.appendChild(canvas);
}
}
});Properties
container?
optionalcontainer?:string|HTMLElement
Defined in: src/views/DocumentCorrectionView.ts:139
The HTML container element or selector for the DocumentCorrectionView UI.
onFinish?
optionalonFinish?: (result) =>void
Defined in: src/views/DocumentCorrectionView.ts:181
Handler called when the user clicks the "Apply" button.
Parameters
result
The DocumentResult of the scan, including the original image, corrected image, detected boundaries, and scan status
Returns
void
templateFilePath?
optionaltemplateFilePath?:string
Defined in: src/views/DocumentCorrectionView.ts:160
Path to the Capture Vision template file for scanning configuration.
Remarks
This typically does not need to be set as MDS provides a default template for general use. You may set custom paths to self-host resources or fully self-host MDS.
See
Default Value
DEFAULT_DCE_UI_PATH
toolbarButtonsConfig?
optionaltoolbarButtonsConfig?:DocumentCorrectionViewToolbarButtonsConfig
Defined in: src/views/DocumentCorrectionView.ts:147
Configure the appearance and labels of the buttons for the DocumentCorrectionView UI.
See
DocumentCorrectionViewToolbarButtonsConfig
utilizedTemplateNames?
optionalutilizedTemplateNames?:UtilizedTemplateNames
Defined in: src/views/DocumentCorrectionView.ts:173
Capture Vision template names for document detection and normalization.
Remarks
This typically does not need to be set as MDS provides a default template for general use. You may set custom names to self-host resources or fully self-host MDS.
See
Default Value
DEFAULT_TEMPLATE_NAMES