Click or drag to resize

DocumentScanImage Method

If a single page was scanned, this method returns a reference to the scanned Page object.

Namespace:  Kofax.OmniPageCSDK.IproPlus
Assembly:  Kofax.OmniPageCSDK.IproPlus (in Kofax.OmniPageCSDK.IproPlus.dll) Version: 1.0.0.0
Syntax
public void ScanImage(
	Scanner UsedScanner,
	[OptionalAttribute] int InsertPos,
	out Page FirstPage
)

Parameters

UsedScanner
Type: Kofax.OmniPageCSDK.IproPlusScanner
InsertPos (Optional)
Type: SystemInt32
FirstPage
Type: Kofax.OmniPageCSDK.IproPlusPage
Remarks

A valid object is returned if a single page was scanned. If multiple pages were scanned a reference to the first scanned page is still returned.

This method scans one or more pages from an available scanner specified by the UsedScanner parameter. Although the ScanImage method does not return until the current scanning operation is finished, the application user interface remains responsive because this method maintains internal message processing. If scanning from an ADF and additional pages are available, handle the CanContinue event to keep or stop the scanning procedure.

The InsertPos is an optional numeric parameter. If it is specified, it indicates the insertion position within the existing document for the newly scanned page(s). If it is unspecified, the scanned pages are appended after the last existing page.

If the scanned image is a grayscale one, this function may convert it to B/W based on document settings. If the scanned image is a color one, this function can convert it either to grayscale or B/W.

To learn more about the different conversion options, see the description of the Conversion property detailing the primary image conversion feature.

To apply an automatic, after-scan preprocessing on the scanned and optionally converted images, pass a valid preprocess template file to the SetPreprocessTemplate method prior to calling the LoadImage method.

Calling this method sets the Modified property to True.

By default, this method automatically invokes image preprocessing when called according to the current settings. To switch off the running of the image preprocessing algorithm, turn off the appropriate document-level properties prior to calling this method.

For image preprocessing algorithms, see also the Deskew, DespeckleMode, Rotation, FaxCorrection, DownSample, ResEnhancement, and Inversion properties of the Document object. If (later on) you want these algorithms to be performed, update the properties as desired and call the ImagePreprocess method on the Document / Page objects.

See Also