Dynamsoft Document Imaging SDKs
http://forums.dynamictwain.com/

How to set Custom Caps of type ENUMERATION
http://forums.dynamictwain.com/how-to-set-custom-caps-of-type-enumeration-t6096.html
Page 1 of 1

Author:  erikguo [ Thu Aug 31, 2017 11:30 pm ]
Post subject:  How to set Custom Caps of type ENUMERATION

Hello,

we try to use the custom caps negociation. However, we always get false return of func CapSet(), while the value of CapGet() is everythiong OK.

the code is like the following:

DWObject.Capability = 0x803F;
DWObject.CapGet();
var numofitems = DWObject.CapNumItems
var item = DWObject.GetCapItems(1)
var currentIndex = DWObject.CapCurrentIndex
alert('The num of the enumeration is ' + numofitems);
alert('The value of index 1 of the capability is ' + item);
alert('The current index of the capability is ' + currentIndex);
DWObject.CapCurrentIndex = 0;
var returnCode = DWObject.CapSet()
if (returnCode)
alert("Successful");
else
alert("Source doesn't support this capability");


I also use the online demo in dynamsoft. It got a error msg: Data parameter out of supported range.

This 0x803F cap is enumeration type, with 2 items (0 , 1)

Author:  Vincy [ Sun Sep 03, 2017 5:47 pm ]
Post subject:  Re: How to set Custom Caps of type ENUMERATION

Hi Ericguo,

Thanks for contacting Dynamsoft.

I can't find 0x803F in the TWAIN specification nor in the list of capability our SDK supports. Could you double check the value in this demo?

Regards,

Author:  erikguo [ Sat Dec 30, 2017 1:38 am ]
Post subject:  Re: How to set Custom Caps of type ENUMERATION

Finally, I found out the solution. Just share to others with same problem

Use onevalue instead of enumeration type when setting Custom Caps.

Author:  Vincy [ Mon Jan 01, 2018 9:29 pm ]
Post subject:  Re: How to set Custom Caps of type ENUMERATION

Hi Erikguo,

Thanks for sharing.

Regards,

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/