> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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](/fine-reader/engine/api-reference/text-related-objects/plaintext) object.
</Note>

## Properties

<table><thead><tr><th><p><strong>Name</strong></p></th><th><p><strong>Type</strong></p></th><th><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p><strong>Application</strong></p></td><td><p><strong><a href="/fine-reader/engine/api-reference/engine-object-iengine-interface">Engine</a></strong>, <a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties#readonly_properties">read-only</a></p></td><td><p>Returns the <strong>Engine</strong> object.</p></td></tr><tr><td><p><strong>IsInverted</strong></p></td><td><p><strong><a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties">VARIANT\_BOOL</a></strong></p></td><td><p>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.</p><Note>You can edit this property only if the Text object was received via the <a href="/fine-reader/engine/api-reference/layout-related-objects/textblock#text">ITextBlock::Text</a> property. Otherwise, the property is read-only.</Note></td></tr><tr><td><p><a name="paragraphs" /><strong>Paragraphs</strong></p></td><td><p><strong><a href="/fine-reader/engine/api-reference/text-related-objects/paragraphs">Paragraphs</a></strong>, <a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties#readonly_properties">read-only</a></p></td><td><p>Provides access to the collection of paragraphs of the <strong>Text</strong> object. Every <strong>Text</strong> object, even an empty one, contains a valid subobject of the <strong>Paragraphs </strong>type. This object is a collection of the <strong><a href="/fine-reader/engine/api-reference/text-related-objects/paragraph">Paragraph</a></strong> objects and may not contain any elements. The <strong>Paragraph </strong>object represents a paragraph in the recognized text. It is through this object that the content of the recognized text may be obtained.</p></td></tr><tr><td><p><a name="textorientation" /><strong>TextOrientation</strong></p></td><td><p><strong><a href="/fine-reader/engine/api-reference/text-related-objects/textorientation">TextOrientation</a></strong></p></td><td><p>Stores the orientation of the text. It is used internally by the ABBYY FineReader Engine when exporting the recognized text.</p><p>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 <strong><a href="/fine-reader/engine/api-reference/image-related-objects/imageprocessingparams#rotationtype">RotationType</a></strong> property of the <strong>ImageProcessingParams</strong> object. To specify the text orientation in a particular text block, set the <strong><a href="/fine-reader/engine/api-reference/layout-related-objects/textblock#textorientation">ITextBlock::TextOrientation</a></strong> property before recognition.</p><p>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.</p><p>Notes:</p><ul><li>The property returns a constant object. To change the text orientation, you must at first obtain an intermediate <strong>TextOrientation</strong> object using the <strong><a href="/fine-reader/engine/api-reference/engine-object-iengine-interface/creation-methods/createlessobjectgreater-methods">IEngine::CreateTextOrientation</a></strong> method, change the necessary parameters, and then assign the obtained object to the property.</li><li>You can edit this property only if the <strong>Text</strong> object was received via the <strong><a href="/fine-reader/engine/api-reference/layout-related-objects/textblock#text">ITextBlock::Text</a></strong> property. Otherwise the property is read-only.</li><li>The <strong>TextOrientation</strong> object which has <strong><a href="/fine-reader/engine/api-reference/text-related-objects/textorientation#rotationtype">RotationType</a></strong> property equal to RT\_UnknownRotation or <strong><a href="/fine-reader/engine/api-reference/text-related-objects/textorientation#readingtype">ReadingType</a></strong> property equal to TRT\_Unknown cannot be assigned to this property.</li></ul></td></tr></tbody></table>

## Methods

| Name                                                                                                            | Description                                             |
| --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| [AppendEmptyParagraph](/fine-reader/engine/api-reference/text-related-objects/text/appendemptyparagraph-method) | Appends empty paragraph to the end of the current text. |
| [GetRange](/fine-reader/engine/api-reference/text-related-objects/text/getrange-method)                         | Returns a copy of the range of text.                    |
| [Remove](/fine-reader/engine/api-reference/text-related-objects/text/remove-method)                             | Removes a range from the current text.                  |
| [RemoveAll](/fine-reader/engine/api-reference/text-related-objects/text/removeall-method)                       | Removes all paragraphs from the current text.           |

## Related objects

<img src="https://mintcdn.com/abbyy/i-EfCQVmseNiPQcp/images/fine-reader/engine/text.gif?s=d5cc47e13de30be27cc4bc41076d5491" alt="Text" width="314" height="160" data-path="images/fine-reader/engine/text.gif" />[](/fine-reader/engine/api-reference/layout-related-objects/textblock#text)[](/fine-reader/engine/api-reference/text-related-objects/paragraph)[](/fine-reader/engine/api-reference/text-related-objects/paragraphs)[](/fine-reader/engine/api-reference/text-related-objects/textorientation)[](/fine-reader/engine/api-reference/layout-related-objects/barcodeblock#editabletext)[](/fine-reader/engine/api-reference/layout-related-objects/barcodeblock)[](/fine-reader/engine/api-reference/layout-related-objects/textblock)

[Object Diagram](/fine-reader/engine/api-reference/object-diagram)

## Input parameter

This object is the input parameter of the [InsertText](/fine-reader/engine/api-reference/text-related-objects/paragraph/inserttext-method) method of the [Paragraph](/fine-reader/engine/api-reference/text-related-objects/paragraph) object.

## Samples

<Accordion title="C# code">
  ```csharp theme={null}
  FREngine.IBlock block;
  int suspiciousCharsCount = 0;
  // Iterates paragraphs of a text block and retrieves the text
  FREngine.ITextBlock textBlock = block.GetAsTextBlock();
  int paragraphsCount = textBlock.Text.Paragraphs.Count;
  for (int iPar = 0; iPar < paragraphsCount; iPar++)
  {
   FREngine.IParagraph par = textBlock.Text.Paragraphs[iPar];
   string text = par.Text;
   // do something with the text
  }
  ```
</Accordion>

The object is used in the following code samples:

* Linux: [CustomLanguage](/fine-reader/engine/guided-tour/samples#customlanguage)
* Windows: [CustomLanguage](/fine-reader/engine/guided-tour/samples#customlanguage), [RecognizedTextProcessing](/fine-reader/engine/guided-tour/samples#recognizedtextprocessing); and demo tools: [Engine Predefined Processing Profiles](/fine-reader/engine/guided-tour/samples#engine_predefined_processing_profiles)

## See also

[Working with Text](/fine-reader/engine/guided-tour/advanced-techniques/working-with-text)

[Working with Properties](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties)
