Using the Document Options

The recognition result options, which include document options, indicate how the recognition results are saved, and exactly what is output. To get the current options used by the OCR engine to save the recognition results, call the GetRecognitionResultOptions method. This method updates the ResultOptions property, which accesses the DocumentOptions property, with the current settings. This property is a pointer to an ILTDocumentOptions object. While the DocumentOptions property is read only, the ILTDocumentOptions properties accessed through it can be set. To set new document options, set the ILTDocumentOptions properties, accessed through the DocumentOptions property of the ResultOptions property (for example RasterDoc.ResultOptions.DocumentOptions.PaperType = PAPER_A4) and then set the new options for the OCR engine by calling the SetRecognitionResultOptions method.

Various document characteristics of the OCR document may be exported to the output document following recognition. The PaperSizeMode property indicates whether the paper size will be exported, and whether the exported size is predefined or calculated. Depending on the value of the PaperSizeMode property, the value of the PaperType property, which indicates the type of paper used for the document, may be exported to the output document. Similarly, depending on the value of the PaperSizeMode, the PaperOrientation property value may be exported to indicate the orientation of the output document.

The LanguageMode property indicates whether the resulting language is exported to the output document. Depending on the value of this property, the ResultLanguage property may contain the resulting language to be exported to the output document.

The MarginsMode property indicates whether the margins of the OCR document will be exported to the output document, and if so, whether those margin values are predefined or calculated. Depending on the value of the MarginsMode property, the MarginLeft property, MarginTop property, MarginWidth property and MarginHeight property properties may contain the margin settings.

The EnablePageBreaks property indicates whether page breaks will be exported to the output document.

The Color property, the EnableTextInBoxes property and the TableMethod property all indicate how some aspect of the document will be exported. The Color property indicates how the graphics will be exported. The EnableTextInBoxes property indicates whether zones will be kept in frames in the output document. The TableMethod property indicates how tables will be exported to the output document.