VintaSoft Twain .NET SDK Discussions

Questions, comments and suggestions concerning VintaSoft Twain .NET SDK.

Board index < VintaSoft Twain < VintaSoft Twain .NET SDK Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

XferCount property not working



XferCount property not working

Post by derek_k »

I'm not sure when this stopped working (it did work at some point - maybe in version 6), but the XferCount property is no longer working. The scanner is always scanning ALL pages that are loaded, even though we only want to scan 1 document by setting the XferCount property = 1.

This is happening with HP Scanjet 5000/7000 in both WIA and TWAIN drivers.

I can't find any other options to control auto feeding and restrict it to a single page.


Re: XferCount property not working

Post by Alex »

Hello Derek,

What code do you use?

You should disable the document feeder and set the XferCount to 1 if you want to acquire only one image from the scanner.

Best regards, Alexander


Re: XferCount property not working

Post by derek_k »

Hi Alex,

The problem is, whenever we try to disable the document feeder we get an exception:
if (_device.FeederPresent) 
{
    _device.XferCount = 1;
    _device.DocumentFeeder.Enabled = false;  // Vintasoft.Twain.TwainDeviceCapabilityException: Cannot set value of capability.
}
Again, this is on the HP 5000 and 7000 scanners.

Just to reiterate - in version 6.0 we used this code to scan a single page and it worked fine:
if (_twain.FeederPresent)
{
    _twain.AutoFeed = false;
    _twain.XferCount = 1;
}


Re: XferCount property not working

Post by Alex »

Hello Derek,

Please send log-file generated by SDK to support@vintasoft.com

Here are steps which you should do if you want to generate a log-file of scanner's work:
  • Set the DeviceManager.Logger.Enabled property to True before the DeviceManager.Open method.
  • Set the path to log-file with the DeviceManager.Logger.Filename property if path "c:\vstwain.log" is not accessible by your application.
    NOTE: vstwain.log file is created in the user's temporary directory if path specified in the LogFilePath property is not accessible.
  • Run your application.
  • Send us a log-file and detailed description of the problem.
Best regards, Alexander


Page 1 from 1: 1