Text Object (IText Interface)
This object represents recognized text. The recognized text is a collection of paragraphs. Access to this collection is provided through the Paragraphs property. Besides, this object exposes properties for accessing different text attributes and methods allowing operations upon it, such as vertical and horizontal splitting, range removal etc. The Text object may exist either independently or be a subobject of some other object representing a unit of layout (text block, table cell etc.). A position in text is defined by the "coordinate pair" (paragraph;symbol). There is also the so-called "special position," for which paragraph=<the number of paragraphs>, symbol=0.
Note: This object is available via a recognized block with text. You can also access the full recognized text of the document or page in a special "plain text" format via the PlainText object.
Properties
Name | Type | Description |
---|---|---|
Application | Engine, read-only | Returns the Engine object. |
IsInverted | VARIANT_BOOL |
Specifies if the colors of the whole text are inverted. This attribute is set to TRUE if the recognized text belongs to a block or table cell that also has the inverted attribute. It may be used in user interface to display the text with white font against the black background. Note: You can edit this property only if the Text object was received via the ITextBlock::Text property. Otherwise, the property is read-only. |
Paragraphs | Paragraphs, read-only | Provides access to the collection of paragraphs of the Text object. Every Text object, even an empty one, contains a valid subobject of the Paragraphs type. This object is a collection of the Paragraph objects and may not contain any elements. The Paragraph object represents a paragraph in the recognized text. It is through this object that the content of the recognized text may be obtained. |
TextOrientation | TextOrientation |
Stores the orientation of the text. It is used internally by the ABBYY FineReader Engine when exporting the recognized text. This property is meaningful only after recognition but you cannot change the orientation of the text that has already been recognized. If you want to specify the page orientation before recognition, use the RotationType property of the ImageProcessingParams object. To specify the text orientation in a particular text block, set the ITextBlock::TextOrientation property before recognition. The only scenario in which you need to set the value of this property is when you wish to insert some additional text which must appear in the exported file. After adding that text, specify its orientation with the help of this property and call some method which performs synthesis before exporting the document. Notes:
|
Methods
Name | Description |
---|---|
AppendEmptyParagraph | Appends empty paragraph to the end of the current text. |
GetRange | Returns a copy of the range of text. |
Remove | Removes a range from the current text. |
RemoveAll | Removes all paragraphs from the current text. |
Related objects
Input parameter
This object is the input parameter of the InsertText method of the Paragraph object.
Samples
The object is used in the following code samples: CustomLanguage.
See also
7/3/2024 8:50:25 AM