FPDF多单元格对齐不起作用 [英] FPDF multicell alignment not working
本文介绍了FPDF多单元格对齐不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的pdf文件中有这个多单元格:
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.
推荐答案
方法MultiCell
最多获取6个参数,而不是7个参数.这里的问题是,您提供0
用于对齐,而不是'L'
.有关详细信息,请参见文档.
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.
这篇关于FPDF多单元格对齐不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文