Multicell Side by Side with FPDF

Solved
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?
Configuration: Firefox 3.5.3

5 answers

  1. papouuu86 Posted messages 86 Status Member 11
     
    ou il faut que tu définisses les coordonnées de ton MultiCell avec
    $pdf->SetXY( coordinate X, coordinate Y)
    5
  2. AdminTOURS Posted messages 412 Status Member 92
     
    Nikel, however, since this is the only block with coordinates, we need to base it in relation to the others that are already placed...
    1
  3. AdminTOURS Posted messages 412 Status Member 92
     
    Thank you!!!

    I will try that.
    0
  4. papouuu86 Posted messages 86 Status Member 11
     
    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.
    0
  5. AdminTOURS Posted messages 412 Status Member 92
     
    No textarea, fortunately! ^^
    0