Click or drag to resize

DocumentSetPreprocessTemplate Method

The method selects a preprocess template for the Document object.

Namespace:  Kofax.OmniPageCSDK.IproPlus
Assembly:  Kofax.OmniPageCSDK.IproPlus (in Kofax.OmniPageCSDK.IproPlus.dll) Version: 1.0.0.0
Syntax
public void SetPreprocessTemplate(
	string Name,
	bool Embedded
)

Parameters

Name
Type: SystemString
Embedded
Type: SystemBoolean
Remarks

The preprocess templates are stored in template files that can be created using the Image Preprocess tool of the Image Viewer Control. Once a template file is created, it can be embedded in the document object as Client Data to make document porting easier.

To learn more about creating preprocess template files, see the IVC visual control documentation.

The selected preprocess template is applied automatically whenever image acquisition is done, i.e. any of the LoadImage, ScanImage and LoadBitmap methods are called.

Even without automatic template processing you still can involve the template based preprocessing facility by calling the ApplyPreprocessTemplate method.

The Name parameter either contains the fully qualified path to the template file if it is an external file (the Embedded parameter is False), or a document stream name if it is embedded in the document file (the Embedded parameter is True). In the second case, you can enumerate the embedded preprocess templates using the CDCount and CDName methods passing CD_PPTEMPLATE value for the Type parameter.

If the specified template does not exist, a trappable error occurs. If an empty string is passed, no preprocess template is used. Note that the ImagePreprocess method does not use this setting, the template based preprocessing is an alternative method of image preprocessing.

Calling this method sets the Modified property to True.

See Also