I have problem with fpdf page orientation. Part of my code:
$pdf=new PDF_MC_Table();
$pdf->AliasNbPages();
$pdf->AddPage('L','A3');
$pdf->SetWidths(array(50,200,50,50,50));
$pdf->SetFont('Arial','B',10);
if(!empty($ow)){
$pdf->SetFont('Arial','B',10);
$pdf->Ln();
$pdf->Cell('50',7,'OPEN TASK OVERDUE');
$pdf->SetFont('Arial','',10);
$groupedTasks=[];
foreach ($ow as $w) {
$groupedTasks[$w['date_due']][] =$w;
}
foreach ($groupedTasks as $key=>$val) {
$pdf->SetFont('Arial', 'B', 10);
$pdf->SetFillColor(0,0,0);
$pdf->SetTextColor(255,255,255);
$pdf->Ln();
$pdf->Cell('50',6,$key." (Due Date)",'','','',true);$pdf->Ln();
$pdf->Ln();
$pdf->SetFillColor(255,255,255);
$pdf->SetTextColor(0,0,0);
$pdf->Cell(50,7,"Lead",1,0,'C',true);
$pdf->Cell(200,7,"Note",1,0,'C',true);
$pdf->Cell(50,7,"Task type",1,0,'C',true);
$pdf->Cell(50,7,"Due date",1,0,'C',true);
$pdf->Cell(50,7,"Assign to",1,0,'C',true);
$pdf->Ln();
$pdf->SetFont('Arial', '', 10);
foreach ($val as $value) {
$pdf->Row([iconv('UTF-8', 'windows-1252', $value['lead_name']),
iconv('UTF-8', 'windows-1252', $value['content']),
iconv('UTF-8', 'windows-1252', $value['task_type']),
iconv('UTF-8', 'windows-1252', $value['date_due']),
iconv('UTF-8', 'windows-1252', $value['assign_to'])]
);
}
}
}
And my problem is that some page (3-4) is in A3 orientation and other set orientation in A4 and my table is broken. What problem can be? I set orientation such as: $pdf->AddPage('L','A3');
My screen:http://clip2net.com/s/3KetEPv
Hope you will help me.Thanks!