我已经使用MPDF将其转换为PDF, 但问题是我不能包含样式表文件。将样式表文件包含在PHP中的MPDF转换中
实施例:
include("../mpdf.php");
$mpdf=new mPDF('c');
$mpdf->SetDisplayMode('fullpage');
// LOAD a stylesheet
$stylesheet = file_get_contents('mpdfstyleA4.css');
$mpdf->WriteHTML($stylesheet,1);
$mpdf->WriteHTML($html);
$mpdf->Output();
我用上面的代码,但我不能看到的样式的效果。 有谁知道更好的方式来包含样式?