Click or drag to resize

ScannerScanPages Method

This method is used to Scan one or more pages.

Namespace:  Kofax.OmniPageCSDK.IproPlus
Assembly:  Kofax.OmniPageCSDK.IproPlus (in Kofax.OmniPageCSDK.IproPlus.dll) Version: 1.0.0.0
Syntax
public void ScanPages(
	string FileName,
	IMF_FORMAT Format,
	bool Asynchronously,
	[OptionalAttribute] bool Append
)

Parameters

FileName
Type: SystemString
Format
Type: Kofax.OmniPageCSDK.IproPlusIMF_FORMAT
Asynchronously
Type: SystemBoolean
Append (Optional)
Type: SystemBoolean
Remarks

It saves the scanned images into one or more image files.

The FileName parameter is a valid, fully qualified filename, which is the image file to be created.

The Format parameter defines the format of the resulting image file, which can be one of the values listed in the Format property of the ImageFile object. If the Format parameter defines a single-page image format, the resulting file name will be constructed from the FileName parameter and a 4-digit number with leading zeros, appended at the end.

The StartThread parameter determines whether the scan procedure is executed synchronously or asynchronously. If True is passed, the ScanPages method returns immediately and a new thread is created which performs the scanning. If False is passed, the ScanPages method does not return until the subsequent scan operation is finished. See the Events section to learn more about asynchronous scanning.

Append is an optional Boolean parameter. If it is True, the page being scanned is appended to the end of the file specified by the FileName parameter, if that file exists. Otherwise the existing file is overwritten with the current scan results. If the Append parameter is True but the Format parameter identifies a single-page format, a trappable error occurs.

During scanning, ScanProgress events are fired and the Scanning property is set to True. When this method finishes scanning a page, and there are further pages in the ADF, it fires the ScanContinue event to allow the procedure to be cancelled. When the scanning procedure has finished, the ScanFinished event is fired.

If any error occurs while executing the ScanPages method, a trappable error occurs and no further events are fired.

See Also