3
votes

I'm making some pdf document from php code using fpdf library. In that document i have created two cell like this

    $pdf->Cell(100,100,"Text inside first column",1,0,'L');
    $pdf->Cell(35,35,'Text inside second column ',1,0,'C');

above code works well, out put have two cells, first one has size of 100x100 and second has 35x35 , and second cell was just right to the first cell.

but i need to print that second sell inside the first cell is there any way in fpdf ? can anyone help me?

2

2 Answers

1
votes

I'm not sure what you want exactly achive, but maybe this AddOn could help you to do this:

http://www.interpid.eu/fpdf-table

Other way would be moving the pointer, something like this:

$pdf->Cell(100,100,"Text inside first column",1,0,'L');
$pdf->SetX($pdf->GetX() - 35);
$pdf->Cell(35,35,'Text inside second column ',1,0,'C');
0
votes

In Nested cell X-axis and Y-axis, I have achieved like this

`$pdf->Cell(190,20,"",1,0,'L');
$pdf->SetX($pdf->GetX() - 189);
$pdf->Cell(100,10,'First ',2,0,'L');

$pdf->Cell(90,10,'March/2020 ',2,0,'R');
$pdf->SetY($pdf->GetY() +5);
$pdf->Cell(100,10,'MCB,UBl Omni, HBL Konnect, Alfalah , Mobi Cash ',2,0,'L');
$pdf->SetY($pdf->GetY() +5);`enter code here`
$pdf->Cell(139,10,'third text he`enter code here`re ',2,0,'L');
$pdf->Cell(50,10,'Lahore',2,0,'R');`