I'm trying to implement the DOMPDF library on a worpdress page. The page has a custom template so I'm putting this code there:
<?php /**
/*
* Template name: Prova
*/
get_header();
require_once (get_template_directory() . '/dompdf/dompdf_config.inc.php');
$dompdf = new DOMPDF();
$html =
'<html><body>'.
'<p>Put your html here, or generate it with your favourite '.
'templating system.</p>'.
'</body></html>';
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("sample.pdf");
get_footer();
?>
The page loads correctly and I can see the header and the footer of the template, but dompdf doesn't appear to work, as no pdf are generated. The path is correct. No error messages are shown. Am I missing something?
Thanks