事情是这样的。发生了什么我正在使用 mpdf 作为输出,但出于某种原因我无法使 CSS 输出正常工作。
这是CSS代码:
td colspan="2" style="border-bottom:2px dashed #000;"
有没有办法将 CSS 用于 PDF 输出?
最佳答案
$mpdf=new mPDF();
$html = "<H1>Hello World</H1>";
$stylesheet = file_get_contents('style.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();
exit;
关于CSS 边框 mpdf 输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33377312/