Resources Base
Table of contents

Development

How can I customize the WebTWAIN instance(s)?

The instances are defined by this line in dynamsoft.webtwain.config.js

Dynamsoft.DWT.Containers = [{
    ContainerId: 'dwtcontrolContainer',
    Width: '585px',
    Height: '513px'
}];

Note that Containers is an array of the Container type

interface Container {
    WebTwainId?: string;
    ContainerId?: string;
    Width?: string | number;
    Height?: string | number;
}

WebTwainId and ContainerId are both optional but one must exist as the identifier for that WebTwain instance.

Width and Height determine the initial viewer size of the instance.

When instantiating with Dynamsoft.DWT.Load , ContainerId , Width and Height are required. Dynamic Web TWAIN will try to locate an HTML element with the id defined by ContainerId and use Width and Height as the viewer size.

To create multiple instances, simply provide multiple Containers , for example, the following creates two WebTwain instances

Dynamsoft.DWT.Containers = [{
    ContainerId: 'dwtcontrolContainer1',
    Width: '585px',
    Height: '513px'
}, {
    ContainerId: 'dwtcontrolContainer2',
    Width: '585px',
    Height: '513px'
}];

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest Version
    • Version 17.0
    • Version 16.2
    • Version 16.1.1
    Change +
    © 2003–2021 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support