Ver Mensaje Individual
  #10 (permalink)  
Antiguo 27/03/2009, 05:56
utopiko
 
Fecha de Ingreso: marzo-2006
Mensajes: 230
Antigüedad: 18 años, 2 meses
Puntos: 2
Respuesta: Utilizacion CPDf y DOMPDF

Sigo a vueltas con esto...Pero releyendo vuestras respuestas he intentado algo que me deciais o eso entendia yo...

He aqui mi Script para colocar una imagen en un pdf...

Código PHP:
<?php
require_once("inc/domPDF/dompdf_config.inc.php");
require_once (
"inc/conexion.inc.php");
require_once (
"inc/funciones.inc.php");

$html =
    
'<html>
    
    <head><script type="text/php">
        if ( isset($pdf) ){
            $width=$pdf->get_width();
            $height=$pdf->get_height();
            
            $pdf->image("imgpdf/fondo.jpg","jpg",0,0,'
.$width.','.$height.');
        } 
        </script>
    </head>
    <body>'
.
    
'<p>Hello World!</p>'.
    
'</body></html>';

$dompdf = new DOMPDF();
$dompdf->load_html($html);

$dompdf->render();
$dompdf->stream("hello_world.pdf");

?>