|
|
|
|
@ -622,67 +622,16 @@ class PDF |
|
|
|
|
*/ |
|
|
|
|
public function set_footer() |
|
|
|
|
{ |
|
|
|
|
$this->pdf->defaultfooterfontsize = 12; // in pts |
|
|
|
|
$this->pdf->defaultfooterfontstyle = 'B'; // blank, B, I, or BI |
|
|
|
|
$this->pdf->defaultfooterline = 1; // 1 to include line below header/above footer |
|
|
|
|
$platform_name = api_get_setting('Institution'); |
|
|
|
|
$left_content = $platform_name; |
|
|
|
|
$center_content = ''; |
|
|
|
|
$right_content = '{PAGENO} / {nb}'; |
|
|
|
|
|
|
|
|
|
//@todo remove this and use a simpler way |
|
|
|
|
$footer = array( |
|
|
|
|
'odd' => array( |
|
|
|
|
'L' => array( |
|
|
|
|
'content' => $left_content, |
|
|
|
|
'font-size' => 10, |
|
|
|
|
'font-style' => 'B', |
|
|
|
|
'font-family' => 'serif', |
|
|
|
|
'color' => '#000000' |
|
|
|
|
), |
|
|
|
|
'C' => array( |
|
|
|
|
'content' => $center_content, |
|
|
|
|
'font-size' => 10, |
|
|
|
|
'font-style' => 'B', |
|
|
|
|
'font-family' => 'serif', |
|
|
|
|
'color' => '#000000' |
|
|
|
|
), |
|
|
|
|
'R' => array( |
|
|
|
|
'content' => $right_content, |
|
|
|
|
'font-size' => 10, |
|
|
|
|
'font-style' => 'B', |
|
|
|
|
'font-family' => 'serif', |
|
|
|
|
'color' => '#000000' |
|
|
|
|
), |
|
|
|
|
'line' => 1, |
|
|
|
|
), |
|
|
|
|
'even' => array( |
|
|
|
|
'L' => array( |
|
|
|
|
'content' => $left_content, |
|
|
|
|
'font-size' => 10, |
|
|
|
|
'font-style' => 'B', |
|
|
|
|
'font-family' => 'serif', |
|
|
|
|
'color' => '#000000' |
|
|
|
|
), |
|
|
|
|
'C' => array( |
|
|
|
|
'content' => $center_content, |
|
|
|
|
'font-size' => 10, |
|
|
|
|
'font-style' => 'B', |
|
|
|
|
'font-family' => 'serif', |
|
|
|
|
'color' => '#000000' |
|
|
|
|
), |
|
|
|
|
'R' => array( |
|
|
|
|
'content' => $right_content, |
|
|
|
|
'font-size' => 10, |
|
|
|
|
'font-style' => 'B', |
|
|
|
|
'font-family' => 'serif', |
|
|
|
|
'color' => '#000000' |
|
|
|
|
), |
|
|
|
|
'line' => 1, |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
// defines footer for Odd and Even Pages - placed at Outer margin see http://mpdf1.com/manual/index.php?tid=151&searchstring=setfooter |
|
|
|
|
$this->pdf->SetFooter($footer); |
|
|
|
|
$this->pdf->defaultfooterfontsize = 12; // in pts |
|
|
|
|
$this->pdf->defaultfooterfontstyle = 'B'; // blank, B, I, or BI |
|
|
|
|
$this->pdf->defaultfooterline = 1; // 1 to include line below header/above footer |
|
|
|
|
|
|
|
|
|
$view = new Template('', false, false, false, true, false, false); |
|
|
|
|
$template = $view->get_template('export/pdf_footer.tpl'); |
|
|
|
|
$footerHTML = $view->fetch($template); |
|
|
|
|
|
|
|
|
|
$this->pdf->SetHTMLFooter($footerHTML, 'E'); //Even pages |
|
|
|
|
$this->pdf->SetHTMLFooter($footerHTML, 'O'); //Odd pages |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|