PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
problem with File_pdf

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> File Formats
View previous topic :: View next topic  
Author Message
ermes



Joined: 20 Jun 2006
Posts: 2
Location: italy

PostPosted: Tue Jan 15, 2008 12:33 pm    Post subject: problem with File_pdf Reply with quote

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', Cool;
// Print centered page number
$this->cell(0, 10, 'Page ' . $this->getPageNo(), 0, 0, 'C');
}
}
_________________
Ermes Beretta
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> File Formats All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software