Précédent   Forum des professionnels en informatique > PHP > Bibliothèques et frameworks > PDF > FPDF
FPDF Forum d'entraide pour la bibliothèque FPDF permettant de générer des documents PDF en PHP. Avant de poster -> tutoriels FPDF
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 13/09/2007, 14h28   #1
Invité de passage
 
Inscription : mai 2006
Messages : 18
Détails du profil
Informations forums :
Inscription : mai 2006
Messages : 18
Points : 4
Points : 4
Par défaut [FPDF] Créer PDF dynamiquement à partir d'un fichier PHP

Bonjour,

Je suis un novice en php et j'ai un problème que je n'arrive pas à résoudre depuis ce matin. Je cherche en faite à convertir une page php en pdf. En effet, j'ai crée la page php à partir de tout un tas d'information donné grâce à un formulaire. J'aimerai que la page soit au format pdf. J'ai cherché à plusieurs endroits la manière de faire. Et j'ai trouver plusieurs info concernant FPDF. Cependant j'ai l'impression que ca ne fait pas exactement ce que je veux ou alors je n'ai pas compris. Moi je veux que lorsque je clique sur le lien qui m'affiche la page php elle me l'affiche mais au format pdf. J'espère que je suis clair. Y'a t'il une fonction qui prend en entrée le nom du fichier .php ou quelque chose comme ca?

Merci d'avance pour votre aide.
Banks est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 13/09/2007, 19h02   #2
Membre expérimenté
 
Avatar de jc_cornic
 
Inscription : octobre 2006
Messages : 624
Détails du profil
Informations personnelles :
Âge : 36

Informations forums :
Inscription : octobre 2006
Messages : 624
Points : 588
Points : 588
Envoyer un message via MSN à jc_cornic
salut, ce que tu demandes dépend de la complexité de ta page php

si elle ne contient que:
- textes
- tableaux
- images
- graphiques simples

vas voir

si tu as d'autres contenus, essaie htmltopdf, une lib qui permet des trucs même si elle est incomplète

++
JC
__________________
VELOMASTER, idée cadeau ? un jeu de plateau

Hummmmm, des donuts !!!!

Merci de penser à , et et aussi
jc_cornic est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 13/09/2007, 22h30   #3
Invité de passage
 
Inscription : mai 2006
Messages : 18
Détails du profil
Informations forums :
Inscription : mai 2006
Messages : 18
Points : 4
Points : 4
Tout d'abord merci pour ta réponse. J'ai essayé htmltopdf mais ça ne marche pas. Je vais expliquer comment j'ai fais. Je me suis inspiré de l'exemple présent sur ce site http://html2fpdf.sourceforge.net/

Le voici
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 
<?
require("html2fpdf.php");
//Get file contents
$htmlFile = "debugcases/test1.html";
$file = fopen($htmlFile,"r");
$size_of_file = filesize($htmlFile);
$buffer = fread($file, $size_of_file);
fclose($file);
//Initialize class
//define RELATIVE_PATH,FPDF_FONTPATH if needed
$pdf=new HTML2FPDF();
$pdf->AddPage();
//Code below used only if you want relative links to be understood
//$pdf->setBasePath(dirname(__FILE__)."\".$htmlFile);//insert full path where
html is
$pdf->WriteHTML($buffer);
$pdf->Output(); //Read the FPDF.org manual to know the other options
?>
J'ai remplacer le chemin du fichier html par le chemin de mon fichier php nommé "fi.php". Celui ci contient toutes les instructions de formatage html de la page que je veux avoir (positionnement des tableaux, images etc) ainsi que les différentes informations recueillies dans le formulaire précédent(ceci est donc fait dynamiquement).

Ca me donne ceci dans un nouveau fichier que je nomme fipdf.php et qui contient exactement ce code
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 
<?
require("../../html2fpdf.php");
//Get file contents
$htmlFile = "fi.php";
$file = fopen($htmlFile,"r");
$size_of_file = filesize($htmlFile);
$buffer = fread($file, $size_of_file);
fclose($file);
//Initialize class
//define RELATIVE_PATH,FPDF_FONTPATH if needed
$pdf=new HTML2FPDF();
$pdf->AddPage();
//Code below used only if you want relative links to be understood
//$pdf->setBasePath(dirname(__FILE__)."\".$htmlFile);//insert full path where
html is
$pdf->WriteHTML($buffer);
$pdf->Output(); //Read the FPDF.org manual to know the other options
?>
J'anticipe d'hors et déjà vos interrogations quand à l'emplacement du fichier html2fpdf.php : "../../html2fpdf.php". C'est le bon chemin pour y accéder j'ai vérifié. Maintenant il ne faudrait peut être pas que je le mette à cet endroit. Je ne sais pas. En tout cas j'ai plein d'erreur qui s'affiche. Je vous les montrerai demain car là je n'ai pas accès à tout les fichiers. Je pourrais aussi vous copier le contenu du fichier fi.php. En attendant j'espère que ceci vous permettra de me donner quelques explications et de m'aiguiller si je suis sur une mauvaise piste ou si je la suis de la mauvaise façon. Merci d'avance.
Banks est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 14/09/2007, 10h47   #4
Invité de passage
 
Inscription : mai 2006
Messages : 18
Détails du profil
Informations forums :
Inscription : mai 2006
Messages : 18
Points : 4
Points : 4
Voici les messages d'erreur que ca me met
Code :
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
 
Notice: Undefined variable: classproperties in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2264
 
Notice: Undefined index: s in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 392
 
Notice: Undefined index: texte_gras12 in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 804
 
Notice: Undefined index: texte_gras12 in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 980
 
Notice: Undefined index: texte_contenu in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 980
 
Notice: Undefined index: texte_petit in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 980
 
Notice: Undefined index: s in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 392
 
Notice: Undefined index: texte_petit in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 980
 
Notice: Undefined index: s in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 392
 
Notice: Undefined index: texte_gras12 in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 980
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 1338
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 1339
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2506
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2507
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2610
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2670
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2671
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2814
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2815
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 564
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 576
 
Notice: Undefined index: s in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 392
 
Notice: Undefined index: s in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 392
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 1338
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 1339
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2506
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2507
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2610
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2670
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2671
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2814
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2815
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 564
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 576
 
Notice: Undefined index: s in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 392
 
Notice: Undefined offset: 1 in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2769
 
Notice: Undefined offset: 1 in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2769
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 564
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 576
 
Notice: Undefined variable: x in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 819
 
Notice: Undefined variable: currentx in //serveur\comptes\sebastien.thubert\www\fpdf.php on line 1010
 
Notice: Undefined index: texte_contenu in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 804
 
Notice: Undefined offset: 1 in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2769
 
Notice: Undefined offset: 1 in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2769
 
Notice: Undefined offset: 1 in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2769
 
Notice: Undefined offset: 1 in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2769
 
Notice: Undefined offset: 1 in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2769
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 576
 
Notice: Undefined index: s in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 392
 
Notice: Undefined index: s in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 392
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 564
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 576
 
Notice: Undefined index: s in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 392
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 564
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 576
 
Notice: Undefined index: s in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 392
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 1338
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 1339
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2506
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2507
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2610
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2670
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2671
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2814
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2815
 
Notice: Undefined index: nc in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 576
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 1339
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2507
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2671
 
Notice: Undefined index: nr in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 2815
 
Warning: Cannot modify header information - headers already sent by (output started at //serveur\comptes\sebastien.thubert\www\html2fpdf.php:2264) in //serveur\comptes\sebastien.thubert\www\fpdf.php on line 1665
FPDF error: Some data has already been output to browser, can't send PDF file
Et voici ici ma page fi.php. Vous n'avez pas forcément à regarder dans le détail. C'est juste pour que vous ayez une idée de la structure de mon document
Code :
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
 
<?php
session_start();
$totaltarif=$_SESSION['totaltarif'];
$num=$_SESSION['num'];
$option=$_SESSION['option'];
 
$nom=$_SESSION['nom'];
$prenom=$_SESSION['prenom'];
$deptnaiss=$_SESSION['deptnaiss'];
$lieunaiss=$_SESSION['lieunaiss'];
$civilite=$_SESSION['civilite'];
$adresse1=$_SESSION['adresse1']; 
$adresse2=$_SESSION['adresse2'];
$adresse3=$_SESSION['adresse3'];
 
$jour=$_SESSION['jour'];
$mois=$_SESSION['mois'];
$annee=$_SESSION['annee'];
$datenaissance="".$annee."-".$mois."-".$jour."";
 
 
$dateinscription=date("y-m-d");
list($anneeinscr,$moisinscr,$jourinscr)=explode("-",$dateinscription);
 
$ville=$_SESSION['ville'];
$codepostal=$_SESSION['codepostal'];
$situationpro=$_SESSION['situationpro'];
 
$teldomicile=$_SESSION['teldomicile'];
$telportable=$_SESSION['telportable'];
 
$email=$_SESSION['email'];
$emailconfirm=$_SESSION['emailconfirm'];
 
$password=$_SESSION['password'];
$passwordconfirm=$_SESSION['passwordconfirm'];
 
$nomnumurgence=$_SESSION['nomnumurgence'];
 
$teldomicileurgence=$_SESSION['teldomicileurgence'];
$telportableurgence=$_SESSION['telportableurgence'];
 
 
$datenaissancebis= "".$jour."-".$mois."-".$annee."";
$chiffre = explode('-',$datenaissancebis);            // On tri les infos 
$time_naissance = mktime(0,0,0,$chiffre[1],$chiffre[0],$chiffre[2]); // On recupere sa date de naissance en timestamp 
$seconde_vecu = time() - $time_naissance;             // On regarde combien de temps il a vecu en seconde 
$seconde_par_an = (1461*24*60*60)/4;                // On calcule le nombre de secondes en compte les années bisextilles 
$age = floor(($seconde_vecu / $seconde_par_an) +1);    // On calcule son age 
 
 
$login=$_SESSION['email'];
 
$lieuinscription="internet";
 
$nomresponsable=$_SESSION['nomresponsable'];
$adresse1responsable=$_SESSION['adresse1responsable'];
$villeresponsable=$_SESSION['villeresponsable'];
$codepostalresponsable=$_SESSION['codepostalresponsable'];
$teldomicileresponsable=$_SESSION['teldomicileresponsable'];
$telportableresponsable=$_SESSION['telportableresponsable'];
$telbureauresponsable=$_SESSION['telbureauresponsable'];
$professionresponsable=$_SESSION['professionresponsable'];
$classe=$_SESSION['classe'];
$etablissement=$_SESSION['etablissement'];
 
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>fiche d'inscription</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.Style1 {color: #FFFFFF}
-->
</style>
</head>
 
<body>
<table width="1024" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="30" height="25">&nbsp;</td>
    <td width="452" height="25">&nbsp;</td>
    <td width="30" height="25">&nbsp;</td>
    <td width="30" height="25">&nbsp;</td>
    <td width="452" height="25">&nbsp;</td>
    <td width="30" height="25">&nbsp;</td>
  </tr>
  <tr>
    <td width="30">&nbsp;</td>
    <td width="452"><table width="452" border="0" cellspacing="0" cellpadding="0">
	<?php
 
			include("../../inc/definitions.inc.php");
			$serveur = mysql_connect(SERVEUR, NOM, PASSE);	
			$select_base = mysql_select_db(BASE);
			$query="SELECT * FROM ateliers,saisons,salles,resp_association WHERE idAt=\"$num\" and SAISONS_IdSAISONS =idSaisons and Salles_idSALLES=idSalles";
			$send=mysql_query($query);
			$r=mysql_fetch_array($send);
			?>
      <tr>
        <td width="360" rowspan="2"><img src="/images/navigation/rubrique/insc/fi/entete.gif" width="360" height="185"></td>
        <td width="92" height="95"><div align="right" class="texte_gras12"><?php echo $r['intSAISONS']; ?></div></td>
      </tr>
      <tr>
        <td width="92" height="90"><div align="right"><span class="texte_gras12">Informations</span><span class="texte_contenu"><br>
          </span><span class="texte_petit"><?php echo $r['telresp_Assoc']; ?><br>
          www.corvis-art.com<br>
          <?php echo $r['mailresp_Assoc']; ?>
          </span>
        </div></td>
      </tr>
      <tr>
        <td colspan="2"><table width="452" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td class="texte_contenu">&nbsp;</td>
          </tr>
          <tr>
            <td class="titre_sousrubrique">Le participant </td>
          </tr>
          <tr>
            <td class="titre_sousrubrique">&nbsp;</td>
          </tr>
          <tr>
            <td class="texte_contenu"><?php echo $civilite; ?> - Nom : <?php echo $nom; ?> Pr&eacute;nom : <?php echo $prenom; ?><br>
              Date de naissance : <?php echo $jour."/".$mois."/".$annee; ?> - Lieu : <?php echo $lieunaiss; ?> D&eacute;p. (<?php echo $deptnaiss; ?>)<br>
              Adresse :<br>
              <?php if($adresse1!="")echo $adresse1;?>
<?php if($adresse2!="") echo "/".$adresse2."/";?>
<?php if($adresse3!="") echo $adresse3;?><br>
              <?php echo $codepostal; ?> <?php echo $ville; ?><br>
              T&eacute;l&eacute;phone : <?php echo $teldomicile; ?> Portable : <?php echo $telportable; ?><br>
              E-mail : <?php echo $email; ?> <span class="texte_petit">(pour recevoir confirmation ou information) </span></td>
          </tr>
          <tr>
            <td class="texte_contenu"><table width="452" border="0" cellspacing="0" cellpadding="0">
              <tr class="texte_contenu">
                <td width="52">&nbsp;</td>
                <td width="400">&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td class="texte_petit"><span class="texte_gras12">Situation professionelle</span> : (recueillie dans un but statistique) </td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td class="texte_contenu"><?php echo $situationpro; ?></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td class="texte_contenu">&nbsp;</td>
              </tr>
            </table></td>
          </tr>
        </table></td>
        </tr>
      <tr>
        <td colspan="2"><table width="452" border="2" cellspacing="0" cellpadding="0">
          <tr>
            <td bordercolor="#000000"><table width="448" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="8">&nbsp;</td>
                <td width="432" class="titre_sousrubrique">Personne &agrave; pr&eacute;venir en cas d'urgence </td>
                <td width="8">&nbsp;</td>
              </tr>
              <tr>
                <td width="8">&nbsp;</td>
                <td class="texte_contenu">Nom et pr&eacute;nom : <?php echo $nomnumurgence; ?></td>
                <td width="8">&nbsp;</td>
              </tr>
              <tr>
                <td width="8">&nbsp;</td>
                <td class="texte_contenu">T&eacute;l&eacute;phone : <?php echo $teldomicileurgence; ?> Portable <?php echo $telportableurgence; ?> </td>
                <td width="8">&nbsp;</td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td colspan="2" class="texte_contenu">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2" class="texte_contenu"><table width="452" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td bgcolor="#CCCCCC" class="titre_sousrubrique">Inscription demand&eacute;e </td>
          </tr>
          <tr>
            <td bgcolor="#CCCCCC" class="texte_contenu">&nbsp;</td>
          </tr>
          <tr>
            <td bgcolor="#CCCCCC" class="texte_gras12">Activit&eacute; : <?php echo $r['IntituleAT']; ?> Code : <?php echo $r['idAt']; ?> </td>
          </tr>
          <tr>
            <td bgcolor="#CCCCCC" class="texte_contenu">&nbsp;</td>
          </tr>
          <tr>
            <td bgcolor="#CCCCCC" class="texte_contenu">Comment avez-vous connu CORVIS'ART ? ............................................................................ </td>
          </tr>
          <tr>
            <td bgcolor="#CCCCCC" class="texte_contenu">&nbsp;</td>
          </tr>
          <tr>
            <td bgcolor="#CCCCCC" class="texte_contenu">J'adh&egrave;re &agrave; l'association "CORVIS&rsquo;ART", comme membre adh&eacute;rent. Je d&eacute;clare exacts les renseignements inscrits ci-dessus. J&rsquo;accepte sans r&eacute;serve et m&rsquo;engage &agrave; respecter les statuts de l&rsquo;association CORVIS&rsquo;ART et les conditions d&rsquo;inscriptions d&eacute;crites en annexe.</td>
          </tr>
          <tr>
            <td bgcolor="#CCCCCC" class="texte_contenu">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr class="texte_contenu">
        <td colspan="2">&nbsp;</td>
      </tr>
      <tr class="texte_contenu">
        <td colspan="2">Fait &agrave; <?php echo $nomnumurgence; ?>, le <?php echo $jourinscr."/".$moisinscr."/".$anneeinscr; ?></td>
      </tr>
      <tr class="texte_contenu">
        <td colspan="2">Signature : </td>
      </tr>
      <tr>
        <td colspan="2"><div align="right"><img src="/images/navigation/rubrique/insc/fi/tournez.gif" width="125" height="44"></div></td>
      </tr>
      <tr>
        <td colspan="2" class="texte_gras12"><div align="center" class="texte_contenu">&agrave; retourner &agrave; CORVIS'ART, <?php echo $r['adresse1resp_Assoc']; ?> <?php echo $r['cpresp_Assoc']; ?> <?php echo $r['villeresp_Assoc']; ?> </div></td>
      </tr>
    </table></td>
    <td width="30">&nbsp;</td>
    <td width="30">&nbsp;</td>
    <td width="452" valign="top"><table width="452" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="texte_contenu">&nbsp;</td>
      </tr>
      <tr>
        <td class="titre_sousrubrique">Pour les mineurs - Autorisation parentale </td>
      </tr>
      <tr>
        <td class="titre_sousrubrique">&nbsp;</td>
      </tr>
      <tr>
        <td class="texte_contenu">Je soussign&eacute;(e), <?php echo $nomresponsable; ?>, responsable l&eacute;gal
          (e) de l&rsquo;enfant <?php echo $nom; ?> <?php echo $prenom; ?>, l&rsquo;autorise &agrave;
          adh&eacute;rer &agrave; l&rsquo;association &laquo; CORVIS&rsquo;ART &raquo;, comme membre adh&eacute;rent et &agrave; participer &agrave; ses activit&eacute;s. Je d&eacute;clare exacts les
          renseignements inscrits ci-dessus. J&rsquo;accepte sans r&eacute;serve et m&rsquo;engage &agrave; respecter les statuts de l'association
          CORVIS&rsquo;ART et les conditions d&rsquo;inscription d&eacute;crites en annexe.</td>
      </tr>
      <tr>
        <td class="titre_sousrubrique">&nbsp;</td>
      </tr>
      <tr>
        <td class="texte_gras12">Scolarit&eacute; de l'enfant </td>
      </tr>
      <tr>
        <td class="texte_contenu">Classe : <?php echo $classe; ?> Etablissement : <?php echo $etablissement; ?> </td>
      </tr>
      <tr>
        <td class="texte_contenu">&nbsp;</td>
      </tr>
      <tr>
        <td class="texte_gras12">R&eacute;sponsable l&eacute;gal et destinatire des courriers et factures : </td>
      </tr>
      <tr>
        <td class="texte_contenu">Nom : <?php echo $nomresponsable; ?><br>
Adresse :<br>
<?php if($adresse1responsable!="")echo $adresse1responsable;?>
              <?php echo $codepostalresponsable; ?> <?php echo $villeresponsable; ?><br>
T&eacute;l&eacute;phone : <?php echo $teldomicileresponsable; ?> Portable : <?php echo $telportableresponsable; ?></td>
      </tr>
      <tr>
        <td class="texte_contenu">&nbsp;</td>
      </tr>
      <tr>
        <td class="texte_contenu"><table width="452" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="252">Fait &agrave; <?php echo $villeresponsable; ?>, le <?php echo $jourinscr."/".$moisinscr."/".$anneeinscr; ?></td>
            <td width="200"><div align="left">Signature : </div></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td class="texte_contenu">&nbsp;</td>
      </tr>
      <tr>
        <td class="texte_contenu">&nbsp;</td>
      </tr>
      <tr>
        <td bgcolor="#000000" class="titre_sousrubrique Style1">Frais d'inscription</td>
      </tr>
      <tr>
        <td class="texte_contenu">&nbsp;</td>
      </tr>
      <tr>
        <td class="texte_contenu"><table width="452" border="1" cellpadding="2" cellspacing="0" bordercolor="#000000">
          <tr class="texte_contenu">
            <td width="145">Tarif activit&eacute; </td>
            <td width="95" class="texte_gras12"><div align="right"><?php echo $r['TarifsAT']; ?> &euro; </div></td>
            <td width="194" class="texte_petit">Prix du stage, de l'activit&eacute; ou de la sortie </td>
          </tr>
		  <?php
		$query2="SELECT * FROM ateliers,saisons,options WHERE idAt=\"$num\" and optionAT=idOPTIONS and options.IdSAISONS=saisons.idSaisons ";
				$send2=mysql_query($query2);
				$r2=mysql_fetch_array($send2);
		  if(isset($option)){
 
		  ?>
          <tr class="texte_contenu">
            <td width="145">+ Option </td>
            <td width="95" class="texte_gras12"><div align="right"><?php echo $r2['tarifOptions']; ?> &euro; </div></td>
            <td width="194" class="texte_petit">Prix de l'option : <?php echo $r2['intituleOptions']; ?> </td>
          </tr>
		  <?php
		} else {
		?>
		<tr class="texte_contenu">
            <td width="145">+ Option </td>
            <td width="95" class="texte_gras12"><div align="right">Aucune option choisie </div></td>
            <td width="194" class="texte_petit">&nbsp;</td>
          </tr>
		  <?php
		}
		?>
          <tr class="texte_contenu">
            <td width="145">+ Cotisation annuelle membre adh&eacute;rent </td>
            <td width="95" class="texte_gras12"><div align="right"><?php echo $r2['cotisationAdherent']; ?> &euro; </div></td>
            <td width="194" class="texte_petit">Une seule adh&eacute;sion par personne et par saison</td>
          </tr>
          <tr bgcolor="#CCCCCC" class="texte_contenu">
            <td width="145" class="chapeau"><div align="center">TOTAL</div></td>
            <td width="95" class="texte_gras12"><div align="right"><?php if(isset($option)){echo $r['TarifsAT']+$r2['tarifOptions']+$r2['cotisationAdherent'];} else echo $r['TarifsAT']+$r2['cotisationAdherent'];?> &euro; </div></td>
            <td width="194" class="texte_petit">Joint en 1 ou 3 (cochez votre choix) ch&egrave;ques(s) &agrave; l'ordre de : CORVIS'ART </td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td class="texte_contenu">&nbsp;</td>
      </tr>
      <tr>
        <td class="texte_contenu"><table width="452" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="150" class="texte_petit"><div align="right">Vous pouvez effectuer votre<br>
                paiement en trois fois, en<br>
                d&eacute;posant obligatoirement lors de<br>
                votre inscription trois ch&egrave;ques<br>
                correspondants &agrave; chaque<br>
                versement. A d&eacute;faut une p&eacute;nalit&eacute;<br>
                de 10&euro; sera appliqu&eacute; pour frais de<br>
                gestion.</div></td>
            <td width="302"><img src="/images/navigation/rubrique/insc/fi/cheque.jpg" width="302" height="95"></td>
          </tr>
          <tr>
            <td width="150">&nbsp;</td>
            <td width="302">&nbsp;</td>
          </tr>
          <tr>
            <td width="150">&nbsp;</td>
            <td width="302">&nbsp;</td>
          </tr>
          <tr>
            <td width="150">&nbsp;</td>
            <td width="302">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
    <td width="30">&nbsp;</td>
  </tr>
  </table>
</body>
</html>
Voilà merci d'avance pour ceux qui prendront le temps de m'aider.
Banks est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/09/2007, 12h21   #5
Membre du Club
 
Inscription : janvier 2006
Messages : 42
Détails du profil
Informations forums :
Inscription : janvier 2006
Messages : 42
Points : 41
Points : 41
Salut Banks,

Même souci que toi avec l'utilisation de html2fpdf.

Il y'a deux types de problèmes qui transparaissent: des 'undefined variable' et des 'undefined index'.

Pour les 'undefined index', il suffit d'ajouter le type de ligne de code suivant avant chaque ligne incriminée:

Code :
1
2
3
 
  if ( ! isset($this->cell[$this->row][$this->col]['s']) )
    $this->cell[$this->row][$this->col]['s'] = 0;
Le code ci-dessus est valable pour les erreurs 'Notice: Undefined index: s in //serveur\comptes\sebastien.thubert\www\html2fpdf.php on line 392'.

En fait le code du script html2fpdf tente d'ajouter une valeur à une clé indéfinie du tableau de hachage.

Il y'a très certainement un paramêtre du php.ini à modifier pour que les lignes incriminées fonctionnent sans pester... Mais c'est franchement pas propre.

Idem pour les 'undefined variable', sauf que ce sont des variables. Et pour ce cas là, ce qui m'inquiète le plus c'est qu'on puisse utiliser des variables qui ne sont pas définies, ex:
Code :
1
2
 
$this->cell[$this->row][$this->col]['textbuffer'][] = array($e,$this->HREF,$this->currentstyle,$this->colorarray,$this->currentfont,$this->SUP,$this->SUB,''/*internal link*/,$this->strike,$this->outlineparam,$this->bgcolorarray);
Ici le message d'erreur concerne la variable '$e' pour mon cas.

Définitivement pas propre du tout du tout...

Je me demande si je ne vais pas m'orienter vers une autre solution...

PluX59
PluX59 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 27/09/2007, 22h58   #6
Invité de passage
 
Inscription : mai 2006
Messages : 18
Détails du profil
Informations forums :
Inscription : mai 2006
Messages : 18
Points : 4
Points : 4
Bonjour à tous je suis désolé d'avoir mi autant de temps a répondre mais j'ai finalement laissé tombé et je ne travail plus sur ca. Merci à tous ceux qui ont répondu à ce sujet.
Banks est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 05h33.


 
 
 
 
Partenaires

Hébergement Web