Bonjour à tous,

Je cherche maintenant depuis 3 jours une manière d'imprimer en mode paysage. J'ai regardé une bonne trentaine de forums sans jamais trouver de réponse à mon problème.

J'ai bien entendu testé les méthodes @page, @print, size:landscape mais sans succès.

Pourriez vous m'aider s'il vous plait je commence à désespérer.

Voici mon 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
59
60
61
62
63
64
65
<html>
	<head>
		<title>Impression fichier</title>
 
			<!-- style pour tous les médias -->
			<style type=text/css media=all>
				table
				{
					font-family:arial;
					font-size:20px;
					margin-left: auto;
					margin-right: auto;
					width:600px;
				}
			</style>
 
			<!-- style pour l'impression seulement -->
			<style type=text/css media=print>
				thead
				{
					display: table-header-group;
				}
				tfoot
				{
					display: table-footer-group;
				}
				@page
				{
					size :landscape;
					marks:none;
					margin: 0cm ;
				}
			</style>
	</head>
	<body>
		<table border="1">
			<caption><?=$titre?></caption>
			<!-- Création de l'entête à répéter -->
			<thead>
				<tr>
						<th>1ère colonne</th><th>2ème colonne</th><th>3ème colonne</th>
				</tr>
			</thead>
 
			<!-- Création du pied de page à répéter -->
			<tfoot>
				<tr>
					<th style='font-size:14px;font-style:bold;'>Pied de page</th>
				</tr>
			</tfoot>
 
			<tbody>
					<tr>
						<td>contenu</td><td>contenu</td><td>contenu</td>
					</tr>
					<tr>
						<td>contenu</td><td>contenu</td><td>contenu</td>
					</tr>					
					<tr>
						<td>contenu</td><td>contenu</td><td>contenu</td>
					</tr>
			</tbody>
		</table>
	</body>
</html>

Merci d'avance.