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

Free Support Forum - aspose.com

Render Thai Arabic Language Characters in Word Document to PDF using Arial Unicode Font C# .NET Windows

Hi,
I have two installations of a web application that takes a word document and saves it as a pdf file, one hosted on Windows XP and one on Windows 2008.
Using the same doc file I get two different result pdfs where the 2008 installation is correct.
The problem is that all occurences of some unicode characters eg. a spanish ñ like in niños disappears using Arial but not using Tahoma or Verdana. So it seems font related but I don’t get why because Arial is a common font…
I’ve attached a test document and a faulty result file.
I also wonder wether there is a possibiltity to know from the framework that this will occur so I can produce an error message (e.g. Thai and Arabic does not work, can the Aspose.Words this?) would be nice to at least give a message to the user that this will be wrong.
Best regards
Johan

Edit: I use version 10.4

This message was posted using Page2Forum (attachment) from Aspose.Words for .NET - Documentation

Hello
Thanks for your inquiry. I cannot reproduce the problem on my side using the latest version of Aspose.Words 10.7.0. But I suppose there can be difference between font versions installed on different platforms. Please try comparing font versions, and also try using the latest version.
Best regards,

Ok thanks i’ll try that.

The Arial versions are different, but shouldn’t the pdf creator fall back to another font if the glyph is not present?

(Btw When the word file is instead printed through distiller the font used becomes Helvetica which I interpret that the font was not embedded.)

Hello
Thanks for your request. Aspose.Words requires all fonts, which are used in the document to be installed in the environment, where you perform conversion. Fonts are read, during converting to PDF, and embedded into the PDF document. If Aspose.Words cannot find some of fonts, it uses another similar font.
Best regards,

Ok thanks.
The odd thing is the test document is created on the machine where it does NOT work.
I.e. the pdf is correct if the Arial font version is not the same… Maybe you need to fallback per glyph and not only per font.

Hello
Thanks for your inquiry. It seems this problem does not occur with the latest version of Aspose.Words 10.7.0. (I cannot reproduce it) Could you please try using the latest version and let me know how it goes on your side?
The latest version you can download here:
https://releases.aspose.com/words/net
Best regards,

Hi,
thanks, yes the problem still occurs with 10.7. I’ve also tried running as a windows application to make sure it’s not permission or printer related but the problem is the same.

This is the source code I use:

Aspose.Words.License lc = new Aspose.Words.License();
string path = System.Reflection.Assembly.GetExecutingAssembly().Location;
string licFile = System.IO.Path.GetDirectoryName(path) + "\Aspose.Words.lic";
lc.SetLicense(licFile);

string docFile = @"c:\temp\test.doc";
Aspose.Words.Document aspdoc = new Aspose.Words.Document(docFile);
Aspose.Words.Saving.PdfSaveOptions saveOptions = new Aspose.Words.Saving.PdfSaveOptions();
saveOptions.Compliance = Aspose.Words.Saving.PdfCompliance.PdfA1b;
saveOptions.TextCompression = Aspose.Words.Saving.PdfTextCompression.None;
saveOptions.EmbedFullFonts = true;
aspdoc.Save(docFile + ".pdf", saveOptions);

aspdoc = null;

Best regards
Johan

Hello

Thank you for additional information. Could you please try installing the latest version of Font and perform converting to PDF one more time, it is to make sure that the reason of problem is Font.
If the reason of the problem is Font, could you please attach this font here for testing?

Best regards,