How can I create Malayalam PDF using TCPDF in PHP?

前端 未结 1 1566
清歌不尽
清歌不尽 2021-01-24 14:23

I am trying to create malayalam pdfs using TCPDF. As per the manual, i had converted the fonts (using http://fonts.snm-portal.com/) and had added them. It is working but is not

相关标签:
1条回答
  • 2021-01-24 14:41

    Scratch my last comment. As far as I've been able to find, TCPDF does not support indic scripts. For more information see the comments on this blog post http://thottingal.in/blog/2011/05/07/language-ecosystem-sourashtra/

    Python's PyPDFLib http://savannah.nongnu.org/projects/pypdflib should be able to render the sample text you provided correctly however.

    I wanted to test that pango, which underlies PyPDFLib, would handle the string you provided above. So I used another package built on it. I rendered it with rsvg. http://rrbits.com/malayalam.pdf [Note: The text should show up in the Kartika font, and I can't really tell if it's 100% correct due to my lack of knowledge, but I do know it's a lot closer than anything I extracted out of TCPDF. My version of pango is also ancient.]

    0 讨论(0)
提交回复
热议问题