删除tcpdf中除页码以外的底线


removing bottom line in tcpdf except page number

我使用TCPDF生成PDF文件。我想删除底线,为此我使用$pdf->SetPrintFooter(false);,它正在工作,但在底线之后,它显示的页码像1/1一样,现在我只想删除除页码之外的底线。TCPDF中对此有其他选择吗。

创建对象后,您需要调用以下命令:

$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);

如果我理解的话,你想要这个或类似的东西->http://www.tcpdf.org/examples/example_003.pdf

代码在这里->http://www.tcpdf.org/examples/example_003.phps

我隔离了你需要的代码

// Page footer
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');
}

如果您在询问之前在此处搜索有关TCPDF的内容