当我做如下:问题使用TCPDF
$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'这样的绝对测量而不是像素? (即:'身高:2cm;'等) – 2011-04-30 10:22:12