Rendering problem of Thai characters in PDF

Hi Anwender,
Apologize to ask questions on your topic.

Hi Awais.hafeez,
Thank you so much for your help.
I do as your advice, but the output in PDF file still not like in Word file. please see attached the output file.
32A76E7A-2832-4A66-AD23-09B63DC065F3.jpeg (303.9 KB)

*Note: The content in my file is “Thai” characters.

The command to convert the PDF file is as following:

Aspose.Words.Document docx = new 
Aspose.Words.Document(sourcePath + @"\Source.docx");
					
string filePdf = destPath + @"\Destination.pdf";
string hyphenFile = hyphenDic + @"\th_TH.dic";
                    Aspose.Words.Hyphenation.RegisterDictionary("th-TH", hyphenFile);

string systemFontFolder = Environment.GetFolderPath(Environment.SpecialFolder.Fonts);

string fontsFolder = HttpContext.Current.Server.MapPath(ConfigurationManager.AppSettings["FontsPdf"].ToString());

Aspose.Words.Fonts.FontSettings fontSetting = new Aspose.Words.Fonts.FontSettings();

fontSetting.SetFontsFolders(new string[] { systemFontFolder, fontsFolder }, true);

docx.FontSettings = fontSetting;

Aspose.Words.DocumentBuilder builderDoc = new Aspose.Words.DocumentBuilder(docx);

builderDoc.PageSetup.PaperSize = Aspose.Words.PaperSize.A4;

docx.UpdatePageLayout();

Aspose.Words.Saving.PdfSaveOptions saveOptions = new Aspose.Words.Saving.PdfSaveOptions();

saveOptions.SaveFormat = Aspose.Words.SaveFormat.Pdf;

docx.Save(filePdf, saveOptions);

Do you have a solution to this problem?

Best regards.

@brunetta,

Please ZIP and upload your input Word document, Aspose.Words generated PDF file showing the undesired behavior and the Font files used in Word document here for testing. We will investigate the issue on our end and provide you more information.

Hi

Of course, please find attached the output and font information.

Output: Output.zip (139.7 KB)

Font: Fonts.zip (986.0 KB)

I’m so grateful for your help.
Best regards.

@brunetta,

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. The ID of this issue is WORDSNET-18424. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

Hi @awais.hafeez,
Thank you for your kind support.

Your software product makes me impressed and I would like to use it in my project.
However, I don’t have much time but I believe that you will solve this problem.

I hope to hear a good news from you soon.
Keep me informed of any updates. :slightly_smiling_face:

@brunetta,

Sure, we will keep you posted on any further updates and let you know via this thread as soon as the linked issue is resolved.

2 posts were split to a new topic: Thai characters rendering in PDF - Aspose.Words

Hi @awais.hafeez ,
2 months ago, Would like to know if you have any update on our topic?
I look forward to hearing from you.

Thank you & Best regards.

@brunetta,

Unfortunately, your issue is not resolved yet. We have completed the initial analysis of this issue but I am afraid, because of complexity, the implementation of this issue has been postponed. There is no ETA available at the moment. We will inform you via this thread as soon as this issue will be resolved in future. We apologize for your inconvenience.

Thanks for letting me know and I will wait to hear from you.

@brunetta,

Regarding WORDSNET-18424, there are following three problems:

  • Incorrect positioning of Thai glyphs
  • Incorrect line wrapping for Thai
  • Thai distributed paragraph alignment.

The first issue can be solved by installing the Aspose.Words.Shaping.HarfBuzz package and then enabling it as explained in this article: Enable OpenType Features in C#|Aspose.Words for .NET.

We are working on the other two issues and will keep you posted on further updates.

Hi @awais.hafeez and Team,

Great! Thank you so much for working hard.
Your solution is very important to our project.
We believe that ASPOSE team can fix all.

I’m looking forward to your reply with good news for issues 2-3.

Have a nice day :slight_smile:

@brunetta,

Sure, we will inform you via this thread as soon as the linked issue is resolved.

Hello @awais.hafeez,

Hope you are doing well. :slight_smile:

Do you have any progress on 2 pending items?

Thank you and Best regards.

@brunetta,

Unfortunately, your issue is not resolved yet and there is no further news about this issue i.e. the implementation of the fix of this issue (WORDSNET-18424) has still been postponed. We will keep you posted on any further updates and let you know when this issue will be resolved in future. We apologize for your inconvenience.

@awais.hafeez
Thank you for letting me know.
I’ll wait to hear from you.

A post was split to a new topic: Scanner SDK for Web Applications

Hi @awais.hafeez,

Could you give me a status on your progress?

@brunetta,

Your issue WORDSNET-18424 depends on the resolution of internal complex issues WORDSNET-15081 (rough ETA of this issue is first quarter of 2020) and WORDSNET-17085. Therefore, WORDSNET-18424 is postponed until at least these two issue are resolved. Unfortunately, there is no ETA available at the moment. We will inform you via this thread as soon as the linked issue is resolved. We apologize for your inconvenience.

Thank you for your information and prompt response.
We believe in your talent.
We look forward to hearing from you.