1 | <HTML>
|
---|
2 | <HEAD>
|
---|
3 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
|
---|
4 | <TITLE>AliasNbPages</TITLE>
|
---|
5 | <LINK TYPE="text/css" REL="stylesheet" HREF="../fpdf.css">
|
---|
6 | </HEAD>
|
---|
7 | <BODY>
|
---|
8 | <H2>AliasNbPages</H2>
|
---|
9 | <TT>AliasNbPages([<B>string</B> alias])</TT>
|
---|
10 | <H4 CLASS='st'>Version</H4>
|
---|
11 | 1.4
|
---|
12 | <H4 CLASS='st'>Description</H4>
|
---|
13 | Defines an alias for the total number of pages. It will be substituted as the document is
|
---|
14 | closed.
|
---|
15 | <H4 CLASS='st'>Parameters</H4>
|
---|
16 | <TT><U>alias</U></TT>
|
---|
17 | <BLOCKQUOTE>
|
---|
18 | The alias. Default value: <TT>{nb}</TT>.
|
---|
19 | </BLOCKQUOTE>
|
---|
20 | <H4 CLASS='st'>Example</H4>
|
---|
21 | <TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
---|
22 | <TT>
|
---|
23 | class PDF extends FPDF<BR>
|
---|
24 | {<BR>
|
---|
25 | function Footer()<BR>
|
---|
26 | {<BR>
|
---|
27 | //Go to 1.5 cm from bottom<BR>
|
---|
28 | $this->SetY(-15);<BR>
|
---|
29 | //Select Arial italic 8<BR>
|
---|
30 | $this->SetFont('Arial','I',8);<BR>
|
---|
31 | //Print current and total page numbers<BR>
|
---|
32 | $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');<BR>
|
---|
33 | }<BR>
|
---|
34 | }<BR>
|
---|
35 | <BR>
|
---|
36 | $pdf=new PDF();<BR>
|
---|
37 | $pdf->AliasNbPages();
|
---|
38 | </TT>
|
---|
39 | </TD></TR></TABLE><BR>
|
---|
40 | <H4 CLASS='st'>See also</H4>
|
---|
41 | <A HREF="pageno.htm">PageNo()</A>,
|
---|
42 | <A HREF="footer.htm">Footer()</A>.
|
---|
43 | <H6></H6>
|
---|
44 | <HR>
|
---|
45 | <DIV ALIGN="CENTER"><A HREF="index.htm">Index</A></DIV>
|
---|
46 | </BODY>
|
---|
47 | </HTML>
|
---|