Bonjour tous le monde,
je cherche créer un fichier word selon des mesure précise , j'ai réussie a le faire , mais le probléme que l'affiche se change selon l'ecran (la résolution je pense) dans les mesure que j'ai donnée en pixel se change , Voici mon code pour bien comprendre :

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
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
<?php header("Content-Type: application/msword; name=ListeDemande.doc");
header("Content-disposition: attachment; filename=ListeDemande.doc"); ?>
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">	
 
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<title>$titrefacture</title>
<style>
 @font-face
 {font-family:Tahoma;
 panose-1:2 11 6 4 3 5 4 4 2 4;
 mso-font-charset:0;
 mso-generic-font-family:swiss;
 mso-font-pitch:variable;
 mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
 {mso-style-parent:"";
 margin:0cm;
 margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 text-autospace:none;
 font-size:10.0pt;
 font-family:"Times New Roman";
 mso-fareast-font-family:"Times New Roman";}
h1
 {mso-style-next:Normal;
 margin:0cm;
 margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 page-break-after:avoid;
 mso-outline-level:1;
 tab-stops:center 248.1pt;
 text-autospace:none;
 font-size:10.0pt;
 font-family:Tahoma;
 mso-font-kerning:0pt;
 text-decoration:underline;
 text-underline:single;}
h2
 {mso-style-next:Normal;
 margin:0cm;
 margin-bottom:.0001pt;
 text-align:center;
 mso-pagination:widow-orphan;
 page-break-after:avoid;
 mso-outline-level:2;
 text-autospace:none;
 font-size:16.0pt;
 font-family:Tahoma;}
h3
 {mso-style-next:Normal;
 margin-top:6.0pt;
 margin-right:0cm;
 margin-bottom:0cm;
 margin-left:0cm;
 margin-bottom:.0001pt;
 text-align:left;
 mso-pagination:widow-orphan;
 page-break-after:avoid;
 mso-outline-level:3;
 text-autospace:none;
 font-size:11.0pt;
 font-family:Tahoma;
 font-style:italic;}
p.MsoHeader, li.MsoHeader, div.MsoHeader
 {margin:0cm;
 margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 tab-stops:center 8.0cm right 16.0cm;
 text-autospace:none;
 font-size:10.0pt;
 font-family:"Times New Roman";
 mso-fareast-font-family:"Times New Roman";}
p.MsoFooter, li.MsoFooter, div.MsoFooter
 {margin:0cm;
 margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 tab-stops:center 8.0cm right 16.0cm;
 text-autospace:none;
 font-size:10.0pt;
 font-family:"Times New Roman";
 mso-fareast-font-family:"Times New Roman";}
 /* Page Definitions */
 @page Section1
 {size:595.3pt 841.9pt;
 margin:2cm 0.5cm 0cm 1.0cm ;
 mso-header-margin:1.5cm;
 mso-footer-margin:0cm;
  mso-paper-source:0;}
div.Section1
 {page:Section1;}
 /* List Definitions */
 @list l0
 {mso-list-id:891423539;
 mso-list-type:simple;
 mso-list-template-ids:67895297;}
@list l0:level1
 {mso-level-number-format:bullet;
 mso-level-text:F0B7;
 mso-level-tab-stop:18.0pt;
 mso-level-number-position:left;
 margin-left:18.0pt;
 text-indent:-18.0pt;
 font-family:Symbol;
 mso-bidi-font-family:Symbol;}
ol
 {margin-bottom:0cm;}
ul
 {margin-bottom:0cm;}
</style>
</head>	
 
<body lang=FR style='tab-interval:35.4pt;text-justify-trim:punctuation'>
<div class=Section1>	
 
<?php 
include ('cnx.php');  
$test = "select id,nom,prenom,adresse,ville,pays,tel,email,label,etat,date_demande,code_postal from  educatelWP_prospect join educatelWP_demande_documentation using(id_procpet) join educatelWP_formation using(id_formation) where etat='Documentation demandee'" ; 
mysql_query("SET NAMES UTF8") ;
 
$res=mysql_query($test);
mysql_query("SET NAMES UTF8") ;
 
?>
<table style="margin:0;padding:0;width:755px;">
<?php 
while($date=mysql_fetch_array($res)) 
{ ?>
<tr style="width:755px;margin:0 auto;padding:0"><td style="vertical-align:top;height:142px;width:40%;"><?php echo $date['nom']." ".$date['prenom']."<br/>" ;
echo $date['adresse'].' '.$date['ville'].' '.$date['code_postal'];
 
echo chr(13) . chr(10) ;
 ?></td>
 <td style="vertical-align:top;width:40%">
<?php echo $date['tel']."<br/>";  
echo $date['label']."<br/>";
 
 ?></td></tr>
<?php } 
?>
 
 
</table>
</body>	
 
</html>
j'éspére que vous avez compris ce que je veux dire
je cherche a mettre mon style static ,, MErci et n'hésitez pas à me répondre