如何在tcpdf中仅显示第二页的页数?
如何居中显示页数?
我用这个班
private $customFooterText = "";
/**
* @param string $customFooterText
*/
public function setCustomFooterText($customFooterText)
{
$this->customFooterText = $customFooterText;
}
public function Footer()
{
// Linha 1
$this->SetY(-16);
$this->SetFont('helvetica', 'I', 8);
$this->Cell(0, 10, $this->customFooterText, 0, false, 'C', 0, '', 0, false, 'T', 'M');
// Números de página
$this->Cell(0, 10, 'Pag '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
}
非常感谢!
答案 0 :(得分:0)
我明白了!
$pageN = TCPDF::PageNo();
if($pageN == 1){
//if page is 1... don't print anything
return;
}else{
$this->Cell(0, 10, $this->getAliasNumPage(), 0, false, 'C', 0, '', 0, false, 'T', 'M');