How to create characters map for Khmer Unicode in FPDF?

1.4k Views Asked by At

I want to create the characters map for Khmer Unicode in FPDF like other Unicode, so my Khmer Unicode will be supported in FPDF.But I don't know how. Here is the link to my Unicode characters: http://unicode.org/charts/nameslist/n_1780.html#1780.

Please kindly help me. Thanks.

I hope you don't mind with my English.

2

There are 2 best solutions below

1
On

You can use following URL to convert:

But Khmer unicode is not supported by FPDF, you can display Khmer unicode after convert but not with leg, meant can't render well with it. Might be you need to use PDFLib but might need to pay.

Update 10/10/2020: It works, read this: https://ask.osify.com/qa/11677

2
On

As a complement to the previous answer, Khmer text will not be correctly rendered for 2 reasons :

  • Some subscripts will be displayed at the right side of letters (not under the letter).
  • Sometimes the order of Khmer Unicode is different than the order of display/pronunciation.

You will face the same problems with other PDF libraries (EzPDF or TCPDF for example). For my project, I chose to create a docx document instead of a PDF document. You'd need to code a lot of things in order to add the support of khmer language in a PDF library...