简体   繁体   中英

FPDF cell text doesn't fit

This is my PDF view. $pdf->cell text doesn't fit in the cell because is too big.

How can I make my text go to another line if it doesn't fit?

Here's a screenshot:

在此处输入图片说明

        $pdf=new PDF_MC_Table();
        $pdf->Open();
        $pdf->AddPage();
        $pdf->SetWidths(array(10, 15, 12, 14,25,17,35,15,15,20));
        srand(microtime()*1000000);

        $o=1;
        foreach ($finalData as $row) {

            if ($o == 1) {
                $pdf->SetFont("Arial", "B", "8");
            } elseif($o<>1) {
                $pdf->SetFont("Arial", "", "7");
            }
            $pdf->Row( $row);

            $o++;
        }


        $pdf->Output();

That's it! A beautifull table :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM