TCPDF有我已经改变了一点一个很好的XHTML + CSS样本sample。
// define some HTML content with style
$html = <<<EOF
<style>
...
div.test {
color: #CC0000;
background-color: #FFFF66;
font-family: helvetica;
font-size: 10pt;
border-style: solid solid solid solid;
border-width: 2px 2px 2px 2px;
border-color: green #FF00FF blue red;
text-align: center;
-webkit-transform: rotate(270deg);
-moz-transform: rotate(270deg);
-ms-transform: rotate(270deg);
-o-transform: rotate(270deg);
}
</style>
<div class="test">example of rotated DIV with border and fill.<br />Some text.</div>
EOF;
// output the HTML content
$pdf->writeHTML($html, true, false, true, false, '');
//Close and output PDF document
$pdf->Output('RotatedDIV_Sample.pdf', 'I');
谢谢你的帮助,解决了类dompdf的问题 –
@JoséFrederico你能解释一下如何... – fjbatresv