Dynamic Web TWAIN: How to detect all supported resolutions of a scanner?

To detect all supported resolutions of a scanner, you need to use Custom Capabilities:

Capability,
CapType,
CapGet,
CapNumItems,
GetCapItems

Here are the code snippets

DWObject.SelectSource(); 
    DWObject.OpenSource(); 
    DWObject.Capability = EnumDWT_Cap.ICAP_YRESOLUTION; 
    DWObject.CapType = EnumDWT_CapType.TWON_RANGE; 
    var bRet = DWObject.CapGet(); 
    var iCount = DWObject.CapNumItems; 
    for (var i = 0; i < iCount; i++) 
    { 
        console.log(DWObject.GetCapItems(i)); 
    }

Please refer to the chapter Custom Capabilities of the Developers' Guide.