Hi
I am using dompdf as pdf generator. Everything works great on the live server except that its downloading the pdf with the wrong content type (text/html) as supposed to application/pdf. That causes issues with Safari appending the wrong extension (pdf.html).
However setup works great locally with the proper content-type being used.
I set the template to allow php, parse on output. Here is the template code:
<?php
require_once("assets/dompdf/dompdf_config.inc.php");
$html = '
<html>
<head>
<style>
</style>
</head>
{exp:channel:entries status="completed|pending" channel="certificate" entry_id="{last_segment}"}
<body>
some html
</body>
{/exp:channel:entries}
</html>';
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("sampledoc.pdf");
exit();
?>If I save the template as file it sets the content type right but breaks in google chrome.
I am using ExpressionEngine v2.2.2 - Build: date 20110801
on apache 2 server with dompdf 0.6
Cheers