Click or drag to resize

PageConvertToDirectTXT Method

This method recognizes and converts a single page into one of the supported direct text output formats.

Namespace:  Kofax.OmniPageCSDK.IproPlus
Assembly:  Kofax.OmniPageCSDK.IproPlus (in Kofax.OmniPageCSDK.IproPlus.dll) Version: 1.0.0.0
Syntax
public void ConvertToDirectTXT(
	string FileName,
	DTXTOUTPUTFORMATS Format
)

Parameters

FileName
Type: SystemString
Format
Type: Kofax.OmniPageCSDK.IproPlusDTXTOUTPUTFORMATS
Remarks

Because this type of conversion does not involve the document-level structure analysis and consolidation - at the cost of limited layout retention - it provides a faster way to produce output files compared to the ConvertResults method. No document-level equivalent is available using the direct text conversion. Using this method is recommended if you need fast, single-page conversion into one of the supported direct text formats, or if you need the extra saved information in form processing scenarios, available only through the DTXT_XMLCOORD format in the SDK - like field position, related UserZone indices, and so on.

Do not call the Recognize method on the pages you export using the ConvertToDirectTxt method. One reason not to call it is that the recognition will always be called automatically by this function, even if recognition happened previously. Another reason is that during standard recognition some information - such as form field information - is lost, therefore it would not exist in the exported document.

The recommended usage of this method is to perform zoning (alternatively applying zone or form template), adjusting zone properties if necessary - e.g. you can modify the form field names invoking the UserZone's FormFieldName property - , and finally calling ConvertToDirectTxt - which performs a recognition and export automatically.

The FileName parameter contains the full path of the output file being created. The Format parameter defines the requested direct text converter as detailed below:

Value Meaning
DTXT_TXTS Standard Text
DTXT_TXTCSV CSV Text output
DTXT_TXTF Formatted text output
DTXT_PDFIOT PDF Image on Text output
DTXT_XMLCOORD XML Simple output (recommended for form processing)

Note: The PDF Searchable (Image-on-Text) setting requires the KeepOriginalImage property of the Document object to be set to True. Otherwise no image will be included in the generated PDF file.

DirectTXT is supported in IPRO, together with fully formatted outputs. On the RecAPI side, only direct text output is available with KernelAPI. Formatted output is provided only with RecAPIPlus. The distribution licensing scheme provides licensing choices for applications that provide only direct or plain text output that can exclude the licensing of formatted output. See the General Information help system.

See Also