xhtmlまたはhtmlでTCPDFのdiv要素を回転する方法
ローテートcss3でテストしてもうまくいかない
css3 は最新バージョンの TCPDF で動作していますか?
-webkit-transform: rotate(270deg);
-moz-transform: rotate(270deg);
-ms-transform: rotate(270deg);
-o-transform: rotate(270deg);
writing-mode: lr-tb;
TCPDF には良い XHTML+CSS サンプルがありますが、少し変更しました。
// 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');