1
我試圖居中頁腳文本TCPDF中心的文字並不完全在中心
function Footer(){
$txt = 'Page %s of %s';
if (empty($this->pagegroups)) {
$txt = sprintf($txt, $this->getAliasNumPage(), $this->getAliasNbPages());
} else {
$txt = sprintf($txt, $this->getPageNumGroupAlias(), $this->getPageGroupAlias());
}
$this->MultiCell(0, 0, $txt, 1, 'C', false, 1, PDF_MARGIN_LEFT, $this->y);
}
,你可以在小區得到正確定位的圖片中看到,問題是居中的文本。
我得到同樣的結果,如果我改變該多的東西更直截了當:
$this->SetXY(PDF_MARGIN_LEFT, $this->y);
$this->Cell(0, 0, $txt, 1, 1, 'C');
重複: http://stackoverflow.com/questions/5485295/tcpdf-pagenumbers-not-exactly-right-aligned – user2345998