cell 里面的中文不能自动换行是为啥?怎么设置
write 可以换行,但是没有边框
multicell 也可以,但是不能生成表格,一个单元格就占了一行,
下载了chinese.php
也不能结局问题,哪位帮忙看看?
回复讨论(解决方案) 你最好贴出测试代码
fpdf 偏于底层,很多东西都是要自己干预的
require './fpdf17/chinese.php';
$pdf=new pdf_chinese();
$pdf->addpage();
$pdf->addgbfont();
$pdf->setfont('gb','', 20);
$txt=helloworldhelloworldhelloworl\n ln dhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworld;
$txt=htmlspecialchars($txt); //转换html关键字符
$txt=nl2br($txt);
$txt= iconv('utf-8', 'gb2312', $txt);
//$pdf->write(10,$txt);
$pdf->cell (80,20,$txt,1,1,'c');
$pdf->output(test.pdf,'d');
$y = $p->gety();
$x = $p->getx();
$p->setfont('text', '', 12);
$p->multicell(60,40,'中文单元格内容',1,'c');
$p->setxy($x+60,$y);
$p->multicell(60,40,'中文单元格内容',1,'c');
为啥 我这个包里的 multicell 不支持 多列呢,一个multicell 就占一行。 而且 字体也没有text 这项呢
要不把你的包发给我一份,tstchong@163.com谢谢
我也遇到类似的问题,请大神
