HTMl Table output does not match for English and Chinese language content

Hi Dwarika,

It seems the only work around for this right now is to import the content as a document instead of using the InsertHtml method. I know you said this can’t be used but you should maybe try reconsidering. Remember that you can still create a new document object from HTML without needing to have the intermediate HTML file on disk. Refer to the following code which will load a string of HTML from a stream into a new Document file:

string strHTML = File.ReadAllText(@“Chinese+Content.txt”);

System.Text.UnicodeEncoding encoding=new System.Text.UnicodeEncoding();

MemoryStream ms = new MemoryStream();

ms.Write(encoding.GetBytes(strHTML), 0, encoding.GetByteCount(strHTML));

Document doc = new Document(ms);

doc.Save(@“Chinese Content Aspose 9.0.doc”);

I have tested this code streaming your HTML and the table in the output document appears correctly. Give it a try.

If you really do need to use the InsertHTML method and are able to edit your original HTML text. You might find that adding spaces at appropriate places to the string of Chinese characters will cause the table to be auto fitted properly if you make AllowAutoFit = true.

Unfortunately if none of these work arounds work then you will most likely have to wait until the next hotfix is released.

We apologize for any inconvenience and will keep you posted about any developments.

Thanks,

Hello,

Thanks very much for the code sample. I tried by using the sample code you have provided. The table gets aligned as per the page margin but the text is not appearing in Chinese Language.

I have used “Arial Unicode MS” as the font for the document.

Take a look at the attachement for more detail.

Regards,

Dwarika

Hi Dwarika,

Thank you for additional information. I suppose, you have the same issue as you mentioned here;

Best regards,

The issues you have found earlier (filed as WORDSNET-2057) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(2)