Fpdf cell Chinese automatic line feed problems such as Question
Why can't the text in cell be automatically wrapped? How to set
Write can wrap, but there is no border
MultiCell can also be used, but tables cannot be generated. a cell occupies a row,
Download chinese. php
The problem cannot be solved either. Can someone help me?
Reply to discussion (solution)
You 'd better paste the test code
Fpdf is at the bottom layer, and many things require self-intervention.
Require './f000017/chinese. php ';
$ Pdf = new PDF_Chinese ();
$ Pdf-> AddPage ();
$ Pdf-> AddGBFont ();
$ Pdf-> SetFont ('GB', '', 20 );
$ Txt = "helloworldhelloworldhelloworl \ n ln dhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworldhelloworld ";
$ Txt = htmlspecialchars ($ txt); // Convert HTML key characters
$ Txt = nl2br ($ txt );
$ Txt = iconv ('utf-8', 'gb2312', $ txt );
// $ Pdf-> Write (10, $ txt );
$ Pdf-> Cell (, $ txt, 'C ');
$ Pdf-> Output ("testbench", 'D ');
$ Y = $ p-> gety ();
$ X = $ p-> getx ();
$ P-> setfont ('text', '', 12 );
$ P-> MultiCell (60, 40, 'Chinese cell content', 1, 'C ');
$ P-> setxy ($ x + 60, $ y );
$ P-> MultiCell (60, 40, 'Chinese cell content', 1, 'C ');
Why does multiCell in my package not support multiple columns? one multiCell occupies one row. And there is no text in the font.
Would you like to send me a copy of your package, tstchong@163.com thank you
I have encountered similar problems.