单元格由 MultiCell 绘制:
http ://www.tcpdf.org/examples/example_005.phps
$pdf->MultiCell(55, 5, '[LEFT] '.$txt, 1, 'L', 1, 0, '', '', true);
并来自:http ://api.joomla.org/com-tecnick-tcpdf/TCPPDF.html
int MultiCell (float $w, float $h, string $txt, [mixed $border = 0], [string $align = 'J'], [int $fill = 0], [int $ln = 1], [int $x = ''], [int $y = ''], [boolean $reseth = true], [int $stretch = 0])
如您所见,前两个值静态地为 MultiCell 分配宽度 (55) 和高度 (5)
此外:
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
可以看到测量单位是程序/类默认的 PDF_UNIT
然后设置字体大小
$pdf->SetFont('times', '', 10);
(或仅使用 SetFontSize 作为大小)