Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, October 28, 2008 11:47:03 PM(UTC)

papyrum  
papyrum

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.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, October 29, 2008 5:08:51 AM(UTC)

Adnan Ismail  
Guest

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)

papyrum  
papyrum

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)

Adnan Ismail  
Guest

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)

papyrum  
papyrum

Groups: Registered
Posts: 32


Ok thanks! Using setCapability it works.


 
#6 Posted : Monday, November 3, 2008 1:35:22 AM(UTC)

papyrum  
papyrum

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)
Maen Hasan

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)

papyrum  
papyrum

Groups: Registered
Posts: 32


Thanks!Now I think it works perfect

Bye!
 
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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.078 seconds.