Hey all,
I am having an issue with DOMPDF image loading. I tried all the way to load the image but it won't work on my local / server.
When I try with the full URL it is returning an "Allowed memory size" error.
Please help me if you have an idea of how to resolve this issue.
I really appreciate any help you can provide.
My Controller,
#Contract file name
$this->response->removeHeader('Content-Type');
#$this->dompdf->set_base_path($bp);
#return view($this->path_views . 'contract', $data);
#viewpage data
$this->dompdf->loadHtml(view($this->path_views . 'contract', $data));
$this->dompdf->set_option('isRemoteEnabled', TRUE);
$this->dompdf->set_option('defaultMediaType', 'all');
$this->dompdf->set_option('isFontSubsettingEnabled', true);
$this->dompdf->set_option('isPhpEnabled', true);
$this->dompdf->setPaper('A4','portrait');
$this->dompdf->render();
#$pdf = $this->dompdf->output();
#file_put_contents("contract", $pdf);
$this->dompdf->stream( $contract, array("Attachment" => false));
#Constractor
$options = new Options();
#$options->set('defaultFont', 'Courier');
$options->set('defaultFont', 'Helvetica');
$options->set('isRemoteEnabled', TRUE);
$options->set('isHtml5ParserEnabled', true);
$this->dompdf = new Dompdf($options);
#View
<table width="100%">
<tr>
<td width="20%"> <img src="../../../logo.png" /></td>
<td class="title" width="60%">
</td>
<td></td>
</tr>
</table>