Search code examples
phpcodeigniterezpdf

Php ezPdf library UTF - 8 hindi fonts showing as junk


I'm working with ezPdf library. When I'm printing the utf-8 fonts stored in my db (Data in Hindi Language) it is showing this kind of output: enter image description here

Task name is stored in Hindi fonts (UTF-8). It is properly visible on webpage but when i'm generating pdf it's showing up as junk.

Thanks ...


Solution

  • I think it requires that you have a font that will display the character set you are trying to include (i.e. Cyberbit). Then you must set the $isUnicode = true; in the Cpdf.php file. This will then allow the characters to be displayed as expected.