Revision 7655,
768 bytes
checked in by douglasz, 12 years ago
(diff) |
Ticket #3236 - Melhorias de performance no codigo do Expresso.
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
|
Line | |
---|
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 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.