Ver Mensaje Individual
  #13 (permalink)  
Antiguo 17/10/2008, 05:55
kigoshi
 
Fecha de Ingreso: octubre-2008
Mensajes: 2
Antigüedad: 15 años, 6 meses
Puntos: 0
Respuesta: Dompdf. Problemas para generar archivos de HTML a PDF

He intentado hacerlo con

pdf_create($html, $filename, $stream=TRUE);

haciendo antes un require al archivo to_pdf_pi.php y otros html cargados y no me va tampoco.


Y utilizando el propio ejemplo que enconté por una página

<?php
require_once("dompdf_config.inc.php");

$html =
'<html><body>'.
'<p>Put your html here, or generate it with your favourite '.
'templating system.</p>'.
'</body></html>';

$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("sample.pdf");

?>
Obtengo este error:
Warning: domdocument::domdocument() expects at least 1 parameter, 0 given in C:\wamp\www\dompdf\include\dompdf.cls.php on line 165

Fatal error: Call to undefined method domdocument::loadHTML() in C:\wamp\www\dompdf\include\dompdf.cls.php on line 284

Muchas gracias