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
| <?php
require('fpdf/fpdf.php');
$pdf=new FPDF('P','mm','A4');
$pdf->AddPage();
$pdf->Image('img/image-g.jpg',10,10);
$pdf->Image('img/image-d.jpg',148,10);
$pdf->Image('img/ligne.png',10,40,190,1);
$pdf->SetFont('Times','B',16);
$w=$pdf->GetStringWidth('TITRE DU PDF');
$pdf->SetX((210-$w)/2);
$pdf->Cell(0,10,'TITRE DU PDF',0,1);
$pdf->SetFont('Times','B',12);
$w2=$pdf->GetStringWidth('sous titre 1');
$pdf->SetX((210-$w2)/2);
$pdf->Cell(0,2,'sous titre 1');
$w3=$pdf->GetStringWidth('sous titre 2');
$pdf->SetX((210-$w3)/2);
$pdf->Cell(0,12,'sous titre 2');
$pdf->Output();
?> |
Partager