# Interface: DocumentScannerViewConfig

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

# Interface: DocumentScannerViewConfig

Defined in: [src/views/DocumentScannerView.ts:125](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentScannerView.ts#L125)

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

## Remarks

Only rare and edge-case scenarios require editing the UI template or 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 with your actual license key
    scannerViewConfig: {
        cameraEnhancerUIPath: "../dist/document-scanner.ui.xml", // Use the local file
    },
});
```

## Properties

### cameraEnhancerUIPath?

> `optional` **cameraEnhancerUIPath?**: `string`

Defined in: [src/views/DocumentScannerView.ts:157](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentScannerView.ts#L157)

Path to the UI definition file (`.xml`) for the [DocumentScannerView](../classes/DocumentScannerView.md).

#### 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 or customize the template, or fully self-host MDS.

#### See

[Self-hosting resources](https://www.dynamsoft.com/mobile-document-scanner/docs/web/guide/index.html#self-host-resources)

#### Default Value

`DEFAULT_DCE_UI_PATH`

***

### container?

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

Defined in: [src/views/DocumentScannerView.ts:163](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentScannerView.ts#L163)

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

***

### enableAutoCropMode?

> `optional` **enableAutoCropMode?**: `boolean`

Defined in: [src/views/DocumentScannerView.ts:209](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentScannerView.ts#L209)

Set the Auto-Crop mode effective upon entering the [DocumentScannerView](../classes/DocumentScannerView.md) UI.

#### Remarks

Enabling Auto-Crop mode also enables Smart Capture mode.

#### Default Value

```ts
false

@public
```

***

### enableBoundsDetectionMode?

> `optional` **enableBoundsDetectionMode?**: `boolean`

Defined in: [src/views/DocumentScannerView.ts:187](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentScannerView.ts#L187)

Set the document Bounds Detection mode effective upon entering the [DocumentScannerView](../classes/DocumentScannerView.md) UI.

#### Remarks

Bounds Detection mode gets enabled when Smart Capture mode is enabled.

#### Default Value

```ts
true

@public
```

***

### enableFrameVerification?

> `optional` **enableFrameVerification?**: `boolean`

Defined in: [src/views/DocumentScannerView.ts:252](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentScannerView.ts#L252)

Enable automatic frame verification for best quality capture.
When enabled, track clarity scores to find the clearest frame.

#### Default Value

```ts
true
@public
```

***

### enableSmartCaptureMode?

> `optional` **enableSmartCaptureMode?**: `boolean`

Defined in: [src/views/DocumentScannerView.ts:198](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentScannerView.ts#L198)

Set the Smart Capture mode effective upon entering the [DocumentScannerView](../classes/DocumentScannerView.md) UI.

#### Remarks

Enabling Smart Capture mode also enables Bounds Detection mode. Smart Capture mode is enabled when Auto-Capture mode is enabled.

#### Default Value

```ts
false

@public
```

***

### minVerifiedFramesForAutoCapture?

> `optional` **minVerifiedFramesForAutoCapture?**: `number`

Defined in: [src/views/DocumentScannerView.ts:228](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentScannerView.ts#L228)

Set the minimum number of camera frames to detect document boundaries in Smart Capture mode.

#### Remarks

Accepts integer values between 1 and 5, inclusive.

#### Default Value

```ts
2

@public
```

***

### scanRegion?

> `optional` **scanRegion?**: [`ScanRegion`](ScanRegion.md)

Defined in: [src/views/DocumentScannerView.ts:217](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentScannerView.ts#L217)

Define the region within the viewport to detect documents.

#### See

[ScanRegion](ScanRegion.md)

***

### showPoweredByDynamsoft?

> `optional` **showPoweredByDynamsoft?**: `boolean`

Defined in: [src/views/DocumentScannerView.ts:244](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentScannerView.ts#L244)

Set the visibility of the Dynamsoft branding message.

#### Default Value

```ts
true

@public
```

***

### showSubfooter?

> `optional` **showSubfooter?**: `boolean`

Defined in: [src/views/DocumentScannerView.ts:236](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentScannerView.ts#L236)

Set the visibility of the mode selector menu.

#### Default Value

```ts
true

@public
```

***

### templateFilePath?

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

Defined in: [src/views/DocumentScannerView.ts:145](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentScannerView.ts#L145)

Path to the Capture Vision template file for scanning configuration.

***

### utilizedTemplateNames?

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

Defined in: [src/views/DocumentScannerView.ts:176](https://github.com/Dynamsoft/document-scanner-javascript/blob/main/src/views/DocumentScannerView.ts#L176)

Capture Vision template names for document detection and normalization.

#### Default Value

`DEFAULT_TEMPLATE_NAMES`

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