Dev Center
Table of contents

Capture/Image Source

How can I get a list of supported resolution/DPI values from the document scanner?

You can use capability negotiation to get all the resolutions supported by the scanner.

Steps:

  • Step-1: Use getCapabilities to get all capabilities of the current data source,
DWObject.OpenSource();
DWObject.getCapabilities(
  function () {
    console.log(arguments);
  },
  function (error) {
    console.log(error);
  }
);

and then find the capability corresponding to the resolution. Normally, it is called ICAP_XRESOLUTION.

Capability Resolution

  • Step-2: Call the following code to get all the resolutions supported by the scanner.
DWObject.OpenSource();
DWObject.getCapabilities(
  function (result) {
    for (var i = 0; i < result.length; i++) {
      if (
        result[i].capability.value ===
        Dynamsoft.DWT.EnumDWT_Cap.ICAP_XRESOLUTION
      )
        dpi = result[i].values;
    }
    console.log(dpi);
  },
  function (error) {
    console.log(error);
  }
);

Is this page helpful?

YesYes NoNo

In this article:

latest version

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