Footer in PDF

Footer in PDF


Posted in : PHP Posted on : January 14, 2011 at 1:28 PM Comments : [ 0 ]

This section contains the detail about the Footer in PDF.

Footer in PDF

In this tutorial you will learn how to generate Header in PDF in a PHP web application. The new instance of FPDF class, initial functions (header, footer) are empty you can extend the class and add your own functionality by overriding them. FPDF allows you to add footer into your file.

            The code of  'footer.php' given below :   

<?php
require('fpdf16/fpdf.php');

class Example extends FPDF
{
function Footer()
{
$this->SetFont('Arial','B',16);
$this->SetY(-190);
$this->Cell(0,10,'Footer',1,0,'C');
$this->Ln(20);
}
}

$pdf=new Example();
$pdf->AddPage();
$pdf->SetFont('Times','B',10);
$pdf->Cell(0,10,'Hello World!',0,1,'C');

$pdf->Output();
?>

In this tutorial create new instance of Example class that extends FPDF class and override Footer() function .Footer() set font and create one cell with content . In this tutorial create new instance of Example class that extends FPDF class and override Footer() function .

Output :

Download Source Code

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics