I'm using ezpdf class to generate pdf reports from my system. I need to create a header and footer into every page of the report.
I have changed the code of class.ezpdf.php specifically the ezNewPage() method, adding a function named ezAddHeader() and it works fine.
Here is the code of the new method:
Expand|Select|Wrap|Line Numbers
- function ezAddHeader()
- {
- $image = imagecreatefrompng("image.png");
- $this->addImage($image,560,520,200,75);
- $this->ezText(" \n\n\n\n\n",10);
- $this->ezText('"Header" ',10,array('justification' => 'right'));
- $this->ezText('Doc No. 1 ',10,array('justification' => 'right'));
- $this->ezText('Page No. '.$this->ezGetCurrentPageNumber().' ',10,array('justification' => 'right'));
- }
Someone can tell me what should I change in the method so it show the header or maybe another solution?