[c#/IScanManager] Twain automatic origin selection

  • 893 Views
  • Last Post 05 April 2016
Sebastiano posted this 31 March 2016

Good morning everyone.

We need to implement an automatic origin selection on the scanner.

Our requirement is to always use the feeder and, if nothing is found on the feeder, use the plain.

On the IScanManager->IScanSourceSettings I can tell the scanner to use the feeder (UseFeeder property) but this doesn't solve my problem.

I've explored the FCEngine objects and the documentation but found nothing.

Better would be to have the ability to set the scanner driver specific settings (like you do with the printers and devmode). Is this possible? I can't use the driver specific scanning interface, but the scanner we need to use has the option to choose the origin (plain/feeder/automatic).

Regards, Sebastiano

Order By: Standard | Newest | Votes
Beliakova Svetlana posted this 04 April 2016

Hi, Sebastiano!

In order you can use the feeder please do the followings(c++ sample code):

//create scanManager object

IScanManager scanManager = engine.CreateScanManager();

//get ScanSourceSettings

IScanSourceSettings settings = scanManager.get_ScanSourceSettings(scanSource);

//use feeder

settings.UseFeeder = true;

//don`t stop between pages

settings.StopBetweenPages = false;

//don`t do pause between pages

settings.PauseBetweenPages = false;

//use new wettings

scanManager.set_ScanSourceSettings(scanSource, settings);

//scan

scanManager.Scan(scanSource, folder, true);

If this recommendations didn`t help with this situation please send to SDK_Support@abbyy.com the following additional information:

1) What does happen when you use UseFeeder?

2) The AInfo report:

∙ Go to FCEngine installation folder, \Bin\Support subfolder.

∙ Run AInfo.exe and wait until all necessary information is gathered

∙ Send generated archive

3) Does the issue reproduce on our standard samples? In case it doesn’t we would be really grateful if you could send us a simple sample project with which we could reproduce the issue on our side.

4) Please specify the build number of your FCEngine 11 (the build number can be found in the top right corner on the Introduction page of the Help file. It looks like “11.1.1.1”. Also you can find it in Properties in the Bin\FCEngine.dll local menu. This way is especially useful if the Help file is not installed on the computer.).

5) The FCEngine log file generated by the application. You can obtain the logs by calling Engine.StartLogging() method right after creating an Engine object.

6) The file with extension *.NFO which contains information about using system. You can find this file launched from the command line msinfo32 -> menu File -> Save As.

7) Serial number of the ABBYY FlexiCapture Engine 11 which you use.

Sebastiano posted this 05 April 2016

Hello Svetlana, the UseFeeder feature is correctly working. The problem is that if the ADF isn't loaded, that scan doesn't take place.

The code you provided simply tells the scanner to use the ADF.

What we need is to tell the scanner not to use the ADF if this one isn't loaded with paper (in this case the "plain" origin should be used).

This is a characteristic of the scanner, that can be activated if we use the driver UI.

Regards, Sebastiano

Beliakova Svetlana posted this 05 April 2016

Hello Sebastiano! Thank you for the detailed explanation. Unfortunately this scenario of working couldn`t be reproduced via ABBYY FlexiCapture Engine.

Close