Php TCPDF表格标题中的旋转文本溢出
我正在将表格中的标题旋转90度,但无法确定如何在包含单元格中定位标题,以及如何调整标题周围的大小Php TCPDF表格标题中的旋转文本溢出,php,tcpdf,Php,Tcpdf,我正在将表格中的标题旋转90度,但无法确定如何在包含单元格中定位标题,以及如何调整标题周围的大小 $html .= '<table border="1" cellpadding="2" cellspacing="0"> <thead> <tr style="background-color: #CCC;">'; foreach ($fields as
$html .= '<table border="1" cellpadding="2" cellspacing="0">
<thead>
<tr style="background-color: #CCC;">';
foreach ($fields as $field) {
$html .= '<th>'
. '<tcpdf method="StartTransform"/>'
. '<tcpdf method="Rotate" params="' . $pdf->serializeTCPDFtagParameters(array(90)) .'"/>'
. s($this->format_column_heading($field, true))
. '<tcpdf method="StopTransform"/>'
. '</th>';
}
$html .= '</tr></thead><tbody>';
$html.='
';
foreach($fields作为$field){
$html。=''
. ''
. ''
.s($this->格式化列\标题($field,true))
. ''
. '';
}
$html.='';
输出结果如下所示:
现在我可以使用TranslateY将标题向下移动一个固定的量,但是列标签是用户定义的,所以这并没有真正的帮助。我也不明白如何说服灰色的标题单元格展开以环绕旋转的标题
注意-这是对一段成熟而复杂的PDF呈现代码的修改,所以我不能只是重写来跳过html->PDF转换