<?php
require
(
'fpdf.php'
);
class
PDF
extends
FPDF
{
function
Header()
{
$this
->Image(
'geeks.png'
, 30, 8, 20);
$this
->Image(
'geeks.png'
, 160, 8, 20);
$this
->SetFont(
'Times'
,
'B'
,20);
$this
->Cell(80);
$this
->Cell(30, 20,
'Welcome to GeeksforGeeks'
, 0, 2,
'C'
);
$this
->Ln(5);
}
function
Footer()
{
$this
->SetY(-15);
$this
->SetFont(
'Arial'
,
'I'
, 8);
$this
->Cell(0, 10,
'Page '
.
$this
->PageNo() .
'/{nb}'
, 0, 0,
'C'
);
}
}
$pdf
=
new
PDF();
$pdf
->AliasNbPages();
$pdf
->AddPage();
$pdf
->SetFont(
'Times'
,
''
,12);
for
(
$i
= 0;
$i
< 50;
$i
++)
$pdf
->Cell(30, 10,
'Line Number '
.
$i
, 0, 2,
'L'
);
$pdf
->Output();
?>