Hi there,
I’m encouterning problem when I use DocumentBuilder.InsertHtml to create tables for Chinese. This Html file contains table with Chinese text and table is good in layout. When converting into Doc file, the table cells becomes “no wrap”, which contains too long text on one line. This only happens with Asian languages.
Here is my test code:
// Below does not work for html file with Asian languages
StreamReader sr = new StreamReader("c:\\temp\\wholetext_cn.htm");
sb.Append(sr.ReadToEnd());
sr.Close();
string html = sb.ToString();
Aspose.Words.DocumentBuilder docBuilder = new Aspose.Words.DocumentBuilder();
docBuilder.InsertHtml(html);
Aspose.Words.Document doc = docBuilder.Document;
Response.Clear();
doc.Save("wholetext_cnnew.doc", Aspose.Words.SaveFormat.Doc, Aspose.Words.SaveType.OpenInWord, Response);
// Below works well for html file with Asian languages
Aspose.Words.Document newDoc = new Aspose.Words.Document("c:\\temp\\wholetext_cn.htm",LoadFormat.Html,null);
newDoc.Save("c:\\temp\\wholetext_cn.doc", SaveFormat.Doc);
newDoc.Save("wholetext_cn.doc", Aspose.Words.SaveFormat.Doc, Aspose.Words.SaveType.OpenInWord, Response);
Urgent help needed. Thank you very much.