AcquireMulti method (ILEADRasterTwain)

Visual Basic Example

Visual C++ 5.0 Example

 

Syntax

short AcquireMulti(BSTR bstrBaseFileName, long lFlags, VARIANT_BOOL bMulti)

Overview

Refer to How to Acquire from the TWAIN Source.

Remarks

(Document/Medical) Acquires one or more images from a TWAIN source and stores the images in the specified file.

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:

1.

You can call the FindFastConfig method to determine the best scan configuration.

2.

Then set the scan configuration information in the FastTransferMode property, FastFormat property, FastBitsPerPixel property, FastBufferSize property and FastUsePreferredBufferSize property.

 

Note:

If you do not call FindFastConfigs before calling AcquireMulti, then the AcquireMulti method will determine the best scanning method.

If the file format set in the FastFormat property does not support multi-page files, this method will ignore the bMulti parameter and automatically save the scanned images in separate files. The naming of the files will be carried out as follows: if the string in bstrBaseFileName 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 FastFormat property supports multi-page files, this method will use the bMulti parameter to determine how to save multiple images. If bMulti is FALSE, each scanned page will be saved to a separate file, named in the same manner described in the paragraph above. If bMulti is TRUE, the name of the output file will be exactly the string in bstrBaseFileName (Temp.jpg) and it will be saved as a multi-page file.

If the FastTransferMode property is set to LTWAIN_BUFFER_MODE, and the FastUsePreferredBufferSize property is set to FALSE, then the method will use the user-defined buffer size in the FastBufferSize property. If however, the FastUsePreferredBufferSize property is set to TRUE, then the method will use the Twain driver preferred buffer size and will ignore the value of FastBufferSize property.

To use the AcquireMultiEvent event, you should set the EnableAcquireMultiEvent property value to TRUE before calling the AcquireMulti method.

The AcquireMultiEvent 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.

To cancel the acquire operation call the CancelAcquire method.

See Also

Elements

FastTransferMode property, FastFormat property, FastBitsPerPixel property, FastBufferSize property, FastUsePreferredBufferSize property, FindFastConfig method

Topics

TWAIN Functionality: Image Functions