tuto2.php

Go to the documentation of this file.
00001 <?php
00002 require('../fpdf.php');
00003 
00004 class PDF extends FPDF
00005 {
00006 //Page header
00007 function Header()
00008 {
00009     //Logo
00010     $this->Image('logo_pb.png',10,8,33);
00011     //Arial bold 15
00012     $this->SetFont('Arial','B',15);
00013     //Move to the right
00014     $this->Cell(80);
00015     //Title
00016     $this->Cell(30,10,'Title',1,0,'C');
00017     //Line break
00018     $this->Ln(20);
00019 }
00020 
00021 //Page footer
00022 function Footer()
00023 {
00024     //Position at 1.5 cm from bottom
00025     $this->SetY(-15);
00026     //Arial italic 8
00027     $this->SetFont('Arial','I',8);
00028     //Page number
00029     $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
00030 }
00031 }
00032 
00033 //Instanciation of inherited class
00034 $pdf=new PDF();
00035 $pdf->AliasNbPages();
00036 $pdf->AddPage();
00037 $pdf->SetFont('Times','',12);
00038 for($i=1;$i<=40;$i++)
00039     $pdf->Cell(0,10,'Printing line number '.$i,0,1);
00040 $pdf->Output();
00041 ?>
 All Data Structures Files Functions Variables Enumerations