HTML - imprimir una tabla

 
Vista:

imprimir una tabla

Publicado por alejon (16 intervenciones) el 13/08/2013 22:14:12
estoy creando un codigo en HTML para una tabla y quisiera saber como puedo mandarla a imprimir no solamente a la pantalla sino tambien a la impresora.
este es el codigo:
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
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Ficha</title>
<style type="text/css">
.remarca {
	font-family: "Times New Roman";
	font-size: 20px;
	font-style: italic;
	line-height: normal;
	font-weight: bold;
	font-variant: normal;
	text-transform: uppercase;
	color: #000000;
}
.oficio {
	font-family: "Times New Roman";
	font-size: 15px;
	font-style: italic;
	line-height: normal;
	font-weight: bold;
	font-variant: normal;
	text-transform: uppercase;
	color: #000000;
}
</style>
</head>
<body>
<form  name="form" action="ficha.php" method="POST">
<?php
    $fecha = date('d-m-Y');
?>
<table><tr><td><input type="submit" name="Imprimir" value="Imprimir"/></td></tr></table>
<table align="center" class="remarca"><tr><td>Seguimiento para Mantenimiento y Reparación      <?php echo $fecha;?></td>
<td class="oficio"><?php echo "(Imprimir en Tamaño Oficio)";?></td></tr></table>
<table width="1000" border="1" align="center">
    <th width="32">Nro</th>
    <th width="90">Placa Bina</th>
    <th width="190">Descripción</th>
    <th width="80">Marca</th>
    <th width="200">Modelo</th>
    <th width="200">Serial</th>
    <th width="175">Ubicación</th>
    <th width="300">Evaluación</th>
    <th width="100">Fecha Reparación</th>
  </tr>
  <tr>
    <td height="80" align="center">1</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="80" align="center">2</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</form>
</body>
</html>

de antemano gracias.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

imprimir una tabla(solucion)

Publicado por alejon (16 intervenciones) el 13/08/2013 22:31:52
Bueno ahora ya se como se imprime una tabla de HTML a una impresora
el codigo es asi:
<input type="button" value="Imprimir" onclick="javascript:window.print()" />
No les di mucho trabajo.
copien ese codigo.
saludos.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
1
Comentar