|
@@ -1351,17 +1351,15 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // Show page nb only on iso languages (so default Helvetica font)
|
|
|
- $pdf->SetXY($dims['wk'] - $dims['rm'] - 18 - getDolGlobalInt('PDF_FOOTER_PAGE_NUMBER_X', 0), -$posy - getDolGlobalInt('PDF_FOOTER_PAGE_NUMBER_Y', 0));
|
|
|
|
|
|
- if (getDolGlobalString('PDF_USE_GETALIASNBPAGE_FOR_TOTAL')) {
|
|
|
- // $pagination = $pdf->getAliasNumPage().' / '.$pdf->getAliasNbPages(); // works with $pdf->Cell
|
|
|
- $pagination = $pdf->PageNo().' / '.$pdf->getAliasNbPages(); // seems to not works with all fonts like ru_UK
|
|
|
- } else {
|
|
|
- $pagination = $pdf->PageNo().' / '.$pdf->getNumPages(); // seems to always work even with $pdf->Cell. But some users has reported wrong nb (no way to reproduce)
|
|
|
+ // Show page nb and apply correction for some font.
|
|
|
+ $pdf->SetXY($dims['wk'] - $dims['rm'] - 18 - getDolGlobalInt('PDF_FOOTER_PAGE_NUMBER_X', 0), -$posy - getDolGlobalInt('PDF_FOOTER_PAGE_NUMBER_Y', 0));
|
|
|
+ $pagination = $pdf->PageNo().' / '.$pdf->getAliasNbPages();
|
|
|
+ $fontRenderCorrection = 0;
|
|
|
+ if (in_array(pdf_getPDFFont($outputlangs), array('freemono', 'DejaVuSans'))) {
|
|
|
+ $fontRenderCorrection = 10;
|
|
|
}
|
|
|
-
|
|
|
- $pdf->MultiCell(18, 2, $pagination, 0, 'R', 0);
|
|
|
+ $pdf->MultiCell(18 + $fontRenderCorrection, 2, $pagination, 0, 'R', 0);
|
|
|
|
|
|
// Show Draft Watermark
|
|
|
if (!empty($watermark)) {
|