LEADTOOLS Support
Imaging
Imaging SDK Questions
AcquirePageOptions: required capability not supported
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, October 28, 2008 11:47:03 PM(UTC)
Groups: Registered
Posts: 32
Hi,
I am using LeadTools v16. and the .NET class library.
I am getting the "required capability not supported" error in this code line:
Dim ltOpcionesPagina As TwainAcquirePageOptions = oSesionTwain.AcquirePageOptions
ltOpcionesPagina.PaperSize = SelectedPaperSize
oSesionTwain.AcquirePageOptions = ltOpcionesPagina
What I want to do is to change the papersize before scanning.
Could you give me some advice?
Thanks very much,
Pablo L.G.
#2
Posted
:
Wednesday, October 29, 2008 5:08:51 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Does your twain driver support this capability? You can check that using the Twacker application from the Twain working group.
If you don't have Twacker, you can use the following URL to download it:
http://www.twain.org/devfiles/twack.zip
#3
Posted
:
Wednesday, October 29, 2008 8:44:14 PM(UTC)
Groups: Registered
Posts: 32
I have the Twacker application but I do not know what capablity I should select exactly. I have checked I_CAP_SUPPORTEDSIZES and I got this:
ItemType=TWTY_UINT16
NumItems=12
CurrentIndex=2
DefaultIndex=2
ItemList=TWSS_USLETTER,TWSS_USLEGAL,TWSS_A4LETTER,TWSS_A5,TWSS_A6,,,TWSS_B5LETTER,,,,
I know the scanner can scan pages of all of this sizes. What I want to do is to be able to select the size of the paper before scanning, and trying to do that I get the "required supported capability error"....
Any idea?
Thanks very much,
Pablo L.G.
#4
Posted
:
Thursday, October 30, 2008 5:15:47 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Pablo,
Try to use the TwainSession.SetCapability method to do that. The capability's name is TwainCapabilityType.ImageSupportedSizes. Does it work?
#5
Posted
:
Thursday, October 30, 2008 8:54:31 PM(UTC)
Groups: Registered
Posts: 32
Ok thanks! Using setCapability it works.
#6
Posted
:
Monday, November 3, 2008 1:35:22 AM(UTC)
Groups: Registered
Posts: 32
Sorry Adnan, I think I continue having some problems:
This is the code:
Dim ltCapTamaño As New TwainCapability
ltCapTamaño.Information.Type = TwainCapabilityType.ImageSupportedSizes
ltCapTamaño.Information.ContainerType = TwainContainerType.OneValue
ltCapTamaño.OneValueCapability.ItemType = TwainItemType.Uint16
ltCapTamaño.OneValueCapability.Value = TwainPaperSize.A4
oSesionTwain.SetCapability(ltCapTamaño, TwainSetCapabilityMode.Set)
I am getting the "Invalid parameter passed" error in the bold line.
Could you help me? What am I doing wrong?
Thanks very much,
Pablo L.G.
#7
Posted
:
Monday, November 3, 2008 3:28:40 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
Pablo,
Instead of using TwainPaperSize.A4, try to use the TwainCapabilityValue.SupportedSizesA4 as follows:
+-----------+
TwainCapability ltCapTamano = new TwainCapability();
ltCapTamano.Information.ContainerType = TwainContainerType.OneValue;
ltCapTamano.Information.Type = TwainCapabilityType.ImageSupportedSizes;
ltCapTamano.OneValueCapability.ItemType = TwainItemType.Uint16;
ltCapTamano.OneValueCapability.Value = TwainCapabilityValue.SupportedSizesA4;
this._twainSession.SetCapability(ltCapTamano, TwainSetCapabilityMode.Set);
+-----------+
Thanks,
Maen Badwan
LEADTOOLS Technical Support
#8
Posted
:
Wednesday, November 5, 2008 6:06:48 AM(UTC)
Groups: Registered
Posts: 32
Thanks!Now I think it works perfect
Bye!
LEADTOOLS Support
Imaging
Imaging SDK Questions
AcquirePageOptions: required capability not supported
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.