Free Support Forum - aspose.com

Thai is showing as square in the Word doc

Hi,


We are having issue to generate a Word document by using ASPose Word (15.3.0.0) with Unicode characters (Thai). The Word file which is generated can show Greek, Chinese, Japanese. However, all the Thai characters renders as square if we save it as Word doc. On my development machine (Window 7) the Thai TrueType font are installed under the 'Windows\Fonts' .


The interested thing is if we save the Word doc with RTF save option, the Word doc can show Thai character (after convert it from RTF format) or Thai can show if we save it as PDF format. Do I miss anything to make Thai can show in the Word format?


Fang


Here is the program to generate Word doc:


Dim license As Aspose.Words.License = New Aspose.Words.License()

license.SetLicense("Aspose.Total.lic.xml")


Dim doc As Aspose.Words.Document = New Aspose.Words.Document(Server.MapPath("../doc/DataSheet.doc"))


Dim dt As DataTable = RptDB.GrantDataSheet(e.CommandArgument)

doc.MailMerge.Execute(dt)


'Thai can display in Doc (converted from RTF)

'Dim saveOpt As Aspose.Words.Saving.RtfSaveOptions = New Aspose.Words.Saving.RtfSaveOptions()

'doc.Save(Response, "GrantDataSheet.doc", Aspose.Words.ContentDisposition.Attachment, saveOpt)


'Thai can display in PDF

'Dim saveOpt As Aspose.Words.Saving.PdfSaveOptions = New Aspose.Words.Saving.PdfSaveOptions()

'doc.Save(Response, "GrantDataSheet.pdf", Aspose.Words.ContentDisposition.Attachment, saveOpt)


'Thai cannot display in Doc

Dim saveOpt As Aspose.Words.Saving.DocSaveOptions = New Aspose.Words.Saving.DocSaveOptions()

saveOpt.SaveFormat = Aspose.Words.SaveFormat.Doc

doc.Save(Response, "GrantDataSheet.doc", Aspose.Words.ContentDisposition.Attachment, saveOpt)


Here is the Greek, Thai, Japanese paragraph:


ὕαλον ϕαγεῖν δύναμαι· τοῦτο οὔ με βλάπτει. ฉันกินกระจกได้ แต่มันไม่ทำให้ฉันเจ็บ 私はガラスを食べられます。それは私を傷つけません。

Hi Fang,

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input template Word document (DataSheet.doc).
  • Aspose.Words generated output documents which show the correct and undesired behaviors (RTF, PDF, DOC etc).
  • Please create a standalone runnable simple console application (source code) that helps us reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we'll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip them and Click 'Reply' button that will bring you to the 'reply page' and there at the bottom you can include any attachments with that post by clicking the 'Add/Update' button.

Best regards,

Hi,


Attached please find the relative files for reproducing the issue:

  • Your input template Word document (GrantDataSheet.doc). Please just focus on tasktitle field. File is inside bin folder.
  • Aspose.Words generated output documents which show the correct and undesired behaviors:
    • GrantDataSheet-RTFDoc.doc (can display Thai after converting from RTF format).
    • GrantDataSheet-PDF.pdf (can display Thai in PDF)
    • GrantDataSheet-Doc.doc (cannot display Thai in Doc)
    • Files are inside bin folder.
  • Please create a standalone runnable simple console application (source code) that helps us reproduce your problem on our end and attach it here for testing. (ASPoseThai.zip is attached).
Thanks,

Fang

Hi Fang,


Thanks for your inquiry. We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-11841. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

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


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

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for .NET 18.12 update and this Aspose.Words for Java 18.12 update.