PHP - Html a PDF (No he podido)

 
Vista:
sin imagen de perfil

Html a PDF (No he podido)

Publicado por cesar (4 intervenciones) el 28/04/2017 22:29:04
Buenas tardes señores, me llamo cesar laguna, soy de colombia, empeze a desarrollar paginas web hace ya un tiempo pero he lo que es programacion php no lo he podido dominar.

Tengo el siguiente dilema, un cliente me pidio un formulario donde el usuario solo llena unos campos (Lo demas es prestablecido), quieren que al dar clic en el boton enviar, este genere un pdf y se envie a varios emails, a parte necesito que ese pdf se guarde en una ubicacion en el hosting con nombre_fecha_hora.pdf para ser usado mas adelante.

he probado con dompdf, html2pdf, fpdf, etc me funcionan algunos pero no captura lo que esta escrito, me explico el usuario debe llenar los campos de nombre y apellidos y esa informacion debe ser guardada en el pdf, dompdf una vez me funciono pero me captura el html en blanco, osea sin la informacion que escriba el usuario.

enlace para que vean el formulario

http://actua1.tsem.com.co/formatos/86080748.html

por favor ayudenme explicandome para dummys como usar el que uds consideren efectivo para esa funcion, llevo 20 dias haciendo ese proyecto web y todo lo tengo listo menos ese punto, creanme que he leido cuanto manual encuentro, hasta con jquery he intentado pero no me funciona.

nota: no estoy usando bases de datos sql, ni nada, solo necesito que me capture el pdf y lo envie por email.
nota: en el enlace si uds llenan los campos de nombre e identificacion y dan clic en el boton que dice "Generar PDF" si funciona, obbio es un solo un llamado a la funcion imprimir de chrome q permite guardar en pdf, sin embargo esa funcion si captura lo que el usuario escribe, obbio no le puedo decir al cliente que el usuario debe llenar los campos, guardar el pdf, y enviarlo via mail de forma manual porque no le sirve esa solucion,

de antemano mil 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
Imágen de perfil de Lina
Val: 24
Ha aumentado su posición en 4 puestos en PHP (en relación al último mes)
Gráfica de PHP

Html a PDF (No he podido)

Publicado por Lina (15 intervenciones) el 28/04/2017 22:43:51
Hola cesar,
inspeccionando tu código en la consola del navegador note que no estas haciendo ningun formulario,
es necesario que construyas un formulario para que captures los datos de los campos ya sea por post o get,
o bien hacerlo con javascript.

Coméntame cual te parece mejor, y muestra un poco de tu código y con mucho gusto te colaboro.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

Html a PDF (No he podido)

Publicado por cesar (4 intervenciones) el 28/04/2017 22:53:07
hola mil gracias por tu respuesta, mira la verdad soy novato en codigo, estoy usando dreamweaver, con las opciones de formularion que trae. ya te anoto el codigo que genera.

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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css" media="print">
.nover {display:none}
</style>
<style type='text/css'>
input{
text-align:center;
}
</style>
<title>Documento sin título</title>
</head>
 
<body>
<table width="80" border="0">
  <tbody>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>
<table width="800" border="1" align="center">
  <tbody>
    <tr>
      <td><form id="form1" name="form1" method="post">
Plataforma TSEM 2017
      </form></td>
    </tr>
  </tbody>
</table>
<table width="800" border="1" align="center">
  <tbody>
    <tr> </tr>
    <tr>
      <td align="center"><img src="imgactual/logo.png" width="250" height="82" alt=""/></td>
      <td align="center" ><img src="imgactual/qrcode.png" width="116" height="110" alt=""/></td>
      <td align="center"><p><strong>SERVICIOS EMPRESARIALES DEL META S.A.S. </strong></p>
      <p><strong>NIT. 900985193-4 </strong></p></td>
    </tr>
  </tbody>
</table>
<table width="800" border="1" align="center">
  <tbody>
    <tr>
      <td width="850" height="10" align="center"><p><strong>ACTUALIZACIÓN LISTA DE USUARIOS</strong></p></td>
    </tr>
  </tbody>
</table>
<table width="800" border="1" align="center">
  <tbody>
    <tr>
      <td width="90"><label for="textfield">Contratista: </label></td>
      <td width="270"><strong>TRANSPORTE BUENAVISTA S.A.S</strong></td>
      <td width="27"><label for="textfield3">Nit:</label></td>
      <td width="385"><strong>900.476.774-1</strong></td>
    </tr>
    <tr>
      <td height="19"><label for="textfield5">Contratante:</label></td>
      <td><strong>Servicios Empresariales del Meta SAS</strong></td>
      <td><label for="textfield4">Nit:</label></td>
      <td><strong>900.985.193-4</strong></td>
    </tr>
  </tbody>
</table>
<table width="800" border="1" align="center">
  <tbody>
    <tr>
      <td width="850"><label for="textfield5">Contrato Numero:</label>
        <strong>5046</strong></td>
    </tr>
  </tbody>
</table>
<table width="800" border="1" align="center">
  <tbody>
    <tr>
      <td width="422" align="center"><strong>ACTUALIZAR LA LISTA  DE USUARIOS CORRESPONDIENTE AL </strong></td>
      <td width="362" align="center"><strong>CONTRATO NUMERO: 5046</strong></td>
    </tr>
    <tr>
      <td align="center"><strong>SUSCRITO ENTRE SERVICIOS  EMPRESARIALES DEL META S.A.S Y TRANSPORTE BUENAVISTA S.A.S</strong></td>
      <td align="center"><strong><p>23/11/2016</p></strong></td>
    </tr>
    <tr>
      <td align="center"><strong> VEHÍCULO DE PLACAS</strong></td>
      <td align="center"><strong>WLL051</strong></td>
    </tr>
    <tr>
      <td align="center"><strong>OPERADO POR EL CONDUCTOR</strong></td>
      <td align="center"><strong>WILLIAM MARTINEZ</strong></td>
    </tr>
  </tbody>
</table>
<table width="800" border="1" align="center">
  <tbody>
    <tr>
      <td width="800" align="center"><p align="center">De acuerdo con el artículo 18 de la resolución 1069 del 23  de abril de 2015, <br>
      Solicito a ustedes se actualice el listado de usuarios  correspondiente al objeto del presente formato.</p></td>
    </tr>
  </tbody>
</table>
<table width="800" border="1" align="center">
  <tbody>
    <tr>
      <td width="422" align="center"><strong>NOMBRES Y APELLIDOS</strong></td>
      <td width="422" align="center"><strong>IDENTIFICACION</strong><br></td>
    </tr>
  </tbody>
</table>
<table width="800" border="1" align="center">
  <tbody>
    <tr> </tr>
    <tr>
      <td><label for="textfield6">.</label>        <input style="border:none" name="textfield6" type="text" id="textfield6" autocomplete="off" size="50"></td>
      <td><label for="textfield7">.</label>        <input style="border:none" name="textfield7" type="text" id="textfield7" size="50"></td>
    </tr>
    <tr>
      <td><label for="textfield8">.</label>        <input style="border:none" name="textfield8" type="text" id="textfield8" size="50"></td>
      <td><label for="textfield9">.</label>        <input style="border:none" name="textfield9" type="text" id="textfield9" size="50"></td>
    </tr>
    <tr>
      <td><label for="textfield8">.</label>
      <input style="border:none" name="textfield2" type="text" id="textfield8" size="50"></td>
      <td><label for="textfield8">.</label>
      <input style="border:none" name="textfield10" type="text" id="textfield8" size="50"></td>
    </tr>
    <tr>
      <td><label for="textfield8">.</label>
      <input style="border:none" name="textfield4" type="text" id="textfield8" size="50"></td>
      <td><label for="textfield8">.</label>
      <input style="border:none" name="textfield11" type="text" id="textfield8" size="50"></td>
    </tr>
  </tbody>
</table>
<table width="800" border="1" align="center">
  <tbody>
    <tr>
      <td width="705" align="center">LA PRESENTE ACTUALIZACIÓN SE REMITE POR MEDIO ELECTRÓNICO A LA EMPRESA CONTRATISTA PARA SER IMPRESA Y ADJUNTADA AL CONTRATO.</td>
      <td align="center" width="139"><!-- #BeginDate format:En2 -->22-Abr-2017<!-- #EndDate --></td>
    </tr>
  </tbody>
</table>
<table width="800" border="1" align="center" cellpadding="0">
  <tbody>
    <tr>
    <td width="51%" align="center"><h4>Calle 11 No. 47C-23 La Esperanza Etapa ll, Villavicencio-Metawww.tsem.com.co- servicios@tsem.com.co serviciosempresarialesdelmeta@gmail.com 350 888 9944 - 0386630252 url: goo.gl/nKkYFI</h4></td>
    <td align="center" width="49%"><img src="imgactual/firma.png" width="293" height="103" alt=""/></td>
    </tr>
  </tbody>
</table>
<table width="800" border="0" align="center">
  <tbody>
    <tr>    </tr>
  </tbody>
</table>
<table width="800" border="0" align="center">
  <tbody>
    <tr>
      <td align="center" valign="top"><p>“La presente Actualización no lleva sellos según Decreto 2150, Art 11 de Diciembre de 1995 y el decreto Ley 019 de Enero de 2012 (Ley Antitramites)</p></td>
    </tr>
  </tbody>
</table>
<table width="800" border="0" align="center">
  <tbody>
    <tr>
      <td align="center"><input type="submit" class="nover" name="submit" id="submit" value="Enviar"></td>
      <td align="center"><input type="reset" class="nover" name="reset" id="reset" value="Restablecer"></td>
      <td align="center"><input type="button" class="nover" name="imprimir" value="GenerarPDF" onclick="window.print();"></td>
    </tr>
  </tbody>
</table>
</body>
</html>

me explicarias lo mas dummy posible como arreglarlo, creeme que te agradecere eternamente
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil
Val: 191
Ha mantenido su posición en PHP (en relación al último mes)
Gráfica de PHP

Html a PDF (No he podido)

Publicado por Brayan (76 intervenciones) el 09/05/2017 22:11:35
El problema radica en que la etiqueta form no esta bien planteada.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar