Search code examples
phpexecwkhtmltopdf

Wkhtml to export pdf with utf-8 tamil language


In command prompt direct command execution at windows command tamil language is exporting successfully

wkhtmltopdf.exe --encoding UTF-8 http://localhost/pdfexport/phpwkhtmltopdf-master/page.html file/test.pdf

But executing same command via PHP exec($cmd) tamil strings is not exporting.


Solution

  • To me this sounds like PHP was not configured correctly for UTF8 support. In pure PHP, without exec(), could you verify this echo "ஆங்கிலம்"; gets printed on screen in a webpage or script of sort? Do this indepenetly of wkhtmltopdf.