Location: PHPKode > projects > Punchout! Timecard System > punchout_r13/fpdf153/doc/aliasnbpages.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<TITLE>AliasNbPages</TITLE>
<LINK TYPE="text/css" REL="stylesheet" HREF="../fpdf.css">
</HEAD>
<BODY>
<H2>AliasNbPages</H2>
<TT>AliasNbPages([<B>string</B> alias])</TT>
<H4 CLASS='st'>Version</H4>
1.4
<H4 CLASS='st'>Description</H4>
Defines an alias for the total number of pages. It will be substituted as the document is
closed.
<H4 CLASS='st'>Parameters</H4>
<TT><U>alias</U></TT>
<BLOCKQUOTE>
The alias. Default value: <TT>{nb}</TT>.
</BLOCKQUOTE>
<H4 CLASS='st'>Example</H4>
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
<TT>
class PDF extends FPDF<BR>
{<BR>
function Footer()<BR>
{<BR>
&nbsp;&nbsp;&nbsp;&nbsp;//Go to 1.5 cm from bottom<BR>
&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;SetY(-15);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;//Select Arial italic 8<BR>
&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;SetFont('Arial','I',8);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;//Print current and total page numbers<BR>
&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;Cell(0,10,'Page '.$this-&gt;PageNo().'/{nb}',0,0,'C');<BR>
}<BR>
}<BR>
<BR>
$pdf=new PDF();<BR>
$pdf-&gt;AliasNbPages();
</TT>
</TD></TR></TABLE><BR>
<H4 CLASS='st'>See also</H4>
<A HREF="pageno.htm">PageNo()</A>,
<A HREF="footer.htm">Footer()</A>.
<HR STYLE="margin-top:1.2em">
<DIV ALIGN="CENTER"><A HREF="index.htm">Index</A></DIV>
</BODY>
</HTML>
Return current item: Punchout! Timecard System