<?php
require_once './vendor/autoload.php';
//report errors
error_reporting(E_ALL);
ini_set("display_errors", 1);
$config = [
'mode' => '+aCJK',
// "allowCJKoverflow" => true,
"autoScriptToLang" => true,
// "allow_charset_conversion" => false,
"autoLangToFont" => true,
];
$mpdf=new \Mpdf\Mpdf($config);
$mpdf->WriteHTML('Hello World 中文');
$mpdf->Output();
blueidea
Recommended Posts
要在原文件名前加上前缀并实现文件的批量重命名,你可以根据你所使用的操作系统选择合适的脚本语言来编写脚本。以下是在不同操作系统上实现这一功能的示例: 在 Windows 上使用 PowerShell 在 macOS/Linux 上使用 Shell 脚本 在 Python 中使用 os 模块 注意事项 将上述脚本中的 folder_path 或 $folderPath 替换为你的文件夹路径,将 prefix 替换为你想要添加的前缀,然后运行脚本即可。