小编B K*_*rby的帖子

最后一行的 TCPDF 理由问题

我正在使用 PHP 库 TCPDF。我在使用 MultiCell 方法和对齐选项时遇到了一个小问题。该段落的最后一行证明是合理的(我想它做了它应该做的),但只有几个词在它们之间留下了很大的空间。这些是我正在创建的动态表单,因此需要 MultiCell(而不是文本或书写)。

有谁知道是否有办法防止这种情况发生但仍然能够使用 MultiCell 方法?过去我在使用 writeHTML 时遇到过奇怪的问题,如果可能的话,我想避免。

这是产生结果的代码示例:

$text  = 'This is an example paragraph with no other meaning than to show what is currently happening with this justification issue. I really hope there is a way to keep the ';
$text .= 'justification, yet keep the last sentence from doing so and looking silly. Thank you all for your help and time, it is much appreciated.';
$this->_pdf->MultiCell(0, 0, $text, 0, 'J', false, 1);
Run Code Online (Sandbox Code Playgroud)

结果

非常感谢您的宝贵时间。

php tcpdf

3
推荐指数
1
解决办法
2649
查看次数

标签 统计

php ×1

tcpdf ×1