L_Doc2SetOutputFormatSettings

#include "ltdoc2.h"

L_LTDOC2_API L_INT EXT_FUNCTION L_Doc2SetOutputFormatSettings(hDoc, formatType, uFlags, pFormatSettings)

L_HDOC2 hDoc;

/* handle to the OCR document */

DOC2_FORMATTYPE formatType;

/* format type */

L_UINT uFlags;

/* flag */

L_VOID * pFormatSettings;

/* address of format structure */

Sets the settings for specific output format.

Parameter

Description

hDoc

Handle to the OCR document. This handle is obtained by calling the L_Doc2StartUp function.

formatType

Format type being set.

uFlags

Flag that determines function behavior. Possible values are:

 

Value

Meaning

 

DOC2_USE_FORMATTYPE_VALUE

[0x0000] Set the settings for the format specified in the formatType parameter.

 

DOC2_USE_COMMON_PDF_SETTINGS

[0x0002] Set common settings for PDF formats. pFormatSettings should be the address of PDFCOMMONSETTINGS.

 

DOC2_USE_COMMON_RTF_DOC_SETTINGS

[0x0004] Set common settings for RTF and DOC formats. pFormatSettings should be the address of RTFDOCWORDMLSETTINGS.

 

DOC2_USE_COMMON_TEXT_SETTINGS

[0x0008] Set common settings for TEXT formats. pFormatSettings should be the address of TEXTCOMMONSETTINGS.

pFormatSettings

Address of the settings structure to be set.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Use this function to update format settings. These settings are used in the output file, so you need to update these settings before saving the output file.

The pFormatSettings parameter is the address of the settings structure. The following table lists available format types along with the corresponding format settings structure that should be passed to this parameter:

Format Type constant

Format setting structure

DOC2_TEXT

TEXTSETTINGS

DOC2_UTEXT

UTEXTSETTINGS

DOC2_FORMATTED_TEXT

TEXTFORMATTEDSETTINGS

DOC2_UFORMATTED_TEXT

TEXTUFORMATTEDSETTINGS

DOC2_TEXT_LINEBREAKS

TEXTLINEBREAKSSETTINGS

DOC2_UTEXT_LINEBREAKS

UTEXTLINEBREAKSSETTINGS

DOC2_TEXT_CSV

TEXTCSVSETTINGS

DOC2_TEXT_UCSV

TEXTUCSVSETTINGS

DOC2_PDF

PDFSETTINGS

DOC2_PDF_IMAGE_SUBSTITUTES

PDFIMAGESUBSTSETTINGS

DOC2_PDF_IMAGE_ON_TEXT

PDFIMAGEONTEXTSETTINGS

DOC2_PDF_EDITED

PDFEDITEDSETTINGS

DOC2_XML

XMLSETTINGS

DOC2_HTML_3_2

HTML32SETTINGS

DOC2_HTML_4_0

HTML40SETTINGS

DOC2_RTF_6

RTF6SETTINGS

DOC2_RTF_97

RTF97SETTINGS

DOC2_RTF_2000

RTF2000SETTINGS

DOC2_RTF_WORD_2000

RTF2000SWORDSETTINGS

DOC2_WORD_2000

WORD2000SETTINGS

DOC2_WORD_97

WORD97SETTINGS

DOC2_EXCEL_97

EXCEL97SETTINGS

DOC2_EXCEL_2000

EXCEL2000SETTINGS

DOC2_PPT_97

POWERPOINT97SETTINGS

DOC2_PUB_98

PUBLISHER98SETTINGS

DOC2_MICROSOFT_READER

MSREADERSETTINGS

DOC2_WORDML

WORDMLSETTINGS

DOC2_WORDPERFECT_8

WORDPERFECT8SETTINGS

DOC2_WORDPERFECT_10

WORDPERFECT10SETTINGS

DOC2_WORDPAD

WORDPADSETTINGS

DOC2_INFOPATH

INFOPATHSETTINGS

DOC2_EBOOK

EBOOKSETTINGS

 

When one of the following flags is passed to the uFlags parameter the function will ignore the format type that is passed to formatType:

DOC2_USE_COMMON_PDF_SETTINGS

DOC2_USE_COMMON_RTF_DOC_SETTINGS

DOC2_USE_COMMON_TEXT_SETTINGS

To get the format settings call the L_Doc2GetOutputFormatSettings function.

To save recognition results, call the L_Doc2SaveResultsToFile function.

Required DLLs and Libraries

LTDOC2

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

L_Doc2GetRecognitionResultOptions, L_Doc2SetRecognitionResultOptions, L_Doc2SaveResultsToFile, L_Doc2GetOutputFormatSettings

Topics:

Recognizing Document Pages

Example

For an example, refer to L_Doc2GetOutputFormatSettings