FPDF multicell alignment not working

橙三吉。 提交于 2019-12-10 19:15:19

问题


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.


回答1:


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.




回答2:


this is the Syntax for Multicell

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

you can do it now



来源:https://stackoverflow.com/questions/18865350/fpdf-multicell-alignment-not-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!