В этом разделе
            
            Class that allows to manipulate the automatic document feeder of TWAIN device.
            
            
Объектная модель
Синтаксис
            
            
            
            'Declaration
Public NotInheritable Class DocumentFeeder
 
            
            public sealed class DocumentFeeder
 
            
            public __gc __sealed class DocumentFeeder
 
            
            public ref class DocumentFeeder sealed
 
	 
	
         
Пример
This C#/VB.NET code shows how to use document feeder of the device.
    
	
	    
	    
''' <summary>
''' Acquire images from the document feeder.
''' </summary>
Public Sub AcquireImagesFromAdf(device As Vintasoft.Twain.Device)
    ' disable UI
    device.ShowUI = False
    ' open the device
    device.Open()
    ' specify that color images must be acquired
    device.PixelType = Vintasoft.Twain.PixelType.RGB
    ' set the inches as unit of measure
    device.UnitOfMeasure = Vintasoft.Twain.UnitOfMeasure.Inches
    ' set the desired resolution of acquired images
    device.Resolution = New Vintasoft.Twain.Resolution(200.0F, 200.0F)
    ' if device has feeder
    If device.HasFeeder Then
        ' enable feeder
        device.DocumentFeeder.Enabled = True
        ' specify that application want to acquire all pages from the feeder
        device.XferCount = -1
        ' if pages can be scanned in duplex mode
        If device.DocumentFeeder.DuplexMode <> Vintasoft.Twain.DuplexMode.None Then
            ' enable duplex scanning
            device.DocumentFeeder.DuplexEnabled = True
        End If
        ' if feeder can detect paper
        If device.DocumentFeeder.PaperDetectable Then
            ' if feeder is loaded
            If device.DocumentFeeder.Loaded Then
                ' acquire images asynchronously
                device.Acquire()
            End If
        Else
            ' if feeder cannot detect paper
            ' acquire images asynchronously
            device.Acquire()
        End If
    End If
End Sub
	     
	 
 
    
	
	    
	    
/// <summary>
/// Acquire images from the document feeder.
/// </summary>
public void AcquireImagesFromAdf(Vintasoft.Twain.Device device)
{
    // disable UI
    device.ShowUI = false;
    // open the device
    device.Open();
    // specify that color images must be acquired
    device.PixelType = Vintasoft.Twain.PixelType.RGB;
    // set the inches as unit of measure
    device.UnitOfMeasure = Vintasoft.Twain.UnitOfMeasure.Inches;
    // set the desired resolution of acquired images
    device.Resolution = new Vintasoft.Twain.Resolution(200f, 200f);
    // if device has feeder
    if (device.HasFeeder)
    {
        // enable feeder
        device.DocumentFeeder.Enabled = true;
        // specify that application want to acquire all pages from the feeder
        device.XferCount = -1;
        // if pages can be scanned in duplex mode
        if (device.DocumentFeeder.DuplexMode != Vintasoft.Twain.DuplexMode.None)
            // enable duplex scanning
            device.DocumentFeeder.DuplexEnabled = true;
        // if feeder can detect paper
        if (device.DocumentFeeder.PaperDetectable)
        {
            // if feeder is loaded
            if (device.DocumentFeeder.Loaded)
                // acquire images asynchronously
                device.Acquire();
        }
        // if feeder cannot detect paper
        else
            // acquire images asynchronously
            device.Acquire();
    }
}
	     
	 
 
 
Иерархия наследования
System.Object
   Vintasoft.WinTwain.DocumentFeeder
 
Требования
Целевые платформы: .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5
 
Смотрите также