Bonjour à tous,

Je reprends le développement d'une plateforme de diffusion de données et je ne parviens pas à intégrer une image à l'export PDF

Voici le code :
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
<?php
	header( 'content-type: text/html; charset=utf-8' );
    include_once('phpToPDF.php') ;
    // Assign html code into php variable:
 
	$html="
	<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'[]>
<html xmlns='http://www.w3.org/1999/xhtml' dir='ltr' lang='en-US' xml:lang='en'>
	<head>
		<title>Observatoire de l'habitat Audeso</title>
		<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
	   <style type='text/css'>
			body
			{font-family: Helvetica ;
			   font-style: normal;
			   font-size: 12px;}
			h1, h3, h4, h5
			{font-family: Helvetica ;
			   font-style: normal;
			   font-size: 12px;}
			h2
			{font-family: Helvetica ;
			   font-style: italic;
			   font-size: 20px;}
			p
			{font-family: Helvetica ;
			   font-style: normal;
			   font-size: 12px;}
			td
			{font-family: Helvetica ;
			   text-align:center;
			   font-size: 12px;
			   border: 0.1em solid #FBBA00;}
			table
			{font-family: Helvetica ;
			   font-style: normal;
			   border-collapse:collapse;
			   font-size: 12px;}
			.table1, .table2
			{font-family: Helvetica ;
			   font-style: normal;
			   font-size: 12px;}      
			.pdfsup
			{display:none;}
			.border
			{border: none;}
			
	   </style>
	</head>
<body>
".$_POST["invisible"]."
</body>
</html>";
 
phptopdf_html($html,'pdf/', 'Export_observatoire.pdf');
echo "<a href='pdf/Export_observatoire.pdf' target=_blank>Download PDF</a><br>";
  header('Location: ./pdf/Export_observatoire.pdf'); 
?>
Je ne sais pas si je peux appeler une image dans le body de la variable html ou créer une variable qui appelle une image.

PS: Je suis un peu novice et essaye de m'adapter à la conception du précédent développeur

Merci d'avance.

JC