StopFeeder Method

Summary
Stop acquiring images only from the feeder of the TWAIN source.
Syntax
C#
C++
public void StopFeeder() 
vb[VB Syntax] 
Public Sub StopFeeder() 
public: 
void StopFeeder();  
Remarks

This method stops the process of acquiring images using one of the following methods: Acquire

AcquireToImage

AcquireFast

In order to stop acquiring images with the Acquire or AcquireToImage, call this method in the AcquirePage event when it is fired.

In order to stop acquire images by calling the AcquireFast, call this method in the AcquireMultiPage event when it is fired.

If the TWAIN source has no feeder, then this method will fail and an exception is thrown.

Example
C#
using Leadtools; 
using Leadtools.Twain; 
 
 
TwainSession acq_session; 
private void twain_AcquirePage(object sender, TwainAcquirePageEventArgs e) 
{ 
   // get acquired image here 
 
   // call StopFeeder method here if you need to stop the feeder 
   acq_session.StopFeeder(); 
} 
 
public void AcquireExample(IntPtr parent) 
{ 
   acq_session = new TwainSession(); 
   acq_session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None); 
 
   acq_session.SelectSource(String.Empty); 
 
   TwainProperties props = acq_session.Properties; 
   TwainDataTransferProperties dataProps = props.DataTransfer; 
   dataProps.FileName = Path.Combine(LEAD_VARS.ImagesDir, "twain.bmp"); 
   dataProps.MemoryBufferSize = dataProps.MemoryBufferSize * 2; 
   props.DataTransfer = dataProps; 
   acq_session.Properties = props; 
   TwainTransferOptions opts = acq_session.TransferOptions; 
 
   acq_session.AcquirePage += new EventHandler<TwainAcquirePageEventArgs>(twain_AcquirePage); 
 
   if (acq_session.Acquire(TwainUserInterfaceFlags.Show) != DialogResult.OK) 
      MessageBox.Show("Error Acquiring From Source"); 
 
   acq_session.Shutdown(); 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 22.0.2022.4.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2022 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Twain Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2022 LEAD Technologies, Inc. All Rights Reserved.