Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.3.3

Bug #1543 header() and footer() methodes
Submitted: 2004-06-02 13:40 UTC
From: pear at humbapa dot ch Assigned: yunosh
Status: Closed Package: File_PDF
PHP Version: Irrelevant OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 37 + 8 = ?

 
 [2004-06-02 13:40 UTC] pear at humbapa dot ch
Description: ------------ I'm trying to use the header() and footer() methodes but somehow it does not work as expected: class mypdf extends File_PDF { function header() { $this->line(20, 18, 168, 18); } } $pdf = mypdf::factory("P", "mm", "A4"); but like this my header-methode will never be called I think it has something to do with the factory-methode in the class File_PDF: function &factory($orientation = 'P', $unit = 'mm', $format = 'A4') { ...SKIP... /* Create the PDF object. */ $pdf = &new File_PDF(); ...SKIP... return $pdf; } I'm not so familiar with classes and objects, but doesn't this methode return an instance of the File_PDF-class and not an instance of my new mypdf-class? thanks! martin luethi

Comments

 [2004-07-11 22:06 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-12-07 21:50 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-01-20 00:24 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-03-04 12:31 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2006-12-01 03:16 UTC] webmaster at lasdunaschahue dot com dot mx (Jorge Guzmán)
<?php require_once("File/PDF.php"); class Boleta extends File_PDF { function footer() { $this -> text(10.75, -0.5, 'Pagina '. $this -> getPageNo().' de {nb}'); } function header() { $this -> line(0, 0.5, 21.5, 0.5); } } $dim_pag = array(21.5, 14); $pdf = &File_PDF::factory(array('orientation'=>'P','unit'=>'cm', 'format'=>$dim_pag), ('Boleta')); $pdf -> open(); $pdf -> addpage(); $pdf->setFont('Arial','',7); $pdf -> image('Oax1.jpg', 1, 1, 2, 2, 'jpg'); $pdf -> image('Mon1.jpg', 19.5, 1, 1.2, 2, 'jpg'); $pdf -> image('Con1.jpg', 9.15, 12, 0, 0, 'jpg'); $yradcp1 = 0.6; for($i=0; $i<=10;$i++){ $pdf -> circle(0.6, $yradcp1, 0.25, 'D'); $pdf -> circle(20.9, $yradcp1, 0.25, 'D'); $yradcp1 += 1.25; } $pdf -> line(1.2, 0, 1.2, 14); $pdf -> line(20.2, 0, 20.2, 14); for($i=0; $i<=14; $i++){ $pdf -> text(0, $i, '_'.$i); } $texto = "Texto de Prueba para ejecutar el multiCell y generar varias páginas"; for($i=0; $i<=25;$i++){ $pdf -> multiCell(5, 0.3, $texto, 1, 'J', 0); } $pdf -> setDisplayMode('fullpage'); $pdf -> output('ejemplo.pdf'); //$pdf -> save('PDF/ejemplo.pdf'); $pdf -> close(); ?>