Problem using TCPDF
When I do as follows:
$html = '<div style="color: red; border: solid 2px blue; width: 100px; height: 200p开发者_Go百科x;">Hello World!</div>';
$pdf->writeHTML($html, true, 0, true, true);
I get the following div: http://i.stack.imgur.com/YA4Fn.jpg
It is not width: 100px; height: 200px;
as you can see in the image. Why does my style not work properly?
This is presumably because TCPDF doesn't support precise HTML to PDF conversion for every CSS style element/unit of measure.
You could try opening a bug over on the project's SourceForge page, if this issue isn't already covered.
Limur
Tcpdf does not support width and height css property to make pdf file best solution is that plase place a particular image instead of setting width height.
精彩评论