Skip to content
4 changes: 3 additions & 1 deletion _data/full_tree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ tree_list:
- name: Barcode Recognition
path: /indepth/features/barcode.html
- name: PDF Handling
path: /indepth/features/pdf.html
path: /indepth/features/pdf.html
- name: Remote Scan
path: https://www.dynamsoft.com/remote-scan/docs/introduction/
- name: Samples and Demos
childList:
- name: Use Web TWAIN in Angular
Expand Down
2 changes: 1 addition & 1 deletion assets/js/setLatestVersion.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var versionNoteLatestVersion = "18.1"
var versionNoteLatestVersion = "18.2"

$(function() {
$("#versionNoteLatestVersion").text(" (" + versionNoteLatestVersion + ")")
Expand Down
3 changes: 3 additions & 0 deletions indepth/features/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ This section covers how to implement the key capabilities of Dynamic Web TWAIN (
* [Handle PDFs]({{site.indepth}}features/PDF.html)

Learn about PDF reading & writing capabilities.

* [Remote Scan](https://www.dynamsoft.com/remote-scan/docs/introduction/)
Learn about how to use Remote Scan.
2 changes: 2 additions & 0 deletions info/api/Addon_PDF.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ permalink: /info/api/Addon_PDF.html

> {WebTwainObject} denotes the `WebTwain` instance.

> All APIs on this page support Android Service from version 18.2.

**Methods**

| |
Expand Down
15 changes: 0 additions & 15 deletions info/api/Dynamsoft_Enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,6 @@ Note: IT_MULTIPAGE_PDF & IT_MULTIPAGE_TIF are only applicable to the ImageType o

## `Dynamsoft.DWT.EnumDWT_PDFCompressionType`

<div class="sample-code-prefix template-table"></div>
>- v17.3
>- v17.2.5
>
>1.
| Label | Value|
|:-|:-|
| PDF_AUTO | 0 |
Expand All @@ -301,16 +296,6 @@ Note: IT_MULTIPAGE_PDF & IT_MULTIPAGE_TIF are only applicable to the ImageType o
| PDF_JPEG | 5 |
| PDF_JP2000 | 6 |
| PDF_JBIG2 | 7 |
>2.
| Label | Value|
|:-|:-|
| PDF_AUTO | 0 |
| PDF_FAX4 | 2 |
| PDF_LZW | 3 |
| PDF_JPEG | 5 |
| PDF_JP2000 | 6 |
| PDF_JBig2 | 7 |


## `Dynamsoft.DWT.EnumDWT_ShowMode`

Expand Down
14 changes: 12 additions & 2 deletions info/api/Dynamsoft_WebTwainEnv.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ interface Dynamsoft.DWT {
readonly ServerLinuxVersionInfo: string;
readonly ServerMacVersionInfo: string;
readonly ServerVersionInfo: string;
/**
* Whether to load UI related js files.
*/
UseDefaultViewer: boolean;
/**
* Attach the callback function to the specified event.
* @param event Specify the event.
* @param callback Specify the callback.
*/
RegisterEvent(event: string, callback: (...args: any[]) => void): void;
/**
* Whether to create a WebTwain instance automatically.
*/
Expand Down Expand Up @@ -57,8 +67,8 @@ interface Dynamsoft.DWT {
asyncFailureFunc: (errorString: string) => {}
): void;
DeleteDWTObject(Id?: string): boolean;
GetWebTwain(ContainerId?: string): WebTwain;
GetWebTwainEx(WebTwainId: string): WebTwain;
GetWebTwain(ContainerIdOrWebTwainId?: string): WebTwain;
GetWebTwainEx(ContainerIdOrWebTwainId: string): WebTwain;
Load(): void;
Unload(): void;
OnWebTwainPostExecute: function () {};
Expand Down
15 changes: 12 additions & 3 deletions info/api/WebTwain_Acquire.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ interface DeviceConfiguration {
extendedImageInfoQueryLevel?: Dynamsoft.DWT.EnumDWT_ExtImageInfo | number; //How much extended information is retrieved. Only valid when {IfGetExtImageInfo} is true.
SelectSourceByIndex?: number; //Specify a source by its index.
IfCloseSourceAfterAcquire?: boolean; //Whether to close the data source after aquisition. Default: false.
PageSize?: Dynamsoft.DWT.EnumDWT_CapSupportedSizes | number; //Specify page size
}
```

Expand Down Expand Up @@ -2433,6 +2434,10 @@ Return or set the page size the data source uses to acquire images.
PageSize: Dynamsoft.DWT.EnumDWT_CapSupportedSizes | number;
```

**Parameters**

`PageSize`: Please refer to [EnumDWT_CapSupportedSizes]({{site.info}}api/Dynamsoft_Enum.html#dynamsoftdwtenumdwt_capsupportedsizes)

**Availability**

<div class="availability">
Expand Down Expand Up @@ -2473,6 +2478,10 @@ Return or set the pixel type used when acquiring images.
PixelType: Dynamsoft.DWT.EnumDWT_PixelType | number;
```

**Parameters**

`PixelType`: Please refer to [EnumDWT_PixelType]({{site.info}}api/Dynamsoft_Enum.html#dynamsoftdwtenumdwt_pixeltype)

**Availability**

<div class="availability">
Expand Down Expand Up @@ -3277,7 +3286,7 @@ Check this property after [OpenSource()](#opensource) is called.

## IfUseTwainDSM

Return or set whether the new TWAIN DSM (data source Manager) is used for acquisitions. The new TWAIN DSM is a DLL called 'TWAINDSM.dll' while the default | old DSM is called 'twain_32.dll'.
Return or set whether the new TWAIN DSM (data source Manager) is used for acquisitions. The new TWAIN DSM is a DLL called 'TWAINDSM.dll' while the default or old DSM is called 'twain_32.dll'.

**Syntax**

Expand Down Expand Up @@ -4599,7 +4608,7 @@ GetDevicesAsync(deviceType?: Dynamsoft.DWT.EnumDWT_DeviceType | number, refresh?

**Parameters**

`deviceType`: The device type
`deviceType`: The device type. Please refere to [EnumDWT_DeviceType]({{site.info}}api/Dynamsoft_Enum.html#dynamsoftdwtenumdwt_borderstyle)

`refresh`: Default value is **false**

Expand Down Expand Up @@ -4671,7 +4680,7 @@ DWObject.GetDevicesAsync().then((deviceList)=>{

**Parameters**

`device`: the device
`device`: the device object. Please refer to [Device]({{site.info}}api/Interfaces.html#device)

**Availability**

Expand Down
51 changes: 5 additions & 46 deletions info/api/WebTwain_Viewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ permalink: /info/api/WebTwain_Viewer.html
| [`hide()`](#hide) | [`last()`](#last) | [`next()`](#next) | [`off()`](#off) |
| [`on()`](#on) | [`previous()`](#previous) | [`render()`](#render) | [`setButtonClass()`](#setbuttonclass) |
| [`setSelectedAreas()`](#setselectedareas) | [`setViewMode()`](#setviewmode) | [`show()`](#show) | [`unbind()`](#unbind) |
| [`updateCheckboxStyle()`](#updatecheckboxstyle) | [`updatePageNumberStyle()`](#updatepagenumberstyle) | [`save()`](#save) |
| [`updateCheckboxStyle()`](#updatecheckboxstyle) | [`updatePageNumberStyle()`](#updatepagenumberstyle) |

**Properties**

Expand Down Expand Up @@ -254,7 +254,7 @@ interface ImageEditor {
/**
* Keeps the image data in the browser editor in sync with the buffer.
**/
save(): boolean;
save(): Promise<void>;
/**
* Hide the ImageEditor object.
*/
Expand Down Expand Up @@ -317,7 +317,7 @@ interface EditorSettings {
/**
     * Default is normal, value: normal=0, balance=1.
     */
workMode?: number | DynamsoftEnumsDWT.EnumDWT_WorkMode;
workMode?: number | Dynamsoft.DWT.EnumDWT_WorkMode;
}
```

Expand Down Expand Up @@ -460,6 +460,7 @@ var editorSettings = {
"There is no source available",
],
},
workMode:Dynamsoft.DWT.EnumDWT_WorkMode.balance,
};

var imageEditor = DWObject.Viewer.createImageEditor(editorSettings);
Expand Down Expand Up @@ -2509,48 +2510,6 @@ interface pageNumberSettings {
</table>
</div>

---

## save

Keeps the image data in the browser editor in sync with the buffer.

**Syntax**
```typescript
save():Promise<void>;
```

**Availability**

<div class="availability">
<table>

<tr>
<td align="center">ActiveX</td>
<td align="center">H5(Windows)</td>
<td align="center">H5(macOS/TWAIN)</td>
<td align="center">H5(macOS/ICA)</td>
<td align="center">H5(Linux)</td>
</tr>

<tr>
<td align="center">not supported </td>
<td align="center">v18.2+ </td>
<td align="center">v18.2+ </td>
<td align="center">v18.2+ </td>
<td align="center">v18.2+ </td>
</tr>

</table>
</div>

**Example**

```javascript
var ImageEditor = DWObject.Viewer.createImageEditor(editorSettings);
ImageEditor.save();
```


---

Expand Down Expand Up @@ -2939,7 +2898,7 @@ on('resize',
DWObject.Viewer.on("resize", function (width, height) {
console.log(width, height);
});
DWObject.Viewer.width += 100;
DWObject.Viewer.width = 100;
```

---
Expand Down
6 changes: 3 additions & 3 deletions info/schedule/Stable.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ permalink: /info/schedule/Stable.html
- Expanded the capabilities of the Android platform. <!--See the APIs supported on Android service. -->

#### Remote Scan
- The remote scan solution powered by Dynamic Web TWAIN is now officially available. With it, you can turn any of your transitional document scanners into a network-able scanner and allow your end users to use it without installing anything on the client device. Read <a href="https://www.dynamsoft.com/remote-scan/docs/introduction/" target="_blank">this documentation</a> to learn the Remote Scan solution works.
- The remote scan solution powered by Dynamic Web TWAIN is now officially available. With it, you can turn any of your tranditional document scanners into a network-able scanner and allow your end users to use it without installing anything on the client device. Read <a href="https://www.dynamsoft.com/remote-scan/docs/introduction/" target="_blank">this documentation</a> to learn how the Remote Scan solution works.


### Improvements

#### Image Viewer
- The Viewer component has been migrated to a dedicated resource file. This will allow for viewerless implementations of Dynamic Web TWAIN to reduce the load by removing the necessity of loading the Viewer resources into memory even when the Viewer is not being used. See the property [Dynamsoft.DWT.UseDefaultViewer]({{site.info}}api/Dynamsoft_WebTwainEnv.html#usedefaultviewer).
- Added the enum [EnumDWT_WorkMode]({{site.info}}api/Dynamsoft_Enum.html#dynamsoftdwtenumdwt_workmode) with a new option for image editing
- Added [save()]({{site.info}}api/WebTwain_Viewer.html#save) to the ImageEditor object
- Added the enum [EnumDWT_WorkMode]({{site.info}}api/Dynamsoft_Enum.html#dynamsoftdwtenumdwt_workmode) with a new option for image editor setting, please refer to [createImageEditor]({{site.info}}api/WebTwain_Viewer.html#createimageeditor).
- Added new method `save()` to the ImageEditor object, please refer to [createImageEditor]({{site.info}}api/WebTwain_Viewer.html#createimageeditor).

#### Optimized error handling during web twain initialization
- Added an [OnWebTwainError]({{site.info}}api/Dynamsoft_WebTwainEnv.html#onwebtwainerror) event for better capturing errors during the web twain object initialization.
Expand Down