Convert HTML to PDF using C# - Thai font issue

Hi,

I am trying to convert this html file
index2.zip (19.0 KB)

but I have problem with Thai font as the following.

  1. Line height LineHeight.jpg (172.5 KB) Line height for each line is randomly different.

  2. Consonent and vowel are misplaced. Consonent.jpg (71.5 KB)

  3. Line break between page inside Is it possible to move row #2. to another page? Line_break.jpg (112.5 KB)

Please find my code and and the output file in the zip file.
source_code.zip (222.2 KB)

Thank you,

@dietcheesecake

We tried to test the case in our environment and faced an Exception.
HTMLtoPDFException.png (11.9 KB)

We have logged an issue as PDFNET-50903 in our issue tracking system to investigate the reasons behind this exception. The details provided by you have also been recorded under the ticket. We will investigate the issue from both perspectives and let you know as soon as the ticket is resolved. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hi,

Can you try with these lines of code?

image.png (24.9 KB)

  1. Instantiate Aspose.PDF.Document object with index2.html as the argument.
  2. Save Document object as .PDF file.

You should get the result as shown in aspose_pdf_result.PDF file (in the source_code.zip).

Best Regards,
Chokchai L,

@dietcheesecake

We also tried this code snippet and still faced the same exception in our environment. Can you please share which API version are you using at your side?