2013-06-21 120 views
-2

如何旋转的div元素在TCPDF与XHTML或HTML与旋转CSS3没有工作旋转DIV元素

我需要帮助

测试,CSS3的最后一个版本TCPDF工作?

-webkit-transform: rotate(270deg); 
-moz-transform: rotate(270deg); 
-ms-transform: rotate(270deg); 
-o-transform: rotate(270deg); 
writing-mode: lr-tb; 

回答

2

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'); 
+0

谢谢你的帮助,解决了类dompdf的问题 –

+2

@JoséFrederico你能解释一下如何... – fjbatresv