|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
File_pdf problem
I tried to redefine the functions header() and footer() in a simply new class but my new class print empty header and footer.
Are there any options to set ? excuse for my bad english. ermes my code ------------------------------------------------- class stampe_quest extends File_PDF { private $db; private $pdf; function __construct() { $this -> pdf = &File_PDF::factory(array('orientation' => 'P', 'format' => 'A4')); $this -> pdf -> open(); $this -> pdf -> setCompression(true); $this -> pdf -> addPage(); ... ... $this -> pdf -> setDisplayMode('fullpage','single'); $this -> pdf -> close(); $this -> pdf -> output("xxxxx.pdf", false); } function header() { // Select Arial bold 15 $this->setFont('Arial', 'B', 15); // Move to the right $this->cell(80); // Framed title $this->cell(30, 10, 'Title', 1, 0, 'C'); // Line break $this->newLine(20); } function footer() { // Go to 1.5 cm from bottom $this->setY(-15); // Select Arial italic 8 $this->setFont('Arial', 'I', 8); // Print centered page number $this->cell(0, 10, 'Page ' . $this->getPageNo(), 0, 0, 'C'); } } |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PEAR Packages > File_pdf problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|