Double side scanning - need help.

Nov 28, 2012 at 7:55 PM

Hi,

I'm using your cool code for our application that scans documents. However I have a need now to scan both sides of pages. 

The scanner (Visioneer strobe 500) supports double sided scanning. When I scan from Windows, I can scan both sides (by setting the property in the scanner ui). In my application, I suppress the UI. 

Would you please tell me how I can achieve that? 

I tried but I'm sure I'm missing something. This is what I did. I'm passing Enumerations.Dupplex.TwoSideDuplex as argument.

  Public Function SetDoubleSideScanning(ByVal value As Enumerations.Dupplex) As Boolean         Enumerations.Capability = Enumerations.Capability.Cap_DuplexEnabled
       twOneVal.ItemType = DataStructures.twCapability.CapType(capID)       

        twOneVal.Item = value
        Dim cap As New DataStructures.twCapability(capID, twOneVal)
       Dim retBool As Boolean = OperationTriplets.Control.Capability.Set(cap)

        Return retBool
    End Function

Here retBool is always false and double side scanning is not taking place.

Any help would be very much appreciated.

Thanks,

Nov 29, 2012 at 8:30 PM

I figured it out.

This method needs to be modified like below and needs to be called just before setting transfer count.  

 Private Sub SetDoubleSideScanning()

        Dim capID As Enumerations.Capability = Enumerations.Capability.Cap_DuplexEnabled
Dim twOneVal As New DataStructures.twOneValue

        twOneVal.ItemType = DataStructures.twCapability.CapType(capID)       

  twOneVal.Item = True

Dim cap As New DataStructures.twCapability(capID, twOneVal)       

OperationTriplets.Control.Capability.Set(cap)

    End Sub