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
| <?php
define('FPDF_FONTPATH','../_include/fpdf/font/');
require('../_include/fpdf/fpdf.php');
class PDF extends FPDF
{
//En-tête
function Header()
{
//Logo
$this->Image('_pics/Logo.jpg',27,2);
}
//Pied de page
function Footer()
{
//Logo
$this->Image('_pics/foot.jpg',0,47);
}
}
//Instanciation de la classe dérivée
$dimension = array(86,54);
$pdf=new PDF('P', 'mm', $dimension);
$pdf->AddPage();
$pdf->SetMargins(0,0,0);
$pdf->SetFont('Arial','',14);
$pdf->Ln();
$pdf->Cell(62,5,'Sponge BOB',1);
$pdf->Ln();
$pdf->Output();
exit;
?> |
Partager