Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions api/mobile-web-capture.md
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,45 @@ const mobileWebCapture = new Dynamsoft.MobileWebCapture({
const fileName = `New_Document_${Date.now().toString().slice(-5)}`;
await mobileWebCapture.launch(fileName);
})();
```

### `MWCScanner`

MWC can scan from objects that satisfy this interface. When unassigned, MWC uses DDS by default.

#### Properties

##### `initialize()`

Initialize scanner resources.

###### **Type**

```typescript
async initialize(): Promise<any>
```

#### `launch()`

Launch the scanner, and return a promise of a scan result that resolves once the scan completes. This scan result contains an `_imageData` object which contains a `toBlob()` that returns the scanned image as a blob. `imageData` (**not `_imageData`**) must be set to `true`.

##### **Type**

```typescript
async launch(): Promise<{
_imageData: {
toBlob()
},
imageData: boolean,
}>
```

#### `dispose()`

Destructor for the scanner object.

##### **Type**

```typescript
dispose(): void
```
7 changes: 4 additions & 3 deletions releasenotes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ permalink: /releasenotes/index.html

## 3.1.0 (05/01/2025)

The most notable improvement in this version is the pluggable scanner feature. This allows MWC to integrate any custom scanner, e.g. our existing [MRZ scanner].
The most notable improvement in this version is the pluggable scanner feature. This allows MWC to integrate any custom scanner.<!-- , e.g. our existing [MRZ scanner](https://www.dynamsoft.com/mrz-scanner/docs/web/introduction/index.html). -->

### Features

1. Add Pluggable Scanner feature which integrates any scanner satisfying the following:
1. Implements the `ImplementMWCScanner` interface
1. Implements the [`MWCScanner`](https://www.dynamsoft.com/mobile-web-capture/docs/api/mobile-web-capture.html#mwcscanner) interface
2. Implements a `launch()` method to return a result that includes:
1. `_imageData` with a `toBlob()` function
2. `status.code` equal to `EnumresultStatus.RS_SUCCESS`
2. `imageData: true`
3. `status.code` equal to `EnumresultStatus.RS_SUCCESS`
2. Update Document Scanner to [version 1.2](https://github.com/Dynamsoft/document-scanner-javascript/releases/tag/v1.2.0)
3. Change MWC Header color to make the component visually distinct
4. Move the "Select All" and "Cancel" buttons to the header in the Document View
Expand Down