使用MultiCell
某些单元格的宽度组合,这样的尝试:
public function Footer() {
// Make more space in footer for additional text
$this->SetY(-25);
$this->SetFont('helvetica', 'I', 8);
// Page number
$this->Cell(0, 10, 'Seite '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
// New line in footer
$this->Ln(8);
// First line of 3x "sometext"
$this->MultiCell(55, 10, 'Sometext', 0, 'C', 0, 0, '', '', true, 0, false, true, 10, 'M');
$this->MultiCell(55, 10, 'Sometext', 0, 'C', 0, 0, '', '', true, 0, false, true, 10, 'M');
$this->MultiCell(55, 10, 'Sometext', 0, 'C', 0, 0, '', '', true, 0, false, true, 10, 'M');
// New line for next 3 elements
$this->Ln(4);
// Second line of 3x "sometext"
$this->MultiCell(55, 10, 'Sometext', 0, 'C', 0, 0, '', '', true, 0, false, true, 10, 'M');
$this->MultiCell(55, 10, 'Sometext', 0, 'C', 0, 0, '', '', true, 0, false, true, 10, 'M');
$this->MultiCell(55, 10, 'Sometext', 0, 'C', 0, 0, '', '', true, 0, false, true, 10, 'M');
// and so on...
}
,我从github上这种使用最新的TCPDF 11b的活生生的例子,你可以在页脚在这里看到的上面的代码的结果:
https://wolfish.pl/stack/tcpdf/footer.php
你可以看到如何在TCPDF官方示例使用MultiCell
功能更多的例子:https://tcpdf.org/examples/example_005/