1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
| <?php
define('FPDF_FONTPATH','fpdf/font/');
require('fpdf/fpdf.php');
require("../class/require.php");
require("../integration/DAORequire.php");
$numeros=explode(',',$_GET['numero']);
$i=0;
$saut_page=0;
$numero_de_la_page=0;
class PDF extends FPDF
{
//En-tête
function Header()
{
$this->SetFont('Arial','B',12);
$this->Cell(10,10,'',0,1,'C');
$this->Image('../images/logo.png',10,15,35);
$this->SetFont('Arial','IB',12);
}
//Pied de page
function Footer()
{
//Positionnement à 40 du bas
$this->SetY(-18);
$this->SetFillColor(255,255,255);
$this->SetTextColor(0,0,0);
$fill=1;
$this->Cell(190,2,'','B',1,'',$fill);
$this->SetFont('Arial','B',8);
$this->Cell(0,7,'Page / ',0,0,'R'); //C'est là mon soucis
}
}
//Instanciation de la classe dérivée
$pdf=new PDF();
$pdf->Open();
$pdf->AliasNbPages();
//Pour chaque BL
for ($j=0; $j< count($numeros); $j++)
{
$niveau_de_la_page=0;
$pdf->AddPage();
............ //traitement de chaque facture
} |
Partager