AliasNbPages

AliasNbPages([string alias])

版本

1.4

內容

為每一頁定義一個別名。每一頁會由這個別名代替。

參數

alias
alias(別名)。 預設別名為:{nb}.

例子

class PDF extends FPDF
{
function Footer()
{
    //Go to 1.5 cm from bottom
    $this->SetY(-15);
    //Select Arial italic 8
    $this->SetFont('Arial','I',8);
    //Print current and total page numbers
    $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
}
}

$pdf=new PDF();
$pdf->AliasNbPages();

參見

PageNo(), Footer().

索引