CodeIgniter Forums
fail to load image in cezpdf codeigniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: fail to load image in cezpdf codeigniter (/thread-53002.html)



fail to load image in cezpdf codeigniter - El Forum - 07-06-2012

[eluser]beben[/eluser]
this is my code in controller

Code:
function exportPDF()
{
    $this->load->library('cezpdf');
    $this->load->helper('pdf');
    $this->cezpdf->cezpdf('a4','portrait');
    $data['unit_kerja']= $this->admin_model->getUnitKerjaPDF();
    $titlecolumn = array(
                        'id_indeks' => 'Nomor Indeks',
                        'nama_unit' => 'Nama Unit Kerja'
    );
    $this->cezpdf->ezTable($data['unit_kerja'],$titlecolumn,'Master Unit Kerja');
    $image=base_url().'images/bps.png';
    $this->cezpdf->ezImage($image);
    $this->cezpdf->ezSetMargins(50,50,50,50);
    $this->cezpdf->addText(50,32,8,'Printed on ' . date('m/d/Y h:i:s a'). ' copyright cmail system BPS');
    $this->cezpdf->ezStream();
}

when i called the controller,, the data is show well,, but i can't load the image... thank you...


fail to load image in cezpdf codeigniter - El Forum - 07-06-2012

[eluser]InsiteFX[/eluser]
Did you load the url_helper? It is needed to use base_url() etc.



fail to load image in cezpdf codeigniter - El Forum - 07-06-2012

[eluser]beben[/eluser]
sure... i've load it in autoload.... i don't know where is my mistake,, i've tried to solved it.. but nothing change.. Sad