php class tcpdf。删除底线,页面上方为

时间:2016-10-11 12:45:15

标签: php tcpdf

我使用 tcpdf 类来创建 pdf 文档。

然后我有一个方法$pdf->SetFooterMargin(15);,它在数字上方插入数字页面和黑线。

我想删除这一行。我怎么能这样做。

1 个答案:

答案 0 :(得分:1)

看看这个example。页面编号上方没有行,这是页脚的功能

public function Footer() {
    // Position at 15 mm from bottom
    $this->SetY(-15);
    // Set font
    $this->SetFont('helvetica', 'I', 8);
    // Page number
    $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
}

编辑:就像这样做

public function Footer() {
    // Position at 15 mm from bottom
    $this->SetY(-15);
    // Set font
    $this->SetFont('helvetica', 'I', 8);
    // Page number
    $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
} 
$pdf = new DeltaPD ....
...
...