PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » File Formats » File_PDF » Bug #9272

header() and footer() methodes

Details

Submitted2006-11-08 14:49 UTC
Fromt dot asi at gmx dot net
StatusNo Feedback
PackageFile_PDF
PHP Version5.0.0
OSlinux
Roadmaps(Not assigned)

Comments

[2006-11-08 14:49 UTC] t dot asi at gmx dot net

Description:
------------
i installed the latest 0.10 version and i have the same problem again. No footer and header are display, only when i add the information inside the original class, not in my extended .

Like bug #1543

Tim

[2006-12-01 03:14 UTC] webmaster at lasdunaschahue dot com dot mx

<?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();
?>

[2006-12-02 06:04 UTC] chagenbu at php dot net

I get the right class name if I use factory() and a subclass. Can the original poster please explain their problem, or the other commenter show their problem code?