FPDF多细胞排列不工作[英] FPDF multicell alignment not working

本文是小编为大家收集整理的关于FPDF多细胞排列不工作的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我在我的PDF中有这个多电器:

$pdf->multicell(115,6,$name,1,0,'L',1);

,但事实证明文本是正确的对齐而不是对齐的.

我发现了同样的问题在这里,但我没有得到他的解决方案, "我必须设置任何字体"是什么意思?我无法评论他的答案,因为我的声誉不足以发表评论.

推荐答案

方法MultiCell最多获得6个参数,而不是7.这里的问题是,您提供0用于对齐,而不是'L'.请参阅文档,有关详细信息

其他推荐答案

这是多电器的语法

$pdf->MultiCell(100,3,"We declare " ,1,'L',false);

您现在可以做

本文地址:https://www.itbaoku.cn/post/2090914.html

问题描述

I have this multicell in my pdf:

$pdf->multicell(115,6,$name,1,0,'L',1);

But it turns out that the text is right aligned instead of left aligned.

I found the same problem here but I don't get his solution, what does "I had to set any font" mean? I can't comment on his answer because my reputation's not enough to give comments.

推荐答案

The method MultiCell gets at most 6 arguments, not 7. The problem here is, that you supply 0 for alignment, not 'L'. See the documentation for details.

其他推荐答案

this is the Syntax for Multicell

$pdf->MultiCell(100,3,"We declare " ,1,'L',false);

you can do it now