TxtLoadOptionsDocumentDirection Property

Gets or sets a document direction. The default value is LeftToRight.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public DocumentDirection DocumentDirection { get; set; }

Property Value

Type: DocumentDirection
Examples
Shows how to detect document direction automatically.
TxtLoadOptions loadOptions = new TxtLoadOptions();
loadOptions.DocumentDirection = DocumentDirection.Auto;

// Text like Hebrew/Arabic will be automatically detected as RTL
Document doc = new Document(MyDir + documentPath, loadOptions);
Paragraph paragraph = doc.FirstSection.Body.FirstParagraph;
Assert.AreEqual(isBidi, paragraph.ParagraphFormat.Bidi);
See Also