We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Number followed by neutral character (dot) in RTL text (arabic) doesn't keep the correct prosition

The text “سيب 321. شسي” is not rendered correctly in a Word generated using Aspose.Words.
The generated texts is "سيب 321. شسي

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:Arial; mso-bidi-theme-font:minor-bidi;}

<![endif]–>". The problem is with the .(dot) character. It should be on the left of the number, not on the right.

The code to reproduce the issue is:
var doc1 = new Document();

var paragraph = new Paragraph(doc1);
paragraph.ParagraphFormat.Bidi = true;
var run = new Run(doc1) {Text = “سيب 321. شسي”};
paragraph.Runs.Add(run);
doc1.FirstSection.Body.AppendChild(paragraph);
doc1.Save(@“C:\Document.docx”, SaveFormat.Docx);

Regards,
Lucian Nistor
Senior .Net Developer
IBM Romania

Hi Lucian,


Thanks for your inquiry. Perhaps, you are using an older version of Aspose.Words; as with Aspose.Words v13.7.0, I am unable to reproduce this problem on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v13.7.0 and let us know how it goes on your side. I hope, this will help. I have attached the output Docx file with this post for your kind reference.

If you still face problem, please provide information about your specific culture, such as the name of the culture, language and country/region. I will investigate the issue on my side and provide you more information.

I’ve tested with Aspose.Words 13.7.0 and it still reproduces. The .(dot) is on the right side of the number.
Also I’ve opened your file and the dot is on the right not on the left side, as it is supposed to be.

I’ve tested on English (Us) and on Hebrew (Israel) settings and in both cultures it behaves the same, the dot is on the right side of the number.

Regards,
Lucian Nistor
Senior .Net Developer
IBM Romania

Hi,

I’ve found out from another post that I also have to set the Font.BiDi property to true in order to get the desired result.

Regards,
Lucian Nistor
Senior .Net Developer
IBM Romania

Hi Lucian,


Thanks for your feedback. It is nice to hear from you that your problem has been solved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.