]> wagnertech.de Git - timetracker.git/blobdiff - topdf.php
Removed PHP closing tag
[timetracker.git] / topdf.php
index 744ef4a2a5907aa41effced4aaa76221b9b3da03..d1c954e901ce123cd1ca27b466fdd72e6e3f0a20 100644 (file)
--- a/topdf.php
+++ b/topdf.php
@@ -309,6 +309,9 @@ if ($totals_only) {
   $html .= '</tr>';
   $html .= '</table>';
 }
+
+// Output footer.
+$html .= '<p style="text-align: center;">'.$i18n->getKey('form.mail.footer').'</p>';
 // By this time we have html ready.
 
 // Determine title for report.
@@ -354,7 +357,7 @@ class MyyPDF extends TCPDF {
     // Position at 15 mm from bottom.
     $this->SetY(-15);
     // Set font.
-    $this->SetFont('helvetica', 'I', 8);
+    $this->SetFont('freeserif', 'I', 8);
     // Print localized page number.
     $this->Cell(0, 10, $this->page_word.' '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
   }
@@ -369,8 +372,6 @@ if (file_exists('images/'.$user->team_id.'.png'))
 
 // Set page word for the footer.
 $pdf->SetPageWord($i18n->getKey('label.page'));
-// TODO: currently, we have problems rendering PDF in some languages such as Russian (headers, page word).
-// Not sure how to fix it... One option is to switch to mPDF - consider.
 
 // Set document information.
 $pdf->SetCreator(PDF_CREATOR);
@@ -393,8 +394,8 @@ $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
 // Add a page.
 $pdf->AddPage();
 
-// Set font.
-$pdf->SetFont('helvetica', '', 10);
+// Set font (freeserif seems to work for all languages).
+$pdf->SetFont('freeserif', '', 10); // helvetica here does not work for Russian.
 
 // Write HTML.
 $pdf->writeHTML($html, true, false, false, false, '');