DOMPDF (2.0.0) PNG Image loading issue . PHP version 8.0.17 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: DOMPDF (2.0.0) PNG Image loading issue . PHP version 8.0.17 (/showthread.php?tid=82481) |
DOMPDF (2.0.0) PNG Image loading issue . PHP version 8.0.17 - devBee - 07-15-2022 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> RE: DOMPDF (2.0.0) PNG Image loading issue . PHP version 8.0.17 - seunex - 07-15-2022 This is Codeigniter 4 forum head to DONODF GitHub to submit issues. RE: DOMPDF (2.0.0) PNG Image loading issue . PHP version 8.0.17 - kenjis - 07-16-2022 DOMPDF needs huge memory. All you can do is to increase the memory for PHP. |