Hi Alexey,
Thanks for your service & quick replies.
We are using Aspose.Word for .net version 9.0.0.0
We are facing one issue while printing mixed report containing Arabic(RTL) & English(LTR) text.
This issue was also discussed on Aspose forum & as per your suggestion we have to make changes into Font.Bidi property only for supporting mixed mode text for e.g.
Font.bidi = true { for Arabic text}
Font.bidi = false {for English text}
After using above suggestion we found that the text is getting printed properly but position of the text is getting changed. which result into an wrong output.
Please refer the Attached “sample.doc” for further reference.
In attached report the text “Hi Vinesh” is not getting displayed on proper location.The order of the text is getting changed.
Also refer the attached image “error.png” encircling the problem area in RED color.
The sample code is as follows.
Document doc = new Document();
DocumentBuilder documentBuilder = new DocumentBuilder(doc);
XmlDocument XmlDoc = new XmlDocument();
string path = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);
Aspose.Words.License lic = new Aspose.Words.License();
lic.SetLicense(path + @"\Aspose.Total.lic");
Aspose.Pdf.License lic1 = new Aspose.Pdf.License();
lic1.SetLicense(path + @"\Aspose.Total.lic");
documentBuilder.ParagraphFormat.ClearFormatting();
// Specify the locale so Microsoft Word recognizes this text as Arabic - Saudi Arabia.
// For the list of locale identifiers see https://docs.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a
documentBuilder.Font.LocaleIdBi = 1025;
documentBuilder.ParagraphFormat.Bidi = true;
documentBuilder.Font.NameBi = "Arial unicode MS";
documentBuilder.Font.SizeBi = 10;
documentBuilder.ParagraphFormat.Alignment = ParagraphAlignment.Left;
documentBuilder.Font.Bidi = true;
documentBuilder.InsertHtml("مرحبا هناك ما هو اسمك وماذا تفعل في هذا");
documentBuilder.Font.Bidi = false;
documentBuilder.InsertHtml("Microsoft 1998");
documentBuilder.InsertHtml("Hi vinesh");
// Save output document.
// builder.Document.Save(@"Test001\out.doc");
doc.Save("OK.doc");
StartWord("OK.doc");
Will you please verify this issue against Aspose.Word version 9.0.0.0
Will you please let us know how to resolve this issue?
Waiting for your reply…
Thanks & Regards,
Dwarika