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
13 changes: 13 additions & 0 deletions about/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,19 @@ To ensure your data is safe, Dynamic Web TWAIN offers advanced security features

Learn more about [Dynamic Web TWAIN Security Features](https://www.dynamsoft.com/Products/Dynamic-Web-TWAIN-Security-Features.pdf)


## Example Apps

Check out our Angular, React and Vue sample project on GitHub:

![](https://www.dynamsoft.com/web-twain/docs/assets/imgs/download.png) [Sample of dwt-angular-advanced](https://github.com/dynamsoft-dwt/dwt-angular-advanced)
![](https://www.dynamsoft.com/web-twain/docs/assets/imgs/download.png) [Sample of dwt-react-advanced](https://github.com/Dynamsoft/web-twain-react-advanced)
![](https://www.dynamsoft.com/web-twain/docs/assets/imgs/download.png) [Sample of dwt-vue-advanced](https://github.com/Dynamsoft/web-twain-vue-advanced)

## Live Online Demo

Click <a href="https://demo.dynamsoft.com/web-twain/" target="_blank">here</a> to go to online demo.

## Assumptions

These docs are meant for developers who are already familiar with HTML, CSS, JavaScript, and some related ideas, tools, etc.
Expand Down
15 changes: 2 additions & 13 deletions faq/how-to-exclude-wia-sources-in-the-source-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,12 @@ permalink: /faq/how-to-exclude-wia-sources-in-the-source-list.html

> Applicable to Windows only

There are two ways to achieve this:

* Set `IfUseTwainDSM` to `true`

``` javascript
DWObject.IfUseTwainDSM = true;
```

* Filter sources before listing them
* Set [IfUseTwainDSM]({{site.info}}api/WebTwain_Acquire.html#ifusetwaindsm) to `true`

``` javascript
var sources = DWObject.GetSourceNames();
for (var i = 0; i < sources.length; i++) {
if (sources[i].toLowerCase().indexOf('epson') != -1) {
sources.splice(i, 1);
}
}
DWObject.IfUseTwainDSM = true;
```

If you are still having issues with a device, please feel free to [contact us](https://www.dynamsoft.com/company/contact/) via email, live chat, or phone call.
2 changes: 1 addition & 1 deletion info/api/WebTwain_Buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The properties and methods on this page live in the namespace {WebTwainObject}.
| [`GetImageXResolution()`](#getimagexresolution) | [`GetImageYResolution()`](#getimageyresolution) | [`GetSkewAngle()`](#getskewangle) | [`GetSkewAngleEx()`](#getskewangleex) |
| [`ImageIDToIndex()`](#imageidtoindex) | [`IndexToImageID()`](#indextoimageid) | [`IsBlankImage()`](#isblankimage) | [`IsBlankImageExpress()`](#isblankimageexpress) |
| [`SelectAllImages()`](#selectallimages) | [`MoveImage()`](#moveimage) | [`SwitchImage()`](#switchimage) | [`RemoveImage()`](#removeimage) |
| [`RemoveAllImages()`](#removeallimages) | [`RemoveAllSelectedImages()`](#removeallselectedimages) | [`SelectImages()`](#selectimages) | [`GetTagListByIndex()`](#gettaglistbyindex) |
| [`RemoveAllImages()`](#removeallimages) | [`RemoveAllSelectedImages()`](#removeallselectedimages) | [`SelectImages()`](#selectimages) | [`GetTagListByIndex()`](#gettaglistbyindex) | [`CreateDocument()`](#createdocument) | [`OpenDocument()`](#opendocument) | [`GetCurrentDocumentName()`](#getcurrentdocumentname) | [`RenameDocument()`](#renamedocument) | [`RemoveDocument()`](#removedocument) | [`GetDocumentInfoList()`](#getdocumentinfolist) |


<!--* [GetImageBitDepthAsync()](#getimagebitdepthasync)-->
Expand Down
115 changes: 5 additions & 110 deletions info/api/WebTwain_Viewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,8 @@ permalink: /info/api/WebTwain_Viewer.html
/**
* Create a Dynamsoft Viewer instance and bind it to the WebTwain instance.
* @param element Specify an HTML element to create the viewer.
* @param documentTemplate Specify the document template.
*/
bind(element: HTMLDivElement, documentTemplate: DocumentViewerTemplate) : void;

interface DocumentViewerTemplate{
getCustomElement():CustomElement; //Get CustomElement. Can display save & upload interface in CustomElement.
onAddDocumentFunc = function () {}
onExitFunc = function () {}
onSaveFunc = function () {} //Save button click event
onUploadFunc = function () {} //Upload button click event
onRemoveSelectedFunc = function () {} //Remove button click event
}
bind(element: HTMLDivElement | HTMLElement) : boolean;
```

**Example**
Expand All @@ -73,18 +63,13 @@ var DWObject, template;
Dynamsoft.DWT.CreateDWTObjectEx(
{
WebTwainId: "a",
UseLocalService: false,
},
function (obj) {
DWObject = obj;
template = DWObject.Viewer.createTemplate("documentScanner");
DWObject.Viewer.bind(null, template); //full screen
DWObject.Viewer.show();

template.onExitFunc = function () {
DWObject.Viewer.show();
console.error ("execute");
//RemoveAllFile();
template = DWObject.Viewer.getElementById("dwtcontrolContainer_temp3");
DWObject.Viewer.width=500;
    DWObject.Viewer.height=600;
DWObject.Viewer.show();
}
}, function (errorCode, errorString) {
console.log(errorString);
Expand Down Expand Up @@ -2433,96 +2418,6 @@ When set to true, the index in the upper left corner of the viewer will be selec

---

## createTemplate

**Syntax**

<div class="sample-code-prefix template2"></div>
>- v17.3
>- v17.2.5
>
>
```typescript
/**
* Create document scanner template.
* @argument templateName Currently templateName only supports "documentScanner".
* @argument documentConfiguration Configuration for the document object.
*/
createTemplate("templateName", documentConfiguration?: DocumentConfiguration):DocumentViewerTemplate
interface DocumentViewerTemplate{
getCustomElement():CustomElement; //Get CustomElement. Can display save & upload interface in CustomElement.
onAddDocumentFunc = function () {}
onExitFunc = function () {}
onSaveFunc = function () {} //Save button click event
onUploadFunc = function () {} //Upload button click event
onRemoveSelectedFunc = function () {} //Remove button click event
}
```
```typescript
/**
* Create document scanner template.
* @argument templateName Currently templateName only supports "documentScanner".
*/
createTemplate("templateName"):DocumentViewerTemplate
interface DocumentViewerTemplate{
getCustomElement():CustomElement; //Get CustomElement. Can display save & upload interface in CustomElement.
onAddDocumentFunc = function () {}
onExitFunc = function () {}
onSaveFunc = function () {} //Save button click event
onUploadFunc = function () {} //Upload button click event
onRemoveSelectedFunc = function () {} //Remove button click event
}
```
**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">v17.3+ </td>
<td align="center">v17.3+ </td>
<td align="center">v17.3+ </td>
<td align="center">v17.3+ </td>
</tr>

</table>
</div>

**Example**

```javascript
var DWObject, template;
Dynamsoft.DWT.CreateDWTObjectEx(
{
WebTwainId: "a",
UseLocalService: false,
},
function (obj) {
DWObject = obj;
template = DWObject.Viewer.createTemplate("documentScanner");
DWObject.Viewer.bind(null, template); //full screen
DWObject.Viewer.show();

template.onExitFunc = function () {
DWObject.Viewer.show();
console.error ("execute");
//RemoveAllFile();
}
}, function (errorCode, errorString) {
console.log(errorString);
});
```

---

## updateCheckboxStyle

**Syntax**
Expand Down
4 changes: 2 additions & 2 deletions info/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ permalink: /info/api/
|[`SelectAllImages()`]({{site.info}}api/WebTwain_Buffer.html#selectallimages)|[`MoveImage()`]({{site.info}}api/WebTwain_Buffer.html#moveimage) | [`SwitchImage()`]({{site.info}}api/WebTwain_Buffer.html#switchimage)| [`RemoveImage()`]({{site.info}}api/WebTwain_Buffer.html#removeimage) |
| [`RemoveAllImages()`]({{site.info}}api/WebTwain_Buffer.html#removeallimages)|[`RemoveAllSelectedImages()`]({{site.info}}api/WebTwain_Buffer.html#removeallselectedimages) |[`SelectImages()`]({{site.info}}api/WebTwain_Buffer.html#selectimages)|[`GetTagListByIndex()`]({{site.info}}api/WebTwain_Buffer.html#gettaglistbyindex) |
| [`CreateDocument()`]({{site.info}}api/WebTwain_Buffer.html#createdocument)|[`OpenDocument()`]({{site.info}}api/WebTwain_Buffer.html#opendocument)|[`GetCurrentDocumentName()`]({{site.info}}api/WebTwain_Buffer.html#getcurrentdocumentname)|[`RenameDocument()`]({{site.info}}api/WebTwain_Buffer.html#renamedocument)|
|[`RemoveDocument()`]({{site.info}}api/WebTwain_Buffer.html#removedocument)| [`GetDocumentInfoList()`]({{site.info}}api/WebTwain_Buffer.html#getdocumentinfolist)| [`GetRawDataAsync()`]({{site.info}}api/WebTwain_Buffer.html#getrawdataasync)|
|[`RemoveDocument()`]({{site.info}}api/WebTwain_Buffer.html#removedocument)| [`GetDocumentInfoList()`]({{site.info}}api/WebTwain_Buffer.html#getdocumentinfolist)|

<!--
* [`ClearImageTags()`]({{site.info}}api/WebTwain_Buffer.html#clearimagetags)
Expand Down Expand Up @@ -474,7 +474,7 @@ permalink: /info/api/
| [`hide()`]({{site.info}}api/WebTwain_Viewer.html#hide)| [`last()`]({{site.info}}api/WebTwain_Viewer.html#last)| [`next()`]({{site.info}}api/WebTwain_Viewer.html#next)|[`off()`]({{site.info}}api/WebTwain_Viewer.html#off)|
|[`on()`]({{site.info}}api/WebTwain_Viewer.html#on)| [`previous()`]({{site.info}}api/WebTwain_Viewer.html#previous)| [`render()`]({{site.info}}api/WebTwain_Viewer.html#render)| [`setButtonClass()`]({{site.info}}api/WebTwain_Viewer.html#setbuttonclass)|
| [`setSelectedAreas()`]({{site.info}}api/WebTwain_Viewer.html#setselectedareas)| [`setViewMode()`]({{site.info}}api/WebTwain_Viewer.html#setviewmode) | [`show()`]({{site.info}}api/WebTwain_Viewer.html#show)| [`unbind()`]({{site.info}}api/WebTwain_Viewer.html#unbind)|
|[`createTemplate()`]({{site.info}}api/WebTwain_Viewer.html#createtemplate)| [`createDocumentEditor()`]({{site.info}}api/WebTwain_Viewer.html#createdocumenteditor)| [`updateCheckboxStyle()`]({{site.info}}api/WebTwain_Viewer.html#updatecheckboxstyle)| [`updatePageNumberStyle()`]({{site.info}}api/WebTwain_Viewer.html#updatepagenumberstyle)|
| [`createDocumentEditor()`]({{site.info}}api/WebTwain_Viewer.html#createdocumenteditor)| [`updateCheckboxStyle()`]({{site.info}}api/WebTwain_Viewer.html#updatecheckboxstyle)| [`updatePageNumberStyle()`]({{site.info}}api/WebTwain_Viewer.html#updatepagenumberstyle)|

<!--
* [`bind()`]({{site.info}}api/WebTwain_Viewer.html#bind)
Expand Down