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

Free Support Forum - aspose.com

Text not rendered correctly in word

Hi team,


I am try to write some different language in word. In which Chinese,English and Arbi is working fine but some of language not working.

Please see attachment.

Please help as soon as possible.

Regards,
Asad

Hi Asad,


Thanks for your inquiry. Please use the latest version of Aspose.Words for .NET and try following code. Hope this helps you.


Document doc = new Document();

DocumentBuilder builder = new DocumentBuilder(doc);

builder.Font.Name = "Some English font such as Arial";

builder.Writeln("English");

builder.Font.Name = "Traditonal Arabic";

builder.Writeln("لايجب تجاوز الحد المسموح به");

builder.Font.Name = "Some Chinese font";

builder.Writeln("Chinese");


Please make sure you use foreign language with correct font name. If you still face any problem, please let us know we will try to help you as much we can. Thanks.

Hi Team,

I am using aspose.word 16.12.1 version,

I am using this code to write but part of the data is not render correctly.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Write(“অনেক দিন দেখা নেই। مرحبا كيف حال Բարեւ, ինչպես եսሰላም እንደምን አለህ 好!你好嗎hello, how are আপনি কেমন আছেন”);

doc.Save(@“D:\a.docx”,SaveFormat.Docx);


Respect word document is attached above.

Please help.

Regards,
Asad

Hi Asad,


Thanks for your inquiry. Please use Aspose.Words for .NET 16.12.0 version and try following code. Hope this helps you.


string MyDir = GetDataDir_Data();

Document doc = new Document();

DocumentBuilder builder = new DocumentBuilder(doc);

builder.Font.Name = "Arial (Body CS)";

builder.Write("Aspose Words for .NET");

// Adding Hindi text in document using required font name

builder.Font.Name = "Nirmala UI Semilight";

builder.Write("অনেক দিন দেখা নেই");

doc.Save(MyDir + "Output.docx");


I have attached the document generated from the above code snippet. Make sure you have installed required fonts such as Nirmala UI Semi light (on your machine). If you still face any problem, please let us know we will try to help you as much we can. Thanks.