comment faire pour insérer une nouvelle ligne dans une cellule en fpdf
J'ai essayé d'utiliser Ln(), Multicellulaire() ou Write(), mais je reçois toujours des problèmes bizarres. Comme après la 1ère ligne et de la 6e colonne, les boucles des pauses, et toute la mise en page retombe.
foreach($data as $row)
{
$room='-1010B';
$labNo='(L1)';
$this->SetFont('Arial','B',10);
$this->Cell($w[0],15,$row[0],'LR',0,'C',$fill);
$this->SetFont('Arial','',10);
$this->Cell($w[1]+$w[2],15,$row[1]. " " .$room,'LR',0,'C',$fill);
$this->Cell($w[3],15,$row[3]. " " .$room,'LR',0,'C',$fill);
$this->Cell($w[4],15,$row[4]. " " .$room,'LR',0,'C',$fill);
$this->SetFont('Arial','B',9);
$this->Cell($w[5],15,$row[5],'LR',0,'C',$fill);
$this->SetFont('Arial','',10);
if($row[6]!="")
$this->Cell($w[6],15,$row[6]. " " .$room,'LR',0,'C',$fill);
else
$this->Cell($w[6],15,$row[6],'LR',0,'C',$fill);
$this->Cell($w[7]+$w[8]+$w[9],15,$row[7],'LR',0,'C',$fill);
$flag++;
$this->Ln();
$fill =! $fill;
}
Vous devez vous connecter pour publier un commentaire.
Prendre un coup d'oeil à l'exemple de script sur fpdf.org
http://fpdf.org/en/script/script3.php
Vous aurez envie de créer un tableau pour chaque ligne et utiliser la fonction Ligne() qui gère plusieurs lignes pour vous.
Pour insérer une nouvelle ligne
\n
par exemple:This is a\n2 line example
Dans mon cas symbole
@
travaillé.L'aide de la méthode WrapCell: