Bonjour

Une petite question sur les array avec FPDF.
Voilà, première chose, je débute, j'ai lu le tutorial sur la création de document FPDF mais je bloque sur un élément, en fait j'aimerai bien insérer une image à la place de la valeur champ1 du tableau ci-dessous, mais j'ai beau mettre le chemin j'obtiens toujours le chemin vers l'image mais pas l'image en elle-même.

Une petite idée ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
<?php
 
include("../../phpToPDF.php");
 
$PDF=new phpToPDF();
$PDF->AddPage();
$PDF->SetFont('Arial','B',16);
 
$proprietesTableau = array(
  'TB_ALIGN' => 'L',
  'L_MARGIN' => 15,
  'BRD_COLOR' => array(0,92,177),
  'BRD_SIZE' => '0.3',
  );
$proprieteHeader = array(
  'T_COLOR' => array(150,10,10),
  'T_SIZE' => 12,
  'T_FONT' => 'Arial',
  'T_ALIGN' => 'C',
  'V_ALIGN' => 'T',
  'T_TYPE' => 'B',
  'LN_SIZE' => 7,
  'BG_COLOR_COL0' => array(170, 240, 230),
  'BG_COLOR' => array(170, 240, 230),
  'BRD_COLOR' => array(0,92,177),
  'BRD_SIZE' => 0.2,
  'BRD_TYPE' => '1',
  'BRD_TYPE_NEW_PAGE' => '',
  );
 
$contenuHeader = array(
  50, 50, 50,
  "Titre de la première colonne", "année N-1", "année N",
  );
 
$proprieteContenu = array(
  'T_COLOR' => array(0,0,0),
  'T_SIZE' => 10,
  'T_FONT' => 'Arial',
  'T_ALIGN_COL0' => 'L',
  'T_ALIGN' => 'R',
  'V_ALIGN' => 'M',
  'T_TYPE' => '',
  'LN_SIZE' => 6,
  'BG_COLOR_COL0' => array(245, 245, 150),
  'BG_COLOR' => array(255,255,255),
  'BRD_COLOR' => array(0,92,177),
  'BRD_SIZE' => 0.1,
  'BRD_TYPE' => '1',
  'BRD_TYPE_NEW_PAGE' => '',
  );
 
$contenuTableau = array(
  "../../images/logo.jph", 1, 2,
  "champ 2", 3, 4,
  "champ 3", 5, 6,
  "champ 4", 7, 8,
  );
 
$PDF->drawTableau($PDF, $proprietesTableau, $proprieteHeader, $contenuHeader, $proprieteContenu, $contenuTableau);
 
$PDF->Output();
 
?php>
Merci