i have installed dompdf v 5.0.1 with codeigniter v 1.7.3
like http://codeigniter.com/wiki/PDF_generation_using_dompdf
it was working great all of a sudden i am getting that my pdf is either corrupt
or damaged.
cannot see whats wrong here?
my code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
function pdf_create($html, $filename='', $stream=TRUE)
{
include("dompdf/dompdf_config.inc.php");
spl_autoload_register('DOMPDF_autoload');
$dompdf = new DOMPDF();
$html="d";
$dompdf->load_html($html);
$dompdf->render();
if ($stream) {
$dompdf->stream($filename.".pdf");
} else {
return $dompdf->output();
}
}
controller:
function pdf()
{
$this->load->helper(array('dompdf','file'));
$template = $this->dwootemplate->display ( 'pages/nieuws.tpl', true );
pdf_create($template, 'filename');
}
version 6 is working but i based my program on v 5.0.1 would be most gratefull
if someone could help me here
my output looks like :
%PDF-1.3
%‚„œ”
1 0 obj
<< /Type /Catalog
/Outlines 2 0 R
/Pages 3 0 R
/OpenAction 8 0 R >>
endobj
2 0 obj
<< /Type /Outlines /Count 0 >>
endobj
3 0 obj
<< /Type /Pages
/Kids [6 0 R
]
/Count 1
/Resources <<
/ProcSet 4 0 R
/Font <<
/F1 9 0 R >>
>>
/MediaBox [0,000 0,000 612,000 792,000]
>>
endobj
4 0 obj
[/PDF /Text ]
endobj
5 0 obj
<<
/Creator (DOMPDF Converter)
/CreationDate (2012-02-07)
>>
endobj
6 0 obj
<< /Type /Page
/Parent 3 0 R
/Contents 7 0 R
>>
endobj
7 0 obj
<< /Filter /FlateDecode
/Length 58 >>
stream
xú„2–100P@&ã“πúB,¿ls333Öê}7CC#Öê4çMÖê,◊
Original issue reported on code.google.com by pfzw...@gmail.com on 7 Feb 2012 at 7:07
Original issue reported on code.google.com by
pfzw...@gmail.com
on 7 Feb 2012 at 7:07Attachments: