Welcome Guest, Not a member yet? Register   Sign In
dompdf, multiple images problem
#2

[eluser]_krc_[/eluser]
Ok I see nobody have no idea about the problem.. I can give some more details now, the 'corrupted file..' error is showing only under windows (my pc, win7) but in case of linux (server) it's working fine.
I can show You a code example, maybe someone had similar problem and knows the deal..
Code:
$this->load->plugin('to_pdf');
$base_url = base_url();

$html = <<<LABELS
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
&lt;html &gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;style&gt;
table {
  margin-top: 2em;
  font-size: 0.8em;
  border-collapse: collapse;
  border-spacing: 0pt;
  width: 100%;
}
div { width: 570px; height: 570px; background-image: url({$base_url}/assets/image/labels/{$data['type']}/{$data['image']}) }

&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
<img src="{$base_url}/assets/image/labels/{$data['type']}/{$data['image']}" />
<img src="{$base_url}/assets/image/labels/{$data['type']}/{$data['image']}" />
&lt;/body&gt;
&lt;/html&gt;
LABELS;
pdf_create($html, 'report');

Please, ny help will be appreciated..


Messages In This Thread
dompdf, multiple images problem - by El Forum - 11-17-2009, 04:59 PM
dompdf, multiple images problem - by El Forum - 11-23-2009, 08:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB