Reputation: 291
I am using TCPDF class for generate pdf report from my php file. There is a table which contain unicode. In normal PHP file when I set meta charset=utf-8 then it show my desired unicode language. But in PDF it does not show. I have tried following code:
new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
header('Content-type: text/html; charset=utf-8');
mysql_query("SET CHARACTER SET utf8");
mysql_query("SET SESSION collation_connection ='utf8_general_ci'");
But nothing work for me. Its always show - বাংলা , this kind of string like my table.
Upvotes: 0
Views: 744
Reputation: 291
I have solved my issue using mPDF. It's quite easy to use compared to TCPDF.
Upvotes: 1