2

tengo la siguiente duda y no se como podria hacerlo:

Tengo la siguiente ventana en HTML:

<!DOCTYPE html>
<html lang="en" class="no-js">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
        <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
        <title>Titulo</title>
    </head>
<body>

<section id="section-1">
<center>
<h3><font color="#000">REPORT</font></h3>
</center>

<table border='1' style="width: 100%;">
<tr>
<th style='background:#02082e;'>Group</th>
<th style='background:#02082e;'>Shift</th>
<th style='background:#02082e;'>Fleet</th>
<th style='background:#02082e;'>First truck</th>
<th style='background:#02082e;'>First position</th>
<th style='background:#02082e;'>Last truck</th>
<th style='background:#02082e;'>Last position</th>
<th style='background:#02082e;'>Date on</th>
<th style='background:#02082e;'>Date off</th>
<th style='background:#02082e;'>Scrap date</th>
</tr>
<tr>
<td style='background:#ffffff;text-align:center;'><font color="#000000"> <b> <?php echo $datos['grupo_dese']; ?> </b></font></td>
<td style='background:#ffffff;text-align:center;'><font color="#000000"> <b> <?php echo $datos['turno_dese']; ?> </b></font></td>
<td style='background:#ffffff;text-align:center;'><font color="#000000"> <b> <?php echo $datos['flota_servde']; ?> </b></font></td>
<td style='background:#ffffff;text-align:center;'><font color="#000000"> <b> <?php echo $datos['primer_equip']; ?> </b></font></td>
<td style='background:#ffffff;text-align:center;'><font color="#000000"> <b> <?php echo $datos['primer_pos']; ?> </b></font></td>
<td style='background:#ffffff;text-align:center;'><font color="#000000"> <b> <?php echo $datos['equipo_servide']; ?> </b></font></td>
<td style='background:#ffffff;text-align:center;'><font color="#000000"> <b> <?php echo $datos['pos_deservi']; ?> </b></font></td>
<td style='background:#ffffff;text-align:center;'><font color="#000000"> <b> <?php echo $datos['fecha_primermt']; ?> </b></font></td>
<td style='background:#ffffff;text-align:center;'><font color="#000000"> <b> <?php echo $datos['fecha_ultides']; ?> </b></font></td>
<td style='background:#ffffff;text-align:center;'><font color="#000000"> <b> <?php echo $datos['fecha_desech']; ?> </b></font></td>
</tr>
</table>

 </body>
 </html>

Este archivo html solo trae información de la base de datos por medio de php y mysql.

Ahora lo que estoy buscando es agregar un botón en cualquier parte de ese HTML que al pulsarlo me descargue la información de esa misma ventana en PDF, es posible hacerlo? de que forma podría hacerlo? si alguien tiene algún ejemplo se lo agradecería mucho.

Quedo atento.

Saludos.

3
  • 1
    Qué es lo que has intentado hasta ahora? el 27 dic. 2019 a las 16:40
  • 1
    Hola podrias ver la documentación de esta pagina, pdfcrowd.com/doc/api/html-to-pdf/php el 27 dic. 2019 a las 16:51
  • trata de reproducir el error para que sea más claro, yo votaría negativa esta pregunta porque no cumple con las normas de la comunidad para hacer una pregunta el 27 dic. 2019 a las 18:09

0

Tu Respuesta

Al pulsar en “Publica tu respuesta”, muestras tu consentimiento a nuestros términos de servicio, política de privacidad y política de cookies

Examina otras preguntas con la etiqueta o formula tu propia pregunta.