Using the Paragraph Options

The recognition result options, which include paragraph 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 ParagraphOptions property, with the current settings. This property is a pointer to an ILTParagraphOptions object. While the ParagraphOptions property is read only, the ILTParagraphOptions properties accessed through it can be set. To set new paragraph options, set the ILTParagraphOptions properties, accessed through the ParagraphOptions property of the ResultOptions property (for example RasterDoc.ResultOptions.ParagraphOptions.SpaceBeforeMode = SELPREDEFINED) and then set the new options for the OCR engine by calling the SetRecognitionResultOptions method.

Various paragraph characteristics of the OCR document may be exported to the output document following recognition. The SpaceBeforeMode property indicates whether the space before a paragraph is exported to the output document, and if so, whether the value is predefined or calculated. Depending on the value of this property, the SpaceBefore property may contain the number of spaces before the paragraph.

The ParagraphIndentMode property indicates whether the indented first line of a paragraph is exported to the output document, and if so, whether the indention size is predefined or calculated. Depending on the value of this property, the FirstLineIndent property may contain the length of the indentation of the first line of the paragraph.

The LineSpacingMode property indicates whether the line spacing is exported to the output document, and if so, whether the value is predefined or calculated. Depending on the value of this property, the LineSpacing property may contain the line spacing to be exported.

The AlignmentMode property indicates whether the paragraph alignment is exported to the output document, and if so, whether the value is predefined or calculated. Depending on the value of this property, the Alignment property may contain the alignment type to be exported.