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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
include("pdfcreate/phpToPDF.php");
############## CREATION DU DOCUMNENT ###############################
class PDF extends phpToPDF
{
function Header()
{
$this->Image("img/header_pdf.jpg",0,0,800,35); // X, Y, Largeur, Hauteur
$this->Image("img/logo_pdf.jpg",15,7,80); // X, Y, Largeur, Hauteur
$this->Ln(40);
}
function Footer()
{
$this->Image("img/footer_pdf.jpg",0,270,800,35); // X, Y, Largeur, Hauteur
$this->SetY(-15);
$this->SetTextColor('255','255','255');
$this->SetFont('Arial','b',11);
$this->Cell(0,10,''.$this->PageNo().' / {nb}',0,0,'C');
}
}
$pdf->Ln(5);
$pdf->SetFont('Arial','','12');
$pdf->SetTextColor('24','127','189');
$pdf->Multicell(0,5,"Annuaire :",0,"L",0);
######################################################################
// Création du tableau annuaire
$proprietesTableau = array(
'TB_ALIGN' => 'L',
'L_MARGIN' => 1,
'BRD_COLOR' => array(0,0,0),
'BRD_SIZE' => '0.1',
);
// Définition des propriétés du header du tableau.
$proprieteHeader = array(
'T_COLOR' => array(0,0,0),
'T_SIZE' => 9,
'T_FONT' => 'Arial',
'T_ALIGN' => 'L',
'V_ALIGN' => 'T',
'T_TYPE' => 'B',
'LN_SIZE' => 7,
'BG_COLOR_COL0' => array(217, 217, 217),
'BG_COLOR' => array(217, 217, 217),
'BRD_COLOR' => array(0,0,0),
'BRD_SIZE' => 0.2,
'BRD_TYPE' => '1',
'BRD_TYPE_NEW_PAGE' => '',
);
// Contenu du header du tableau.
$contenuHeader = array(50,10,45,40,20,10,"[C]Site","[C]legende2","[C]Legende3","[C]Thème","[C]Voir le lien","[C]Image");
// Définition des propriétés du reste du contenu du tableau.
$proprieteContenu = array(
'T_COLOR' => array(0,0,0),
'T_SIZE' => 8,
'T_FONT' => 'Arial',
'T_ALIGN_COL0' => 'L',
'T_ALIGN' => 'C',
'V_ALIGN' => 'M',
'T_TYPE' => '',
'LN_SIZE' => 6,
'BG_COLOR_COL0' => array(255, 255, 255),
'BG_COLOR' => array(255,255,255), // border color
'BRD_COLOR' => array(0,0,0), // background-color
'BRD_SIZE' => 0.2, // Taille de la bordure
'BRD_TYPE' => '1',
'BRD_TYPE_NEW_PAGE' => '',
);
// Contenu du tableau.
$contenuTableau = array();
while($tab = mysql_fetch_array($selection_annuaire))
{
array_push($contenuTableau,"[L]$site","[C]$legende2","$legende3","$theme","$link","$image");
}
$pdf->drawTableau($pdf, $proprietesTableau, $proprieteHeader, $contenuHeader, $proprieteContenu, $contenuTableau);
} |
Partager