Loading...

Custom Capabilities in TWAIN

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

Custom Capabilities in TWAIN

Postby edlemus » Wed Sep 22, 2010 6:48 pm

Hi,

I'm working with some Canon DR scanners and want to be able to use some features like "auto size detection" and "skip blank pages".
These features are available thorugh TWAIN as of 2.0, but unfortunately the Canon drivers are currently compatible with 1.9 only.
I've found that these settings can be managed directly for those scanners using some custom capabilities (ex.: say 0x8000 for autodetection); but GdPicture only seems to let me manipulate the capabilities that are already defined in the TwainCabalities enumeration.
Is there anyway I can set these custom values? Thanks in advance.

Edson
edlemus
 
Posts: 23
Joined: Sat Jan 17, 2009 11:10 am

Re: Custom Capabilities in TWAIN

Postby edlemus » Tue Sep 28, 2010 7:54 pm

Nothing on this? :roll:
edlemus
 
Posts: 23
Joined: Sat Jan 17, 2009 11:10 am

Re: Custom Capabilities in TWAIN

Postby Loïc » Fri Oct 01, 2010 3:11 pm

Hi,

GdPicture only seems to let me manipulate the capabilities that are already defined in the TwainCabalities enumeration


No it's false. You can pass any integer value to the low-level API function.

IE:

Code: Select all
object.TwainSetCapCurrentNumeric(0x8000,TWTY_BOOL,1)


Hope this helps !

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Custom Capabilities in TWAIN

Postby edlemus » Fri Oct 01, 2010 7:35 pm

Can you provide a more extensive sample? I'm using c# and I can't send integers to TwainSetCapCurrentNumeric, only a TwainCabalities enumeration value. Is there some special way in which I should reference the library?
edlemus
 
Posts: 23
Joined: Sat Jan 17, 2009 11:10 am

Re: Custom Capabilities in TWAIN

Postby Loïc » Fri Oct 01, 2010 8:08 pm

Hi,

Just cast the Integer value to TwainCabalities.

In VB.NET it is
Code: Select all
 Ctype(&h8000, GdPicturePro5.TwainCapabilities)


I suppose it should be something like that in C#

Code: Select all
 (GdPicturePro5.TwainCapabilities)0x8000


Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Custom Capabilities in TWAIN

Postby Loïc » Fri Oct 01, 2010 8:16 pm

Tried:

Code: Select all
     private void button1_Click(object sender, EventArgs e)
      {
         GdPicturePro5.cImaging oImaging = new GdPicturePro5.cImaging();
         oImaging.TwainSetCapCurrentNumeric((GdPicturePro5.TwainCapabilities)0x8000, GdPicturePro5.TwainItemTypes.TWTY_BOOL, 1);
      }



Seems work...
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Custom Capabilities in TWAIN

Postby edlemus » Fri Oct 01, 2010 11:28 pm

Never thought that cast would even work as the values are not predefined, but it does! :D
Sorry I didn't even tried before, hehehehe. :oops:
Thanks a lot.
edlemus
 
Posts: 23
Joined: Sat Jan 17, 2009 11:10 am

Re: Custom Capabilities in TWAIN

Postby Loïc » Sat Oct 02, 2010 9:34 am

No problem, It required ages for me to understand :)
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron