Ver Mensaje Individual
  #8 (permalink)  
Antiguo 09/07/2013, 18:46
angieyalver
 
Fecha de Ingreso: enero-2013
Mensajes: 87
Antigüedad: 11 años, 4 meses
Puntos: 0
Respuesta: problemas al crear pdf

hola a todos ya solucione y me muestra las imagenes estes es el codigo con lo que genero
Código PHP:
Ver original
  1. <?php
  2. ?>
  3. <?php
  4. $table .="<div style='top:182;width:700;height:400;position:absolute;left:7;'><div style='position:absolute;left:145;top:17'><img src='pero.jpg' width='400' height='300'/></div>";
  5. $table .="<div style='position: absolute;top: -177;left: 9;width: 700;height: 170'><img src='Banner1.jpg' width='600' height='110' />";
  6. $table .="<div style='position:absolute;left: 258;top: 80;width: 472;height: 88;'>Nombre Usuario:";
  7. $table .="<br>Cargo</div>";
  8. $table .="</div>";
  9. $table .="<div style='top:103;position:absolute;left: 30;width: 617'>
  10. Podemos aplicar transparencia a las imágenes de esta forma. Firefox usa la propiedad opacity:x para la transparencia, mientras que IE usa filter:alpha(opacity=x). La sintáxis CSS3 para la transparencia es opacity:x.
  11. No hay que olvidar que:
  12. En Firefox (opacity:x) x puede tener un valor desde 0.0 hasta 1.0. Un valor más bajo hará el elemento más transparente.
  13. En IE (Internet Explorer) sería así: (filter:alpha(opacity=x)) x puede ser un valor de 0 a 100. Un valor más bajo hará el elemento más transparente.
  14. - See more at: http://www.cssblog.es/ejemplos-con-la-transparencia-css/#sthash.4pkKHWkZ.dpuf</div>";
  15. $table .="<div style='position:absolute;top:405;left:20;width:600;height:40'><img src='Banner2.jpg' width='600' height='29' /></div>";
  16. $table .="</div>";
  17.  
  18. print $table;
  19. require_once("dompdf/dompdf_config.inc.php");
  20. $dompdf = new DOMPDF();
  21. $dompdf->load_html(ob_get_clean());
  22. $dompdf->render();
  23. $pdf = $dompdf->output();
  24. $filename =date("d-m-Y_H_i_s").'.pdf';
  25. file_put_contents($filename, $pdf);
  26. $dompdf->stream($filename);
  27.  
  28. ?>
el problema ahora es que no me le aplica el css , como puedo hacer para que me tome el css lo hize asi
Código CSS:
Ver original
  1. <style type="text/css">
  2. .banner-principal{
  3.     background:url(Banner3.jpg)no-repeat center;
  4.     background-size:400px 300px;
  5.     top:182px;
  6.     width:700px;
  7.     height:400px;
  8.     position:absolute;
  9.     left: 7px;
  10. }
  11. .pricipal{
  12.     top:103px;
  13.     text-align:center;
  14.     position:absolute;
  15.     left: 30px;
  16.     width: 617px;
  17. }
  18. .banner1{
  19.     background: url(Banner1.jpg)no-repeat center;
  20.     background-size: 600px 110px;
  21.     position: absolute;
  22.     top: -177px;
  23.     left: 9px;
  24.     width: 700px;
  25.     height: 170px;
  26. }
  27. .usuario{
  28.     position:absolute;
  29.     left: 258px;
  30.     top: 80px;
  31.     width: 472px;
  32.     color:#FFFFFF;
  33.     font-size:24px;
  34.     font-family:Arial, Helvetica, sans-serif;
  35.     height: 88px;
  36. }
  37. .pie-pagina{
  38.     background: url(Banner2.jpg)no-repeat;
  39.     background-size: 600px 30px;
  40.     position: absolute;
  41.     top: 405px;
  42.     left: 30px;
  43.     width: 600px;
  44.     height: 40px;
  45. }
  46. </style>
llamando las clases donde las necesito pero tampoco me funciono, no se que hacer, me pueden ayudar