DOM PDF renders on mac but not PC
set_magic_quotes_runtime
is not used anymore in dompdf 0.6. I suggest you to download the latest version (0.6 beta 3) or to remove the set_magic_quotes_runtime
call in lib/class.pdf.php
.
It is a warning thrown by PHP because this function is deprecated.
Some wiki usage information
require_once("dompdf_config.inc.php");$html_to_string = $this->load->view('', array(), true);$dompdf = new DOMPDF();$dompdf->load_html($html_to_string);force_download('sample.pdf', file_get_contents($dompdf->render()));
-
Instead of force download you could use
$dompdf->stream("sample.pdf");
I've seen posts about similar issues (I had a bunch of issues with DOMPDF), it sounds like there is other text in the output stream that's causing specifically Acrobat to reject the PDF as corrupt.
Try adding setlocale(LC_NUMERIC, "C"); before you call DomPDFTake a look at this thread for more info: http://code.google.com/p/dompdf/issues/detail?id=418