FPDF Cell or Multicell

0

Good afternoon everyone,

I have a problem with a text that is too long for the cell, and I do not know if it is possible for Cell or Multicell to adjust so that the long text enters in the same cell but in two lines.

I have tried these two options and both create a new cell:

$pdf->Cell(101,8,utf8_decode("Producto alimenticio de alto valor nutricional, excelente para deportistas"),1,1,'L','true');  
$pdf->Multicell(101,8,utf8_decode("Producto alimenticio de alto valor nutricional, excelente para deportistas"),1,1,'L','true');  

Any ideas ?? Thank you very much.

    
asked by wiki 02.03.2018 в 20:17
source

1 answer

1

What you are looking for can be achieved by using a MultiCell . It is important to indicate the parameters correctly, something that apparently you are not doing ( the parameters for a MultiCell have a different order than those of Cell ).

Something you should consider is that when you indicate the height ( $height ) that value is the height of each line ( or line ) and not the total height of the cell.

Example:

$pdf->MultiCell(101, 4, utf8_decode("Producto alimenticio de alto valor nutricional, excelente para deportistas"), 1, 'L');
    
answered by 02.03.2018 / 21:05
source