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
|
include("phpToPDF/phpToPDF.php");
include("phpToPDF/fpdf.php");
$PDF = new phpToPDF();
$PDF->AddPage();
//Sélection de la police
$PDF->SetFont('Arial','',12);
// logo
$PDF->Image("./images/logo.jpg", 10, 10, 50);
$PDF->Text(10,40,"Adresse:");
// variable php qui me donne l'adresse
$PDF->setXY(10, 70);
//tableau
// Définition des propriétés du tableau.
$proprietesTableau = array(
'TB_ALIGN' => 'L',
'L_MARGIN' => 0,
'BRD_COLOR' => array(42,70,148),
'BRD_SIZE' => '0.1',
);
// Définition des propriétés du header du tableau.
$proprieteHeader = array(
'T_COLOR' => array(255,255,255),
'T_SIZE' => 12,
'T_FONT' => 'Arial',
'T_ALIGN' => 'L',
'V_ALIGN' => 'T',
'T_TYPE' => 'B',
'LN_SIZE' => 7,
'BG_COLOR_COL0' => array(68,112,235),
'BG_COLOR' => array(68,112,235),
'BRD_COLOR' => array(42,70,148),
'BRD_SIZE' => 0.1,
'BRD_TYPE' => '1',
'BRD_TYPE_NEW_PAGE' => '',
);
// Contenu du header du tableau.
$contenuHeader = array(
90, 16, 20, 32, 32,
"Produit", "Référence", "Quantité", "Prix Unitaire.", "Prix total",
);
// Définition des propriétés du reste du contenu du tableau.
$proprieteContenu = array(
'T_COLOR' => array(0,0,0),
'T_SIZE' => 11,
'T_FONT' => 'Arial',
'T_ALIGN_COL0' => 'L',
'T_ALIGN' => 'L',
'V_ALIGN' => 'T',
'T_TYPE' => '',
'LN_SIZE' => 12,
'BG_COLOR_COL0' => array(255, 255, 255),
'BG_COLOR' => array(255,255,255),
'BRD_COLOR' => array(42,70,148),
'BRD_SIZE' => 0.1,
'BRD_TYPE' => '1',
'BRD_TYPE_NEW_PAGE' => '',
);
$contenuTableau = array ('article', 'ref', 'qty','prix', 'prix total');
$PDF->drawTableau($PDF, $proprietesTableau, $proprieteHeader, $contenuHeader, $proprieteContenu, $contenuTableau );
$PDF->Output(); |
Partager