HTMLファイルを取得してPDF形式で開きます。en、cz、pl、ru言語で機能しますが、中国語では文字を表示せず、代わりにボックスを表示します。画像をご覧ください。私のコードは次のとおりです。
header("Cache-Control: no-cache");
header("Content-Description: File Transfer");
header("Content-Disposition: attachment; filename=$html_file.pdf");
header("Content-Type: application/pdf");
header("Content-Transfer-Encoding: UTF-8");
$ html_fileで使用しているもの:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
また、HTMLファイルは中国語を含むすべての言語に最適です。