# Interface: MobileWebCaptureConfig

[Mobile Web Capture API Reference](../index.md) / MobileWebCaptureConfig

# Interface: MobileWebCaptureConfig

The `MobileWebCaptureConfig` interface passes settings to the [MobileWebCapture](../classes/MobileWebCapture.md) constructor to customize the UI, the workflow, and how documents leave the application.

## Remarks

[MobileWebCaptureConfig.license](#license) is the only property required to instantiate a [MobileWebCapture](../classes/MobileWebCapture.md) object; MWC uses sensible defaults for everything else. The per-View configuration objects reach further into each View — see the customization guide for worked examples of each.

## See

[Customization guide](https://www.dynamsoft.com/mobile-document-scanner/docs/web/code-gallery/mobile-web-capture/customization-guide.html)

## Example

```javascript
const mobileWebCapture = new Dynamsoft.MobileWebCapture({
    license: "YOUR_LICENSE_KEY_HERE",
    ddvResourcePath: "./dist/libs/dynamsoft-document-viewer/dist/",
    documentScannerConfig: {
        scannerViewConfig: {
            cameraEnhancerUIPath: "./dist/libs/dynamsoft-document-scanner/dist/document-scanner.ui.xml",
        },
        engineResourcePaths: {
            std: "./dist/libs/dynamsoft-capture-vision-std/dist/",
            dip: "./dist/libs/dynamsoft-image-processing/dist/",
            core: "./dist/libs/dynamsoft-core/dist/",
            license: "./dist/libs/dynamsoft-license/dist/",
            cvr: "./dist/libs/dynamsoft-capture-vision-router/dist/",
            ddn: "./dist/libs/dynamsoft-document-normalizer/dist/",
        },
    },
});
```

## Properties

### container?

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

The container element, or a selector for it, holding the entire MWC UI.

#### Remarks

When omitted, MWC creates a container filling the viewport.

***

### ddvResourcePath?

> `optional` **ddvResourcePath?**: `string`

Path to the Dynamsoft Document Viewer resources — the `.wasm` engine files and stylesheet MWC loads at runtime.

#### Remarks

Set this to self-host the resources instead of loading them from the CDN. Self-hosting the scanner's own engine resources is configured separately, through [MobileWebCaptureConfig.documentScannerConfig](#documentscannerconfig).

#### See

[Self-hosting resource files](https://www.dynamsoft.com/mobile-document-scanner/docs/web/code-gallery/mobile-web-capture/customization-guide.html#self-hosting-resource-files)

#### Default Value

`"https://cdn.jsdelivr.net/npm/dynamsoft-document-viewer@3.2.0/dist"`

***

### documentScannerConfig?

> `optional` **documentScannerConfig?**: `Omit`\<[`DocumentScannerConfig`](https://www.dynamsoft.com/mobile-document-scanner/docs/web/api/interfaces/DocumentScannerConfig.html), `"container"` \| `"license"`\> & `object`

Configures the built-in Mobile Document Scanner used for capture.

#### Type Declaration

##### correctionViewConfig?

> `optional` **correctionViewConfig?**: `Omit`\<[`DocumentCorrectionViewConfig`](https://www.dynamsoft.com/mobile-document-scanner/docs/web/api/interfaces/DocumentCorrectionViewConfig.html), `"container"` \| `"templateFilePath"` \| `"utilizedTemplateNames"` \| `"_showCorrectionView"`\>

##### resultViewConfig?

> `optional` **resultViewConfig?**: `Omit`\<[`DocumentResultViewConfig`](https://www.dynamsoft.com/mobile-document-scanner/docs/web/api/interfaces/DocumentResultViewConfig.html), `"container"`\>

##### scannerViewConfig?

> `optional` **scannerViewConfig?**: `Omit`\<[`DocumentScannerViewConfig`](https://www.dynamsoft.com/mobile-document-scanner/docs/web/api/interfaces/DocumentScannerViewConfig.html), `"container"` \| `"templateFilePath"` \| `"utilizedTemplateNames"` \| `"_showCorrectionView"`\>

#### Remarks

MWC owns the scanner's container and license, so those two properties are omitted here; everything else in the MDS configuration applies, including `engineResourcePaths` for self-hosting and `showCorrectionView`/`showResultView` for skipping steps of the capture workflow.

#### See

[DocumentScannerConfig](https://www.dynamsoft.com/mobile-document-scanner/docs/web/api/interfaces/DocumentScannerConfig.html)

***

### documentViewConfig?

> `optional` **documentViewConfig?**: `Pick`\<[`DocumentViewConfig`](DocumentViewConfig.md), `"container"` \| `"toolbarButtonsConfig"`\>

Configures the `DocumentView`.

***

### exportConfig?

> `optional` **exportConfig?**: [`ExportConfig`](ExportConfig.md)

Handlers connecting MWC's upload, download, and delete features to your server.

#### Remarks

Which buttons appear depends on which handlers are defined — see [ExportConfig](ExportConfig.md).

***

### historyViewConfig?

> `optional` **historyViewConfig?**: `Pick`\<[`HistoryViewConfig`](HistoryViewConfig.md), `"container"` \| `"toolbarButtonsConfig"`\>

Configures the `HistoryView`.

***

### libraryViewConfig?

> `optional` **libraryViewConfig?**: `Pick`\<[`LibraryViewConfig`](LibraryViewConfig.md), `"container"` \| `"toolbarButtonsConfig"`\>

Configures the `LibraryView`.

***

### license?

> `optional` **license?**: `string`

The license key for using Mobile Web Capture.

#### Remarks

This is the only required property to instantiate a [MobileWebCapture](../classes/MobileWebCapture.md) object. MWC and Mobile Document Scanner share license keys — a key for either works for both.

***

### onClose?

> `optional` **onClose?**: () => `void`

Runs when the user closes this Mobile Web Capture instance.

#### Returns

`void`

***

### pageViewConfig?

> `optional` **pageViewConfig?**: `Pick`\<[`PageViewConfig`](PageViewConfig.md), `"container"` \| `"toolbarButtonsConfig"`\>

Configures the `PageView`.

***

### scanner?

> `optional` **scanner?**: [`MWCScanner`](MWCScanner.md)

A custom scanner to capture pages with, in place of the built-in Mobile Document Scanner.

#### Remarks

Any object satisfying [MWCScanner](MWCScanner.md) can be plugged in here. When omitted, MWC scans with Mobile Document Scanner, configured through [MobileWebCaptureConfig.documentScannerConfig](#documentscannerconfig).

***

### showLibraryView?

> `optional` **showLibraryView?**: `boolean`

Whether the `LibraryView` is available, allowing the user to manage several documents at once.

#### Remarks

With the `LibraryView` disabled MWC manages a single document, and `launch` opens the `DocumentView` on it. With it enabled, `launch` opens the `LibraryView` unless it is given a document to open.

#### Default Value

`false`

***

### transferViewConfig?

> `optional` **transferViewConfig?**: `Pick`\<[`TransferViewConfig`](TransferViewConfig.md), `"container"` \| `"toolbarButtonsConfig"`\>

Configures the `TransferView`.
