使用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/