Correctly set font for PDF footer (bug #3168749).

This commit is contained in:
Michal Čihař
2011-02-15 19:09:29 +01:00
parent c0b478a5a9
commit 03d347c1a6
2 changed files with 5 additions and 3 deletions

View File

@@ -129,7 +129,8 @@ class PMA_PDF extends TCPDF
if (!isset($this->footerset[$this->page])) {
$this->SetY(-15);
//Page number
$this->Cell(0, 10, __('Page number:') .' '.$this->PageNo() .'/{nb}', 'T', 0, 'C');
$this->setFooterFont(PMA_PDF_FONT, '', 14);
$this->Cell(0, 6, __('Page number:') . ' ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 'T', 0, 'C');
// set footerset
$this->footerset[$this->page] = 1;
@@ -403,6 +404,7 @@ function PMA_exportHeader()
$pdf->AddFont('DejaVuSerif', '', 'dejavuserif.php');
$pdf->AddFont('DejaVuSerif', 'B', 'dejavuserifb.php');
$pdf->SetFont(PMA_PDF_FONT, '', 11.5);
$pdf->setFooterFont(array(PMA_PDF_FONT, '', 11.5));
$pdf->AliasNbPages();
$pdf->Open();

View File

@@ -239,8 +239,7 @@ class PMA_PDF extends TCPDF
if ($with_doc) {
$this->SetY(-15);
$this->SetFont($this->_ff, '', 14);
$this->setFooterFont($this->_ff);
$this->Cell(0, 6, __('Page number:') . ' ' . $this->PageNo() . '/{nb}', 'T', 0, 'C');
$this->Cell(0, 6, __('Page number:') . ' ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 'T', 0, 'C');
$this->Cell(0, 6, PMA_localisedDate(), 0, 1, 'R');
$this->SetY(20);
}
@@ -857,6 +856,7 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema
$pdf->AddFont('DejaVuSerif', '', 'dejavuserif.php');
$pdf->AddFont('DejaVuSerif', 'B', 'dejavuserifb.php');
$pdf->SetFont($this->_ff, '', 14);
$pdf->setFooterFont(array($this->_ff, '', 14));
$pdf->SetAutoPageBreak('auto');
$alltables = $this->getAllTables($db,$this->pageNumber);