Dear Support,
We have a word document that has mixed lines Left to Right and Right to Left. When converting to HTML using Spire.Doc the result is always showing Left to Right.
Any help or suggestion please.
Regards,
Moe Tarhini
moetarhini wrote:Thank you Sir for you help. I noticed in your example that you are not using thr Right to Left feature of word, you just aligned it right. In our case we are using RTL as attached:
Document document = new Document();
document.LoadFromFile(@"..\..\Model.docx",FileFormat.Docx);
Paragraph paragraph = document.Sections[0].AddParagraph();
//set the orientation of the text
paragraph.Format.IsBidi= true;
TextRange tr = paragraph.AppendText("Spire.Doc");
tr.CharacterFormat.Bidi = true;
tr.CharacterFormat.FontSizeBidi = 12;
document.SaveToFile(@"..\..\Test.docx", FileFormat.Docx);
System.Diagnostics.Process.Start(@"..\..\Test.docx");