From f460ca4f4bbdccffb06076164438e5a2b5971401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Ra=C3=B1a?= Date: Tue, 27 Jul 2010 13:59:04 +0200 Subject: [PATCH] fix headers and footers when we export to pdf from wiki --- main/wiki/export_mpdf.php | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/main/wiki/export_mpdf.php b/main/wiki/export_mpdf.php index 4cab7c5712..727f476a3f 100755 --- a/main/wiki/export_mpdf.php +++ b/main/wiki/export_mpdf.php @@ -18,20 +18,23 @@ require_once _MPDF_PATH.'mpdf.php'; $content_pdf = api_html_entity_decode($_POST['contentPDF'], ENT_QUOTES, api_get_system_encoding()); $title_pdf = api_html_entity_decode($_POST['titlePDF'], ENT_QUOTES, api_get_system_encoding()); -$html = ' - - -{TITLE_PDF}

-
-{CONTENT_PDF} - -
-
-
-'; - -$html = api_utf8_encode(str_replace(array('{TITLE_PDF}', '{CONTENT_PDF}'), array($title_pdf, $content_pdf), $html), api_get_system_encoding()); $title_pdf = api_utf8_encode($title_pdf, api_get_system_encoding()); +$content_pdf = api_utf8_encode($content_pdf, api_get_system_encoding()); + +$html=' + + + +'.$content_pdf; + $css_file = api_get_path(TO_SYS, WEB_CSS_PATH).api_get_setting('stylesheets').'/print.css'; if (file_exists($css_file)) { @@ -40,7 +43,7 @@ if (file_exists($css_file)) { $css = ''; } -$pdf = new mPDF('UTF-8', 'A4', '', '', 32, 25, 27, 25, 16, 13, 'P'); +$pdf = new mPDF('UTF-8', 'A4', '', '', 30, 20, 27, 25, 16, 13, 'P'); $pdf->directionality = api_get_text_direction();