小编Mia*_*bar的帖子

mpdf 不起作用 [致命错误:未找到特征“Mpdf\Strict”]

我已经下载了 mpdf 的更新版本并将其与 php 一起使用。它给了我以下错误。

“致命错误:在第 39 行的 E:\xampp\htdocs\PDF\mpdf\Mpdf.php 中未找到特征 'Mpdf\Strict'”。

$html = '<h2>mpdf test.</h2>';

include("mpdf/mpdf.php");

$mpdf = new mPDF('c','A4','','',32,25,27,25,16,13); 

$mpdf->SetDisplayMode('fullpage');

$mpdf->list_indent_first_level = 0; // 1 or 0 - whether to indent the first 
 level of a list

// LOAD a stylesheet
$stylesheet = file_get_contents('mpdfstyletables.css');
$mpdf->WriteHTML($stylesheet,1);    // The parameter 1 tells that this is css/style only and no body/html/text

$mpdf->WriteHTML($html,2);

$mpdf->Output('mpdf.pdf','I');
exit;
Run Code Online (Sandbox Code Playgroud)

php mpdf

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

mpdf ×1

php ×1