Thai Text formatting issue in Word to PDF conversion using Aspose.Words Cloud API

Our customers in Thailand have reported formatting issues on PDF documents that were produced from Word documents by the Aspose Cloud API.

After investigation, we have found that Word-PDF conversion does not handle justified paragraphs correctly in Thai language, adding very large whitespace in the middle of lines.

We suspect that line break management is not adapted to Thai.
Any solution known to date? Thanks!

Note: Thai language support is active in Word, and layout of the Word documents is correct.

@Alexandre_Leclercq

Thanks for your inquiry. We will appreciate it if you please share your input, output and expected output documents here. It will help us to investigate and address the issue exactly.

@tilal.ahmad Please find attached

  • The screencapture of the Word template we need to convert in PDF
  • The PDF we got after conversion

image.png (110.5 KB)
Commercial_proposal_TH landing Page.pdf (201.0 KB)

Let me know how I can send you the Word template if necessary - .docx cannot be uploaded
Thanks.

@Alexandre_Leclercq

Thanks for your feedback. We need your input document for further investigation. Please ZIP and attach your input document here. We will look into it and will guide you accordingly.

@tilal.ahmad Please find attached the zip file containing

  • The input document - docx
  • The PDF we got after conversion

Commercial proposal in THai.zip (262.2 KB)

Looking forward to hearing from you.

@Alexandre_Leclercq

Thanks for sharing the source document. Please note Aspose.Words mimics MS Word behavior. We have rendered your shared word document to PDF with both Aspose.Words and MS Word. We are unable to notice any formatting difference.

Furthermore, your shared Word document shows same formatting in MS Word and PDF as well.
formatting_diff.zip (282.9 KB)

@tilal.ahmad Thanks for your reply.

Depending of computers on which we open our Word Source document, layout can be different.

So, I conducted additional testing:

  1. When I open my Word Source document in Word and convert it in PDF via Word printing (Ctrl +P), the layout is clean - no blank spaces
  2. When I load my Word Source document in my Quotation engine, and dynamically assemble my Commercial proposal in a Word format, the final layout is clean - no blank spaces
  3. When I load my Source Word document in my Quotation engine, and dynamically assemble my Commercial proposal in a PDF format (via ASPOSE), the final layout is NOT clean - blank spaces appear

There are 2 points here:

  1. Our Word Source document is not read in the same way by all computers
  2. ASPOSE converts our Word Source document in such manner that blank spaces are displayed

What are your view on the matter? How can we solve this situation?

@Alexandre_Leclercq

Thanks for your feedback. We are looking into your query and will update you shortly.

@Alexandre_Leclercq

Thanks for sharing additional information. It seems some fonts related issue. We will appreciate it if you please share the fonts files used in your document and please also confirm your MS Word version. We will further investigate the issue and will guide you accordingly.

@tilal.ahmad
Good to hear you have some leads.
Any clue where can I found the fonts files?

@Alexandre_Leclercq

Thanks for your feedback. You can check font of source document that MS Word is using to display the Thai text and share that font file from C:\Windows\Fonts folder as ZIP file. Furthermore, please convert the source Word document to PDF using MS Word and share it here as well.

@tilal.ahmad As epr request, please find attached:

FYI, I will be on leave until Oct-23rd. I will not be in position to reply to this thread before that date. Please don’t close the topic due to inactivity. Thanks for your understanding.

@Alexandre_Leclercq

Thanks for sharing the additional information. I have installed your shared fonts and I still noticed the large white spaces. Please also note your shared PDF document generated by MS Word also contains the white spaces. So I am afraid it is not Aspose.Words related issue as already stated above Aspose.Words mimics MS Word behavior.

@Alexandre_Leclercq

As an update, if you have not noticed already the feature. While converting documents with custom fonts using Aspose.Words Cloud you can upload your custom fonts to some cloud storage folder, e.g. Fonts folder and then pass the fonts folder path in the API request using fontsLocation parameter.