root / docs / www / colonyscout / internal / pdf.php @ f59acf11
History | View | Annotate | Download (866 Bytes)
1 |
<?php
|
---|---|
2 |
require('includes/fpdf.php'); |
3 |
?>
|
4 |
|
5 |
<?php
|
6 |
|
7 |
class PDF extends FPDF |
8 |
{ |
9 |
//Page header
|
10 |
function Header() |
11 |
{ |
12 |
//Logo
|
13 |
$this->Image('F:/wamp/www/internal/images/scout_logo_internal.gif',10,8,33); |
14 |
//Arial bold 15
|
15 |
$this->SetFont('Arial','B',15); |
16 |
//Move to the right
|
17 |
$this->Cell(80); |
18 |
//Title
|
19 |
$this->Cell(60,10,'Inventory - 10-26-2010',0,'C'); |
20 |
//Line break
|
21 |
$this->Ln(20); |
22 |
} |
23 |
|
24 |
//Page footer
|
25 |
function Footer() |
26 |
{ |
27 |
//Position at 1.5 cm from bottom
|
28 |
$this->SetY(-15); |
29 |
//Arial italic 8
|
30 |
$this->SetFont('Arial','I',8); |
31 |
//Page number
|
32 |
$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C'); |
33 |
} |
34 |
} |
35 |
|
36 |
//Instanciation of inherited class
|
37 |
$pdf=new PDF('L','mm','A4'); |
38 |
$pdf->AliasNbPages(); |
39 |
$pdf->AddPage(); |
40 |
$pdf->SetFont('Times','',12); |
41 |
for($i=1;$i<=40;$i++) |
42 |
$pdf->Cell(0,10,'Printing line number '.$i,0,1); |
43 |
$pdf->Output(); |
44 |
?>
|