# Interface: DocumentCorrectionViewConfig

[Mobile Document Scanner API Reference](../index.md) / DocumentCorrectionViewConfig

# Interface: DocumentCorrectionViewConfig

Defined in: [src/views/DocumentCorrectionView.ts:133](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentCorrectionView.ts#L133)

The `DocumentCorrectionViewConfig` interface passes settings to the [DocumentScanner](../classes/DocumentScanner.md) constructor through the [DocumentScannerConfig](DocumentScannerConfig.md) to apply UI and business logic customizations for the [DocumentCorrectionView](../classes/DocumentNormalizerView.md).

## 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?

> `optional` **container?**: `string` \| `HTMLElement`

Defined in: [src/views/DocumentCorrectionView.ts:139](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentCorrectionView.ts#L139)

The HTML container element or selector for the [DocumentCorrectionView](../classes/DocumentNormalizerView.md) UI.

***

### onFinish?

> `optional` **onFinish?**: (`result`) => `void`

Defined in: [src/views/DocumentCorrectionView.ts:181](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentCorrectionView.ts#L181)

Handler called when the user clicks the "Apply" button.

#### Parameters

##### result

[`DocumentResult`](DocumentResult.md)

The [DocumentResult](DocumentResult.md) of the scan, including the original image, corrected image, detected boundaries, and scan status

#### Returns

`void`

***

### templateFilePath?

> `optional` **templateFilePath?**: `string`

Defined in: [src/views/DocumentCorrectionView.ts:160](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentCorrectionView.ts#L160)

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

 - [Self-hosting resources](https://www.dynamsoft.com/mobile-document-scanner/docs/web/guide/index.html#self-host-resources)
 - [DCV templates](https://www.dynamsoft.com/capture-vision/docs/core/parameters/file/capture-vision-template.html?lang=javascript)

#### Default Value

`DEFAULT_DCE_UI_PATH`

***

### toolbarButtonsConfig?

> `optional` **toolbarButtonsConfig?**: [`DocumentCorrectionViewToolbarButtonsConfig`](DocumentCorrectionViewToolbarButtonsConfig.md)

Defined in: [src/views/DocumentCorrectionView.ts:147](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentCorrectionView.ts#L147)

Configure the appearance and labels of the buttons for the [DocumentCorrectionView](../classes/DocumentNormalizerView.md) UI.

#### See

[DocumentCorrectionViewToolbarButtonsConfig](DocumentCorrectionViewToolbarButtonsConfig.md)

***

### utilizedTemplateNames?

> `optional` **utilizedTemplateNames?**: [`UtilizedTemplateNames`](UtilizedTemplateNames.md)

Defined in: [src/views/DocumentCorrectionView.ts:173](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentCorrectionView.ts#L173)

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

 - [Self-hosting resources](https://www.dynamsoft.com/mobile-document-scanner/docs/web/guide/index.html#self-host-resources)
 - [DCV templates](https://www.dynamsoft.com/capture-vision/docs/core/parameters/file/capture-vision-template.html?lang=javascript)

#### Default Value

`DEFAULT_TEMPLATE_NAMES`
