I want to scan a document using Twain Library for Epson DS-510 scanner using C# application, but it only scans one side. The scanner supports both side scanning of a page, and it's tested using the scanner scan feature, but it doesn't do scan with the application.
Also, I have another scanner which is Canon-2510C TWAIN but it does scan both side successfully .
Lately, I have installed TWAIN Sample App to see the Twain Configuration to connect to datasource. Pictures as added an attachment below.
CAP_DublexEnabled is false as default. When I want to set CAP_DublexEnabled to TRUE, it does but when it's still same after closing the sample app and reopen again.
Does it really support both side scanning with Twain or do i have to change the code for Acquire method for TwainLib class?
Acquire Method of TwainLib class:
public void Acquire()
{
TwRC rc;
CloseSrc();
if (appid.Id == IntPtr.Zero)
{
Init(hwnd);
if (appid.Id == IntPtr.Zero)
return;
}
rc = DSMident(appid, IntPtr.Zero, TwDG.Control, TwDAT.Identity, TwMSG.OpenDS, srcds);
if (rc != TwRC.Success)
return;
TwCapability cap = new TwCapability(TwCap.XferCount, 50);
//TwCapability cap = new TwCapability(TwCap.DuplexEnabled, 50);
rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Set, cap);
if (rc != TwRC.Success)
{
CloseSrc();
return;
}
TwUserInterface guif = new TwUserInterface();
guif.ShowUI = 0;
guif.ModalUI = 1;
guif.ParentHand = hwnd;
rc = DSuserif(appid, srcds, TwDG.Control, TwDAT.UserInterface, TwMSG.EnableDS, guif);
if (rc != TwRC.Success)
{
//TwainGui.PicForm.arsivOK = false;
CloseSrc();
return;
}
}