Resources Base
Table of contents

Development

How do you use a custom capability?

The TWAIN specification defines more than 150 standard capabilities for TWAIN applications and sources to choose from. However, some scanner vendors provide advanced and model-specific capabilities which are not included in the specification. We call them custom capabilities. The following steps show how to use them:

  • Install the TWAIN Sample App.

  • Use the TWAIN Sample App to open the source and then check what the hexadecimal value of the custom capability is.

Indepth-input-1

  • Double click and check the available values.

Indepth-input-2

  • Use this custom capability.
DWObject.SelectSource(function() {
        DWObject.OpenSource();
        DWObject.setCapabilities({
                exception: "ignore",
                capabilities: [{
                    capability: 0xA03D,
                    curValue: 3,
                    exception: "fail",
                }]
            },
            function(capabilities) {
                console.log(capabilities);
            },
            function(error) {
                console.error(error);
            });
    },
    function(code, error) {
        console.log(error);
    }
);

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