我正在为发票生成内容,但我需要对齐所有“div”——页眉、正文和页脚。目前我的页眉和正文对齐,但页脚的边距似乎没有对齐,而且我有两个单元格 - 一个左对齐,另一个右对齐。然而,它们没有对齐,而且它们的边距也关闭了。
public function Footer()
{
$this->SetY(-15);
$this->SetFont(PDF_FONT_NAME_MAIN, ' ', 8);
$this->SetFooterMargin(15);
//Get time
$date = date('m/d/Y');
$time = date('H:i:s A');
$this->Cell(0, 0, 'Date: '.date("Y-m-d")." - Time: ".$time , 0, false, 'L');
// Page number
$this->Cell(0, 0, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'R', 0, '', 0, true, 'T', 'M');
}
有什么建议吗?
最佳答案
在页脚函数中,调用这个
$this->SetRightMargin(N); // Where N is the value of the margin spacing you like to achieve
希望对你有帮助
关于php - 页边距和右对齐页脚 tcpdf,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35267411/