Extending fpdf class problem

111 views
Skip to first unread message

Felix mwai

unread,
May 24, 2012, 4:55:22 AM5/24/12
to codeigni...@googlegroups.com
Hi Guys,
I have a slight problem extending fpdf class in codeigniter, i am using class fpdf to generate reports and would like to create my headers on every page. This is how my code looks like

//class fpdf in folder libraries

class FPDF{
    function header()
     {
     //to be extended at the point of creating the pdf
    }
}

//controller
class reports extends CI_Controller{

   function pdfreports(){

   $this->load->library('fpdf');
    $fpdf=new FPDF();
    //header
    //i want to extend the fpdf class here and put my own header as it should be in plain php like below
        /*

         class fdf extends FPDF{
             function header(){
             //put the header here

            }
        */
      }
     //end header
   
   }

}



Reply all
Reply to author
Forward
0 new messages