Automatic line feed of cell in fpdf

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.