XferCount Property (Device)
Specifies how many images application wants to receive from the device.
'Declaration
Public Property XferCount As Int16
public short XferCount { get; set; }
public: __property short get_XferCount();
public: __property void set_XferCount(
short
);
public:
property short XferCount {
short get();
void set(short );
}
Property Value
Possible values:
-1 - application wants to receive all available images from the device;
1..215 - application wants to receive only N images
Call this property only when device is opened (State == DeviceState.Opened).
This C#/VB.NET code shows how to acquire all images from the document feeder of device.
Public Sub ScanImageFromFeeder(device As Vintasoft.Twain.Device)
device.ShowUI = False
device.DisableAfterAcquire = True
device.Open()
device.XferCount = -1
device.PixelType = Vintasoft.Twain.PixelType.RGB
device.UnitOfMeasure = Vintasoft.Twain.UnitOfMeasure.Inches
device.Resolution = New Vintasoft.Twain.Resolution(200F, 200F)
If device.DocumentFeeder.DuplexMode <> Vintasoft.Twain.DuplexMode.None Then
device.DocumentFeeder.DuplexEnabled = True
End If
If device.HasFeeder Then
device.DocumentFeeder.Enabled = True
device.XferCount = -1
If device.DocumentFeeder.Loaded Then
device.DocumentFeeder.AutoFeed = True
device.Acquire()
End If
End If
End Sub
public void ScanImageFromFeeder(Vintasoft.Twain.Device device)
{
device.ShowUI = false;
device.DisableAfterAcquire = true;
device.Open();
device.XferCount = -1;
device.PixelType = Vintasoft.Twain.PixelType.RGB;
device.UnitOfMeasure = Vintasoft.Twain.UnitOfMeasure.Inches;
device.Resolution = new Vintasoft.Twain.Resolution(200f, 200f);
if (device.DocumentFeeder.DuplexMode != Vintasoft.Twain.DuplexMode.None)
device.DocumentFeeder.DuplexEnabled = true;
if (device.HasFeeder)
{
device.DocumentFeeder.Enabled = true;
device.XferCount = -1;
if (device.DocumentFeeder.Loaded)
{
device.DocumentFeeder.AutoFeed = true;
device.Acquire();
}
}
}
Target Platforms: .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5