#include "ltdoc2.h"
L_LTDOC2_API L_INT EXT_FUNCTION L_Doc2SetDocumentWriterOptions(hDoc, pOptions, uStructSize)
Sets the options for the format the document writer is to use to write results.
Handle to the OCR document
Void pointer to a document format structure to be set. Possible values are:
| Format Constant | Document format structure |
|---|---|
| DOCUMENTFORMAT_LTD | DOCWRTLTDOPTIONS |
| DOCUMENTFORMAT_EMF | DOCWRTEMFOPTIONS |
| DOCUMENTFORMAT_DOC | DOCWRTDOCOPTIONS |
| DOCUMENTFORMAT_PDF | DOCWRTPDFOPTIONS |
| DOCUMENTFORMAT_RTF | DOCWRTRTFOPTIONS |
| DOCUMENTFORMAT_TXT | DOCWRTTXTOPTIONS |
| DOCUMENTFORMAT_HTM | DOCWRTHTMOPTIONS |
| DOCUMENTFORMAT_XPS | DOCWRTXPSOPTIONS |
Size of the document format structure
| Value | Meaning |
|---|---|
| SUCCESS | The function was successful. |
| < 1 | An error occurred. Refer to Return Codes. |
This function only works on the document writer format that was set using the L_Doc2SetRecognitionResultOptions / L_Doc2SetRecognitionResultOptionsExt function.
To specify a document writer format, fill the DocFormat member of the RESULTOPTIONS2 structure and pass it to the L_Doc2SetRecognitionResultOptions / L_Doc2SetRecognitionResultOptionsExt function.
To get the options for a specific document writer format, call the L_Doc2GetDocumentWriterOptions / L_Doc2GetDocumentWriterOptionsExt function.
After setting the document format and options, call L_Doc2SaveResultsToFile / L_Doc2SaveResultsToFileExt or L_Doc2SaveResultsToFile2 to save the results.
✅ IMPORTANT
L_Doc2SetRecognitionResultOptions function should be called before calling this function in order to specify the document format type to set its options.
Required DLLs and Libraries
For an example, refer to L_Doc2SaveResultsToFile2.