EDIT: solved by updating PHP to the latest version
With dompdf I’m getting an error on which I can’t find much additional info. I know it’s a longshot, but perhaps someone around here can help me with this problem.
Warning: domdocument::domdocument() expects at least 1 parameter, 0 given in dompdf.cls.php on line 165
Fatal error: Call to undefined method domdocument::loadHTML() in dompdf.cls.php on line 284
I thought I missed the appropriate .DLL, but phpinfo() says this:
dom
DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.6.11
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled
domxml
DOM/XML enabled
DOM/XML API Version 20030407
libxml Version 20611
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Last but not least the piece of script I testted Dompdf with:
<?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");
?>