 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
ermes
Joined: 20 Jun 2006 Posts: 2 Location: italy
|
Posted: Tue Jan 15, 2008 12:33 pm Post subject: problem with File_pdf |
|
|
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', ;
// Print centered page number
$this->cell(0, 10, 'Page ' . $this->getPageNo(), 0, 0, 'C');
}
} _________________ Ermes Beretta |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|