Skip to content

Commit 40cae04

Browse files
authored
Merge pull request #94 from dynamsoft-docs/preview
Preview
2 parents ec767e1 + a058c9d commit 40cae04

File tree

2 files changed

+45
-3
lines changed

2 files changed

+45
-3
lines changed

api/mobile-web-capture.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,4 +645,45 @@ const mobileWebCapture = new Dynamsoft.MobileWebCapture({
645645
const fileName = `New_Document_${Date.now().toString().slice(-5)}`;
646646
await mobileWebCapture.launch(fileName);
647647
})();
648+
```
649+
650+
### `MWCScanner`
651+
652+
MWC can scan from objects that satisfy this interface. When unassigned, MWC uses DDS by default.
653+
654+
#### Properties
655+
656+
##### `initialize()`
657+
658+
Initialize scanner resources.
659+
660+
###### **Type**
661+
662+
```typescript
663+
async initialize(): Promise<any>
664+
```
665+
666+
#### `launch()`
667+
668+
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`.
669+
670+
##### **Type**
671+
672+
```typescript
673+
async launch(): Promise<{
674+
_imageData: {
675+
toBlob()
676+
},
677+
imageData: boolean,
678+
}>
679+
```
680+
681+
#### `dispose()`
682+
683+
Destructor for the scanner object.
684+
685+
##### **Type**
686+
687+
```typescript
688+
dispose(): void
648689
```

releasenotes/index.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@ permalink: /releasenotes/index.html
1414

1515
## 3.1.0 (05/01/2025)
1616

17-
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].
17+
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). -->
1818

1919
### Features
2020

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

0 commit comments

Comments
 (0)