[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/phpgwapi/inc/fpdf/tutorial/ -> tuto2.php (source)

   1  <?php
   2  define('FPDF_FONTPATH','../font/');
   3  require ('../fpdf.php');
   4  
   5  class PDF extends FPDF
   6  {
   7  //Page header
   8  function Header()
   9  {
  10      //Logo
  11      $this->Image('logo_pb.png',10,8,33);
  12      //Arial bold 15
  13      $this->SetFont('Arial','B',15);
  14      //Move to the right
  15      $this->Cell(80);
  16      //Title
  17      $this->Cell(30,10,'Title',1,0,'C');
  18      //Line break
  19      $this->Ln(20);
  20  }
  21  
  22  //Page footer
  23  function Footer()
  24  {
  25      //Position at 1.5 cm from bottom
  26      $this->SetY(-15);
  27      //Arial italic 8
  28      $this->SetFont('Arial','I',8);
  29      //Page number
  30      $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
  31  }
  32  }
  33  
  34  //Instanciation of inherited class
  35  $pdf=new PDF();
  36  $pdf->AliasNbPages();
  37  $pdf->AddPage();
  38  $pdf->SetFont('Times','',12);
  39  for($i=1;$i<=40;$i++)
  40      $pdf->Cell(0,10,'Printing line number '.$i,0,1);
  41  $pdf->Output();
  42  ?>


Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7