I have a problem with DOMPDF integration into Wordpress.
Here are the steps done:
- Installed DOMPDF 0.6.1 into the themedir/dompdf/
- Created path /dompdf/lib/php-font-lib/classes where php lib is to be imported
- Imported the "FontLib" folder contents (version 0.4) into the /dompdf/lib/php-font-lib/classes
Here is the code:
require_once(echo get_template_directory_uri()."/dompdf/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(echo get_template_directory_uri()."/dompdf/testpdf.pdf");
Outputs nothing, I have also tried stream("testpdf.pdf"); as the last line but no success.
Any ideas? Thank you.