When I render a table below tfpdf doesn't correctly render a table. Where did I make a mistake? And how to fix it? Thanks to all.
$pdf = new tFPDF();
$pdf->AddPage();
// Add a Unicode font (uses UTF-8)
$pdf->AddFont('DejaVu','','DejaVuLGCSansCondensed.ttf',true);
$pdf->SetFont('DejaVu','',8);
// Load a UTF-8 string from a file and print it
$pdf->Cell(0, 10, $title, 0, true, 'C');
$pdf->Cell(0, 10, $titletext, 0, true, 'C');
$pdf->Ln(10);
$pdf->Write(5,$city);
$pdf->Cell(0, 10, $today, 0, true, 'R');
$pdf->Ln();
$pdf->Write(5,$contract_details);
$pdf->Ln(10);
$txt = file_get_contents('body.txt');
$pdf->Write(5,$txt);
// Table Header
$width_cell=array(90,90);
$pdf->SetFillColor(255,255,255);
$pdf->Cell($width_cell[0],10,'БУЮРТМАЧИ:', 1, 0, 'L', true);
$pdf->Cell($width_cell[1],10,'ИЖРОЧИ:', 1, 1, 'L', true);
//Table Body
$x = $pdf->GetX();
$y = $pdf->GetY();
$push_right = 0;
$pdf->MultiCell(90,7,$buyer,1,'L',false);
$pdf->SetXY($x+90, $y);
$pdf->MultiCell(90,7,$props,1,'L',false);
//qrcode
$pdf->Image('frame.png',5,190,50);
$pdf->Output();
source https://stackoverflow.com/questions/69728741/fpdf-table-cells-output-is-not-correct
Comments
Post a Comment