I have problem with format of pdf when I use $pdf=new FPDF('');
it's allowed this error
Call to undefined method FPDF::ExportTableau()
so when I use this one $pdf=new PDF('L');
the format of pdf turned what can I do? I check for solution but I didn't found anything can someone help!
this is the problem the pdf is Turned
<?php
session_start();
require('../fpdf17/fpdf.php');
class PDF extends FPDF
{
//Chargement des données
function LoadData($file)
{
//Lecture des lignes du fichier
$lines=file($file);
$data=array();
foreach($lines as $line)
$data[]=explode(';',chop($line));
return $data;
}
//Tableau coloré
function ExportTableau($header,$data)
{
//Couleurs, épaisseur du trait et police grasse
$this->SetFillColor(150,180,255); //fond des entetes de colonnes
$this->SetTextColor(0); //couleur du texte des entetes des colonnes
$this->SetDrawColor(0); // couleur des bordures
$this->SetLineWidth(.3); //epaisseur des traits
$this->SetFont('','B');
//En-tête
$w=array(35,20,50,20,45);
for($i=0;$i<count($header);$i++)
$this->Cell($w[$i],5,$header[$i],1,0,'C',1);
$this->Ln();
//Restauration des couleurs et de la police
$this->SetFillColor(224,235,255); //couleur du fond des cases
$this->SetTextColor(0); //couleur du texte des cases
$this->SetFont('');
//Données
$fill=false;
foreach($data as $row)
{
$this->Cell($w[0],6,$row[0],'LR',0,'L',$fill);
$this->Cell($w[1],6,$row[1],'LR',0,'L',$fill);
$this->Cell($w[2],6,$row[2],'LR',0,'L',$fill);
$this->Cell($w[3],6,$row[3],'LR',0,'L',$fill);
$this->Cell($w[4],6,$row[4],'LR',0,'L',$fill);
$this->Ln();
$fill=!$fill;
}
$this->Cell(array_sum($w),0,'','T');
}
}
}
}
$pdf=new PDF('L');
$pdf->AddPage();
.
.