tags:

views:

29

answers:

1

Hi, why text don't jump to new line?

http://img826.imageshack.us/img826/2097/pdf.png

My code:

<?php
require('fpdf.php');

$pdf=new FPDF('P','mm','A4');
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World! Hello World! Hello World! Hello World! Hello World!Hello World!Hello World!','LRTB');
$pdf->Cell(40,10,'Hello World! Hello World! Hello World! Hello World! Hello World!Hello World!Hello World!','LRTB');
$pdf->Cell(40,10,'Hello World! Hello World! Hello World! Hello World! Hello World!Hello World!Hello World!','LRTB');
$pdf->Ln();
$pdf->Cell(40,10,'Hello World! Hello World! Hello World! Hello World! Hello World!Hello World!Hello World!','LRTB');
$pdf->Cell(40,10,'Hello World! Hello World! Hello World! Hello World! Hello World!Hello World!Hello World!','LRTB');
$pdf->Cell(40,10,'Hello World! Hello World! Hello World! Hello World! Hello World!Hello World!Hello World!','LRTB');
$pdf->Output();
?>
A: 

The "Hello World" strings are printing across the cell borders.

If you want text to wordwrap inside a cell try using the MultiCell() method.

realcals