This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, September 28, 2006 11:48:33 AM(UTC)
Groups: Registered
Posts: 7
Howdy,
I have an issue when I check the twainsession to see if it supports duplex.
If the scanner does not support duplex, an error is thrown.
The error is "Required capability not supported"
I have tried the code 2 different ways and both thow an error when I am quering the capabilities.
Version 1:
If _twainSession.DuplexMode = TwainCapabilityValue.DuplexOnePassDuplex Or _twainSession.DuplexMode = TwainCapabilityValue.DuplexTwoPassDuplex Then
_twainSession.EnableDuplex = True
End If
Vesion 2:
If Not IsNothing(twainCap) Then
If (twainCap.OneValue.ItemType = TwainItemType.Uint16) Then
'isDuplex = True
_twainSession.EnableDuplex =
True
End If
End If
Thank you for any help.
Keith
#2
Posted
:
Saturday, September 30, 2006 11:57:54 PM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Do you get the error when checking the DuplexMode property or when setting the EnableDuplex property?
#3
Posted
:
Friday, October 6, 2006 5:23:25 AM(UTC)
Groups: Registered
Posts: 7
I get the error when checking the scanner.
If _twainSession.DuplexMode = TwainCapabilityValue.DuplexOnePassDuplex Or _twainSession.DuplexMode = TwainCapabilityValue.DuplexTwoPassDuplex Then
_twainSession.EnableDuplex =
True
End If
If I understand the documentation correctly, duplexmode can only be 1 of 3 values (DuplexNone, DuplexOnePassDuplex, and DuplexTwoPassDuplex).
If it is one or two then I enable duplex, if it is neither, then it stays in simplex.
This code works fine for my FUJITSU fi-5530Cdj 9.18 driver, but throws an exception if I select the WIA-fi-5530Cdj 1.0 driver.
Here is the exception that line of code throws:
Message "Required capability not supported"
StackTrace " at Leadtools.Twain.TwainException.CheckErrorCode(Int32 code)
at Leadtools.Twain.TwainSession.get_DuplexMode()
at Scanner.Scanner_Main_Form.GetSetScannerConfiguration() in ScannerForm.vb:line 771"
Thank you,
Keith Sirmons
#4
Posted
:
Sunday, October 8, 2006 2:06:16 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
The message indicates that the scanner doesn't support duplex, but I
think you should still be able to at least check the capability.
Anyway, the fact that it works with another scanner indicates that this
may be an issue with the
WIA-fi-5530Cdj
driver. You can just catch the exception and have your
application act as though duplex is not supported. Will this do?
#5
Posted
:
Monday, October 9, 2006 4:15:59 AM(UTC)
Groups: Registered
Posts: 7
Ok. That is what I have done while awaiting an answer.
Thank you,
Keith
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.