- baseFileName
- The base name of the image file(s) to which to save the acquired data.
- flags
- Flag that indicates whether to display the manufacturer's user interface.
- transferMode
- The transfer mode used to acquire
- format
- The image format used to acquire
- bitsPerPixel
- represents the BitsPerPixel used to acquire
- multiPage
- true for multi-page acquire, false for single page.
- bufferSize
- Specifies the buffer size (in bytes) used to acquire images.
- usePreferredBufferSize
- Specifies whether to use the preferred buffer size specified by the TWAIN driver. true to use the preferred buffer size, false to use the user-defined buffer size (bufferSize parameter).
Visual Basic (Declaration) | |
---|---|
Public Sub AcquireFast( _ ByVal baseFileName As String, _ ByVal flags As TwainFastUserInterfaceFlags, _ ByVal transferMode As TwainTransferMode, _ ByVal format As RasterImageFormat, _ ByVal bitsPerPixel As Integer, _ ByVal multiPage As Boolean, _ ByVal bufferSize As Integer, _ ByVal usePreferredBufferSize As Boolean _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public void AcquireFast( string baseFileName, TwainFastUserInterfaceFlags flags, TwainTransferMode transferMode, RasterImageFormat format, int bitsPerPixel, bool multiPage, int bufferSize, bool usePreferredBufferSize ) |
C++/CLI | |
---|---|
public: void AcquireFast( String^ baseFileName, TwainFastUserInterfaceFlags flags, TwainTransferMode transferMode, RasterImageFormat format, int bitsPerPixel, bool multiPage, int bufferSize, bool usePreferredBufferSize ) |
Parameters
- baseFileName
- The base name of the image file(s) to which to save the acquired data.
- flags
- Flag that indicates whether to display the manufacturer's user interface.
- transferMode
- The transfer mode used to acquire
- format
- The image format used to acquire
- bitsPerPixel
- represents the BitsPerPixel used to acquire
- multiPage
- true for multi-page acquire, false for single page.
- bufferSize
- Specifies the buffer size (in bytes) used to acquire images.
- usePreferredBufferSize
- Specifies whether to use the preferred buffer size specified by the TWAIN driver. true to use the preferred buffer size, false to use the user-defined buffer size (bufferSize parameter).
Visual Basic | Copy Code |
---|---|
Public Sub twain_AcquireMulti(ByVal sender As Object, ByVal e As TwainAcquireMultiPageEventArgs) |
C# | Copy Code |
---|---|
public void twain_AcquireMulti(object sender, TwainAcquireMultiPageEventArgs e) |
Use the Acquire method to acquire one or more images.
Use the AcquireFast method to acquire one or more images and save them to one or more files.
Based on the scanner type, this method will determine the best/fastest scanning method to use. This scanning method will be used when actually scanning the images.
Before calling this method: You can call the TwainSession.FindFastConfiguration method to determine the best scan configuration. Note:If you do not call the TwainSession.FindFastConfiguration method before calling the AcquireFast method, then the AcquireFast method will determine the best scanning method.
If the file format set in the format parameter does not support multi-page files, this method will ignore the multiPage parameter and automatically save the scanned images to separate files. The files are named by appending numbers to the string used for the baseFileName. For example, if the string in baseFileName is "Temp.jpg", the method will append the number of the image, 0001, 0002, etc, to the name of the file. Therefore, the output file names will be "Temp0001.jpg", "Temp0002.jpg", etc.
If the file format specified in the format parameter supports multi-page files, this method will use the multiPage parameter to determine how to save multiple images. If multi is set to false, each scanned page will be saved to a separate file, named in the same manner described in the paragraph above. If multiPage is set to true, the name of the output file will be the exact string in baseFileName (Temp.jpg) and it will be saved as a multi-page file.
To use the TwainSession.AcquireMultiPage event, you should set the EnableAcquireMultiPageEvent property value to true before calling the AcquireFast method. The TwainSession.AcquireMultiPage event will be fired twice for each scanned page. The event is fired the first time when the TWAIN source begins scanning the page. The event is fired the second time when the TWAIN source has finished scanning the page. For more information, refer to How to Acquire from the Twain Source.
For more information, refer to Fast TWAIN (Scan Configurations).
Use the AcquireFast method to acquire one or more images and save them to one or more files.
Based on the scanner type, this method will determine the best/fastest scanning method to use. This scanning method will be used when actually scanning the images.
Before calling this method: You can call the TwainSession.FindFastConfiguration method to determine the best scan configuration. Note:If you do not call the TwainSession.FindFastConfiguration method before calling the AcquireFast method, then the AcquireFast method will determine the best scanning method.
If the file format set in the format parameter does not support multi-page files, this method will ignore the multiPage parameter and automatically save the scanned images to separate files. The files are named by appending numbers to the string used for the baseFileName. For example, if the string in baseFileName is "Temp.jpg", the method will append the number of the image, 0001, 0002, etc, to the name of the file. Therefore, the output file names will be "Temp0001.jpg", "Temp0002.jpg", etc.
If the file format specified in the format parameter supports multi-page files, this method will use the multiPage parameter to determine how to save multiple images. If multi is set to false, each scanned page will be saved to a separate file, named in the same manner described in the paragraph above. If multiPage is set to true, the name of the output file will be the exact string in baseFileName (Temp.jpg) and it will be saved as a multi-page file.
To use the TwainSession.AcquireMultiPage event, you should set the EnableAcquireMultiPageEvent property value to true before calling the AcquireFast method. The TwainSession.AcquireMultiPage event will be fired twice for each scanned page. The event is fired the first time when the TWAIN source begins scanning the page. The event is fired the second time when the TWAIN source has finished scanning the page. For more information, refer to How to Acquire from the Twain Source.
For more information, refer to Fast TWAIN (Scan Configurations).
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family