I have a problem using FPDF for generate PDF File, this is my code
foreach($result as $row)
{
$pdf->Ln();
$pdf->Image("../img/ss/".$row['nama_foto'],10,30,-150);
$pdf->Cell(5,150,$row['subject_ticket'],0,0,'L');
$pdf->SetFont('Times','',9);
$pdf->Cell(1,165,"Category : ".$row['kategori'],0,0,'L');
$pdf->Cell(1,175,"File Uploaded : ".$row['nama_file'],0,0,'L');
$pdf->Cell(1,185,"Messages : ".$row['isi_ticket'],0,0,'L');
}
I want to set Left Alignment for all cell, but the result stuck like that.
You should use the setX method as follows to set the X position of the Cell
$pdf->SetFont('Times','',9);
$pdf->setX(0);
$pdf->Cell(1,165,"Category : kategor",0,0,'L');
$pdf->setX(0);
$pdf->Cell(1,175,"File Uploaded : nama_file",0,0,'L');
$pdf->setX(0);
$pdf->Cell(1,185,"Messages : isi_ticket",0,0,'L');