Bonjour,
je dois réaliser la génération d'un PDF avec l'outils FPDF (que je conseil, car gratuit et vraiement puissant). Mon soucis est de faire apparaitre le numero des pages.
Le problème est que j'ai l'erreur :
Fatal error: Call to a member function on a non-object in c:\program files\easyphp1-8\www\cdi\fpdf\tutoriel\tuto5.php on line 49
Si quelqu'un a une idée ? 
Si quelqu'un peut corriger mon code
Merci
<?php
require('../fpdf.php');
class PDF extends FPDF
{
function Header()
{
$this->SetFont('Arial','B',16);
$this->Text(6,6,"NOM DE MON APPLICATION");
//Saut de ligne
$this->Ln(20);
}
//Pied de page
function Footer()
{
//Positionnement à 1,5 cm du bas
$this->SetY(-15);
//Police Arial italique 8
$this->SetFont('Arial','I',8);
//Numéro de page
$this->Text(0,10,'Page '.$this->PageNo().'/{nb}');
}
//Tableau coloré
function FancyTable($header)
{
$this->SetFillColor(96,96,96);
$this->SetTextColor(255,255,255);
mysql_connect('localhost','root','') or die("ERROR DATABASE CONNECTION");
mysql_select_db('MA BASE ICI') or die("DATA SELECTION ERRROR");
$query="select * from passage";
$resultat=mysql_query($query);
$this->SetXY(3,3);
for($i=0;$i<2;$i++)
$this->cell(5,1,$header[$i],1,0,'C',1);
$this->SetFillColor(0xdd,0xdd,0xdd);
$this->SetTextColor(0,0,0);
$this->SetFont('Arial','',10);
$this->SetXY(3,$this->GetY()+1);
$fond=0;
while($row=mysql_fetch_array($resultat))
{
$this->cell(5,0.7,$row['pas_id'],1,0,'C',$fond);
$this->cell(5,0.7,$row[1],1,0,'C',$fond);
$this->cell(5,0.7,$row[2],1,0,'C',$fond);
$this->SetXY(3,$this->GetY()+0.7);
$this=!$fond;
}
}
}
$pdf=new PDF();
//Titres des colonnes
$header=array('Pays','Capitale','Superficie');
//Chargement des données
$pdf->SetFont('Arial','',14);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->FancyTable($header);
$pdf->Output();
?>