我正在使用这个 PDF 库https://github.com/thujohn/pdf-l4在 PHP (Laravel) 中生成 PDF
当我尝试类似的事情时:
$html = '<html>';
$html .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
$html .= '<body>مرحبا</body>';
$html .= '</html>';
return PDF::load( utf8_decode($html) , 'A4', 'portrait' )->show();
我得到?????
输出而不是مرحبا
当我删除utf8_decode时 ,我得到空响应。
谁能告诉我如何使用 PHP 在 PDF 中显示阿拉伯字符。
提前致谢。