Free Support Forum - aspose.com

Arabic Text is rendered incorrectly | DOCX to TIFF Conversion using .NET at Windows 10

Hi,
I am using Aspose word .net to convert Word documents to TIff that have text written in “Simplified Arabic”, When I converted the word to Tiff result was good but when I installed language pack (Arabic Saudi Arabia) in windows 10 and converted word document to Tiff now the tiff image has some of the letters are look odd (only few letters behave like this) and rest are good. Even I uninstalled the language pack from my Systems (windows 10) but still getting same problem, I tried on another developer system where the language pack is never installed the conversion is fine but on my system, getting the same issue. Conversion was fine before installation of Language pack. Would you look into this issue. please see the attachment for details).

My development machine has Aspose for Word 21.1.0 .Net Edition with Windows 10 x64 and MS Office 2019.

Hope to hear from you soon about this.
Thanks & Regards,
M Waseem
Integrated Solutions for Business

ConvertedFile.png (80.2 KB)
Orignal File.png (31.7 KB)

@mwaceemisb

Please note that Aspose.Words requires TrueType fonts when rendering document to fixed-page formats (JPEG, PNG, TIFF or XPS). You need to install fonts that are used in your document on the machine where you are converting documents to TIFF. Please refer to the following articles:

Using TrueType Fonts
Manipulating and Substitution TrueType Fonts

If you still face problem, please ZIP and attach your input Word document along with problematic and expected output documents here for testing. We will investigate the issue and provide you more information on it.

Hi Tahir Manzoor,
The font is already installed on my machine, I reinstalled the font and convert the file but still facing same issue. please follow steps to reproduce of issue.

Reproducing Steps:

  • OS windows 10
  • Select Start > Settings > Time & Language > Language.
  • Add a Language Arabic (Saudi Arabia)
  • Please convert docx file now to tiff (files are attached)
  • If you convert without adding language it will work fine.

I am attaching zip file have input files docx , problematic and expected file. Would you please investigate the issue. Thanks

For Aspose.zip (167.0 KB)

@mwaceemisb

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-21763. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi @tahir.manzoor would you please update how long it will take ?

@mwaceemisb

We try our best to deal with every customer request in a timely fashion, we unfortunately cannot guarantee a delivery date to every customer issue. We work on issues on a first come, first served basis. We feel this is the fairest and most appropriate way to satisfy the needs of the majority of our customers.

Currently, your issue is pending for analysis and is in the queue. Once we complete the analysis of your issue, we will then be able to provide you an estimate.

Hi Tahir, I have tested the issue after getting latest version of Aspose.Words for .NET 21.4. The issue is still exists. Would you please check, file is attached for your reference. please follow the reproduce step as I mentioned in above thread.

For Aspose.zip (167.0 KB)
Thanks

@mwaceemisb

Please use the following code example to get the desired output.

Document doc = new Document(MyDir + "Input File.docx");
doc.LayoutOptions.TextShaperFactory = Aspose.Words.Shaping.HarfBuzz.HarfBuzzTextShaperFactory.Instance;
doc.Save(MyDir + "21.4.tiff"); 

We suggest you please read the following article.

For Aspose.zip (880.2 KB)
Hi Tahir, I have added the above lines of code and read the article. I work well with console application but when I tried same line of code with asp.net mvc project (.net framework ). it’s giving error " Text shaper factory failed to return text shaper for ‘C:\Users\DELL\AppData\Local\Microsoft\Windows\Fonts\TIMESBD0_1.TTF’, face index ‘0’ "
Would you please look into this? Project is attached for your review. Thanks

@mwaceemisb

We suggest you please install Aspose.Words.Shaping.HarfBuzz through NuGet. However, if you are adding reference of Aspose.Words.Shaping.HarfBuzz manually, you need to put the correct DLL from Aspose.Words.Shaping.HarfBuzz.21.4.0\runtimes into Debug folder.

Inside the ~/runtimes folder you will find win-x64 and win-x86 folders. Depending upon the platform target (x86, x64), please copy the DLL files from correct folder to inside the Debug folder of your application. Hope this helps you.

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

Hi Tahir,
I have added reference through NuGet package, but still facing the same issue(" " *Text shaper factory failed to return text shaper for *TIMESBD0_1.TTF’, face index ‘0’ *"). Would you please check the attached project and test it Thanks For Aspose.zip (880.2 KB)

@mwaceemisb

Please try to set explicit value in {Use64BitIISExpress} = x86 or x64 (see Use64BitIISExpress.png (23.4 KB)) and rebuild the project. Hope this helps you.