Multicell Side by Side with FPDF
Solved
AdminTOURS
Posted messages
412
Status
Member
-
AdminTOURS Posted messages 412 Status Member -
AdminTOURS Posted messages 412 Status Member -
Hello,
I have a small problem with the FPDF library, I want to place 2 multicells side by side, but it doesn't work...
My cells are fine (side by side with a little spacing):
$this->Ln(15);
$this->Cell(5);
$this->SetFont('Arial','B',8);
$this->Cell(80,5,'Billing Address',1,0,'C');
$this->Cell(10);
/////////////////////////////////////////////////////////////////////////////////////////////////////////
$this->SetFont('Arial','B',8);
$this->Cell(80,5,'Shipping Address',1,0,'C');
$this->Ln(5);
$this->Cell(5);
but the same thing doesn't work with the 2nd multicell which goes to the next line:
$this->SetFont('Arial','',8);
$this->MultiCell(80,5,$nom."\n".$liv_societe."\n".$liv_adresse1."\n".$liv_adresse2."\n".$liv_cp." ".$liv_ville,1,'L');
$this->Cell(10);
$this->SetFont('Arial','',8);
$this->MultiCell(80,5,$nom."\n".$liv_societe."\n".$liv_adresse1."\n".$liv_adresse2."\n".$liv_cp." ".$liv_ville,1,'L');
Any idea?
I have a small problem with the FPDF library, I want to place 2 multicells side by side, but it doesn't work...
My cells are fine (side by side with a little spacing):
$this->Ln(15);
$this->Cell(5);
$this->SetFont('Arial','B',8);
$this->Cell(80,5,'Billing Address',1,0,'C');
$this->Cell(10);
/////////////////////////////////////////////////////////////////////////////////////////////////////////
$this->SetFont('Arial','B',8);
$this->Cell(80,5,'Shipping Address',1,0,'C');
$this->Ln(5);
$this->Cell(5);
but the same thing doesn't work with the 2nd multicell which goes to the next line:
$this->SetFont('Arial','',8);
$this->MultiCell(80,5,$nom."\n".$liv_societe."\n".$liv_adresse1."\n".$liv_adresse2."\n".$liv_cp." ".$liv_ville,1,'L');
$this->Cell(10);
$this->SetFont('Arial','',8);
$this->MultiCell(80,5,$nom."\n".$liv_societe."\n".$liv_adresse1."\n".$liv_adresse2."\n".$liv_cp." ".$liv_ville,1,'L');
Any idea?
Configuration: Firefox 3.5.3
5 answers
-
ou il faut que tu définisses les coordonnées de ton MultiCell avec
$pdf->SetXY( coordinate X, coordinate Y) -
Nikel, however, since this is the only block with coordinates, we need to base it in relation to the others that are already placed...
-
-
Yes, for you it's fine, but it could cause problems if you have fields with variable strings above. For example, if you retrieve a textarea that can contain multiple lines, your multicell could be moved.
-