TWAIN custom CAP number
TWAIN custom CAP number
Hello,
I try to acquire pages in landscape mode with a Canon 9080C. Standard twain page orientation is not supported but it seem it can be done using CAP_CUSTOMBASE + 105. It seem TwainSetCapCurrentString/TwainGetCapCurrentNumeric can be use only with TwainCapabilities enumeration values. Value of CAP_CUSTOMBASE is 0x8000, so how can I set custom cap value using GdPicture ?
Thanks.
I try to acquire pages in landscape mode with a Canon 9080C. Standard twain page orientation is not supported but it seem it can be done using CAP_CUSTOMBASE + 105. It seem TwainSetCapCurrentString/TwainGetCapCurrentNumeric can be use only with TwainCapabilities enumeration values. Value of CAP_CUSTOMBASE is 0x8000, so how can I set custom cap value using GdPicture ?
Thanks.
-
- Posts: 352
- Joined: Tue Sep 27, 2011 11:47 am
Re: TWAIN custom CAP number
Hi,
You can use the function TwainSetCapCurrentNumeric():
https://www.gdpicture.com/guides/gdpicture/GdP ... meric.html
Hope this helps.
Best,
Sami
You can use the function TwainSetCapCurrentNumeric():
https://www.gdpicture.com/guides/gdpicture/GdP ... meric.html
Hope this helps.
Best,
Sami
Re: TWAIN custom CAP number
Thanks, but may be, I'm wrong explained :
I would like something like :
where MyValue = CAP_CUSTOMBASE + 105
Instead of :
I would like something like :
Code: Select all
public bool TwainSetCapCurrentNumeric(
[color=#BF0040]MyValue[/color],
TwainItemTypes ItemType,
double NewValue
)
Instead of :
Code: Select all
public bool TwainSetCapCurrentNumeric(
TwainCapabilities Cap,
TwainItemTypes ItemType,
double NewValue
)
Re: TWAIN custom CAP number
Note : of course I try to set a value out of TwainCapabilites enum range (it work in c#) using cast like :
But ret value is always "false". Do you check out of range value for TwainCapabilities in the TwainSetCapCurrentString (or TwainSetCapCurrentNumeric) function ?
Thanks.
Code: Select all
TwainCapabilities capa = (TwainCapabilities) 32873; // 0x8000 + 105
ret = gd.TwainSetCapCurrentString(capa, TwainItemTypes.TWTY_INT32, 2); // 2 is for landscape
Thanks.
Who is online
Users browsing this forum: No registered users and 1 guest