【发布时间】:2014-01-27 13:13:48
【问题描述】:
当我执行以下操作时:
$html = '<div style="color: red; border: solid 2px blue; width: 100px; height: 200px;">Hello World!</div>';
$pdf->writeHTML($html, true, 0, true, true);
我得到以下 div:http://i.stack.imgur.com/YA4Fn.jpg
这不是您在图片中看到的width: 100px; height: 200px;。为什么我的样式不能正常工作?
【问题讨论】:
-
您是否尝试过使用诸如
cm或mm之类的绝对度量来代替像素? (即:height:2cm;等)