jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/326451 )
Change subject: Replaced "Article::getContent" deprecated in MediaWiki 1.21
......................................................................
Replaced "Article::getContent" deprecated in MediaWiki 1.21
"Article::getContent" is deprecated - replaced usage
Bug: T151973
Change-Id: I0dc43c8ed8e8cad56f0c5bb96feaefc601a26a11
---
M converters/DomPdfConverter.php
M converters/HtmlDocPdfConverter.php
M converters/MPdfConverter.php
M converters/PrincePdfConverter.php
4 files changed, 214 insertions(+), 211 deletions(-)
Approvals:
Reedy: Looks good to me, approved
jenkins-bot: Verified
diff --git a/converters/DomPdfConverter.php b/converters/DomPdfConverter.php
index c3b9119..1d96381 100755
--- a/converters/DomPdfConverter.php
+++ b/converters/DomPdfConverter.php
@@ -1,183 +1,183 @@
-<?php
-if (!defined('MEDIAWIKI'))
- die();
-
-/**
- * A DomPdf based conversion backend.
- *
- * Installation:
- * DomPdf can be downloaded from here: http://code.google.com/p/dompdf/. Unzip
the code into your
- * extension directory and set $wgPdfExportDomPdfConfigFile equal to the full
path to the
- * dompdf_config.inc.php file.
- *
- * @author Andreas Hagmann
- * @author Dumpydooby
- * @author Christian Neubauer
- */
-class DomPdfConverter extends PdfConverter {
- /**
- * Sets up any necessary command line options.
- * @param Array $options An array of options.
- */
- function initialize (&$options) {
- global $wgPdfExportDomPdfConfigFile;
- // Load the configuration file. This loads the whole DomPdf
framework
- require_once($wgPdfExportDomPdfConfigFile);
- }
-
- /**
- * Output the PDF document.
- * @param Array $pages An array of page names.
- * @param Array $options An array of options.
- */
- function outputPdf ($pages, $options) {
- global $wgUser;
-
- $pagestring = '';
- foreach ($pages as $pg) {
- $pagestring .= $this->getPageHtml($pg, $options);
- }
- # TODO enable support for margins
- $header_footer = <<<SCRIPT
-<script type="text/php">
-if ( isset(\$pdf) ) {
- \$font = Font_Metrics::get_font("Helvetica");
- \$size = 10;
- \$color = array(0,0,0);
- \$text_height = Font_Metrics::get_font_height(\$font, \$size);
-
- \$foot = \$pdf->open_object();
-
- \$w = \$pdf->get_width();
- \$h = \$pdf->get_height();
-
- // Draw a line along the bottom
- \$y = \$h - 2 * \$text_height - 24;
- \$pdf->line(16, \$y, \$w - 16, \$y, \$color, 1);
-
- \$y += \$text_height;
-
- \$text = "";
- \$pdf->text(16, \$y, \$text, \$font, \$size, \$color);
-
- \$pdf->close_object();
- \$pdf->add_object(\$foot, "all");
-
- \$text = "Page {PAGE_NUM}/{PAGE_COUNT}";
-
- \$width = Font_Metrics::get_text_width("Page 10/20", \$font, \$size);
- \$pdf->page_text(\$w-5 - \$width, \$y, \$text, \$font, \$size, \$color);
-
-}
-</script>
-SCRIPT;
-
- $html = $pagestring;
- $html = str_replace( '</body></html>',
$header_footer.'</body></html>', $html );
- $html = str_replace('</head>','<style
type="text/css">body{padding:10px 10px 35px;}</style></head>',$html); // Insert
styling to make room for header/footer.
- $html = str_replace ('<img
src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" />',
"", $html);
-
- // Work around slow PDF generation on large pages.
- if( !ini_get('safe_mode') ) {
- set_time_limit(120);
- }
-
- // TODO disable warnings temporarily and then pipe them to the log.
-
- global $wgOut, $IP, $wgPdfExportAttach;
- $wgOut->disable();
- #$old_error_level = error_reporting( 0 );
- $dompdf = new DOMPDF();
- $dompdf->set_base_path("$IP/");
- $dompdf->set_paper( strtolower( $options['size'] ),
$options['orientation']);
- $dompdf->load_html($html);
- $dompdf->render();
- $perms = array();
- if( $options['pass_protect'] == 'yes' ) {
- if( $options['perm_print'] == 'no' ) {
- $perms[] = 'no-print';
- }
- if( $options['perm_modify'] == 'no' ) {
- $perms[] = 'no-modify';
- }
- if( $options['perm_copy'] == 'no' ) {
- $perms[] = 'no-copy';
- }
- if( $options['perm_annotate'] == 'no' ) {
- $perms[] = 'no-annotate';
- }
- if( count( $perms ) == 0 ) {
-
$dompdf->get_canvas()->get_cpdf()->setEncryption($options['user_pass'],
$options['owner_pass'], array('all'));
- } else {
-
$dompdf->get_canvas()->get_cpdf()->setEncryption($options['user_pass'],
$options['owner_pass'], $perms);
- }
- }
- $dompdf->stream(utf8_decode($options['filename']) . ".pdf",
array('Attachment'=>($wgPdfExportAttach?1:0)));
- #error_reporting( $old_error_level );
- }
-
- /**
- * Get the HTML for a page. This function should filter out any code
that the converter can't handle like <script> tags.
- * @param String $page The page name
- * @param Array $options An array of options.
- */
- function getPageHtml($page, $options) {
- global $wgUser;
- global $wgParser;
- global $wgScriptPath;
- global $wgServer;
- global $wgPdfExportHttpsImages;
- global $wgPdfExportMaxImageWidth;
-
- $title = Title::newFromText( $page );
- if( is_null( $title ) || !$title->userCan( 'read' ) )
- return null;
- $article = new Article ($title);
- $parserOptions = ParserOptions::newFromUser( $wgUser );
- $parserOptions->setEditSection( false );
- $parserOptions->setTidy(true);
- $parserOutput = $wgParser->parse( $article->preSaveTransform(
"__NOTOC__\n\n".$article->getContent() ) ."\n\n", $title, $parserOptions );
-
- $bhtml = $parserOutput->getText();
- // Hack to thread the EUR sign correctly
- $bhtml = str_replace(chr(0xE2) . chr(0x82) . chr(0xAC),
chr(0xA4), $bhtml);
- $bhtml = utf8_decode($bhtml);
-
- // add the '"'. so links pointing to other wikis do not get
erroneously converted.
- $bhtml = str_replace('"'.$wgScriptPath,
'"'.$wgServer.$wgScriptPath, $bhtml);
- $bhtml = str_replace('/w/', $wgServer.'/w/', $bhtml);
-
- // Comment out previous two code lines if wiki is on the root
folder and uncomment the following lines
- // global $wgUploadPath,$wgScript;
- // $bhtml = str_replace ($wgUploadPath,
$wgServer.$wgUploadPath,$bhtml);
- // if (strlen($wgScriptPath)>0)
- // $pathToTitle=$wgScriptPath;
- // else $pathToTitle=$wgScript;
- // $bhtml = str_replace ("href=\"$pathToTitle",
'href="'.$wgServer.$pathToTitle, $bhtml);
-
- // removed heights of images
- $bhtml = preg_replace('/height="\d+"/', '', $bhtml);
- // set upper limit for width
- $bhtml = preg_replace('/width="(\d+)"/e', '"width=\"".($1>
$wgPdfExportMaxImageWidth ? $wgPdfExportMaxImageWidth : $1)."\""', $bhtml);
-
- if ($wgPdfExportHttpsImages) {
- $bhtml = str_replace('img src=\"https:\/\/','img
src=\"http:\/\/', $bhtml);
- }
-
- $css = $this->getPageCss( $page, $options );
- return "<html><head><title>" . utf8_decode($page) .
"</title>$css</head><body>" . $bhtml . "</body></html>";
- }
-
- /**
- * Get any CSS that needs to be added to the page for the PDF tool.
- * @param String $page The page name
- * @param Array $options An array of options.
- */
- function getPageCss($page, $options) {
- global $wgServer, $wgScriptPath;
-
- return '<link rel="stylesheet"
href="'.$wgServer.$wgScriptPath.'/skins/vector/main-ltr.css?207"
type="text/css" media="screen" />'.
- '<link rel="stylesheet"
href="'.$wgServer.$wgScriptPath.'/skins/common/shared.css?207" type="text/css"
media="screen" />'.
- '<link rel="stylesheet"
href="'.$wgServer.$wgScriptPath.'/index.php?title=MediaWiki:Common.css&usemsgcache=yes&ctype=text%2Fcss&smaxage=18000&action=raw&maxage=18000"
type="text/css" media="all" />';
- }
-}
\ No newline at end of file
+<?php
+if (!defined('MEDIAWIKI'))
+ die();
+
+/**
+ * A DomPdf based conversion backend.
+ *
+ * Installation:
+ * DomPdf can be downloaded from here: http://code.google.com/p/dompdf/. Unzip
the code into your
+ * extension directory and set $wgPdfExportDomPdfConfigFile equal to the full
path to the
+ * dompdf_config.inc.php file.
+ *
+ * @author Andreas Hagmann
+ * @author Dumpydooby
+ * @author Christian Neubauer
+ */
+class DomPdfConverter extends PdfConverter {
+ /**
+ * Sets up any necessary command line options.
+ * @param Array $options An array of options.
+ */
+ function initialize (&$options) {
+ global $wgPdfExportDomPdfConfigFile;
+ // Load the configuration file. This loads the whole DomPdf
framework
+ require_once($wgPdfExportDomPdfConfigFile);
+ }
+
+ /**
+ * Output the PDF document.
+ * @param Array $pages An array of page names.
+ * @param Array $options An array of options.
+ */
+ function outputPdf ($pages, $options) {
+ global $wgUser;
+
+ $pagestring = '';
+ foreach ($pages as $pg) {
+ $pagestring .= $this->getPageHtml($pg, $options);
+ }
+ # TODO enable support for margins
+ $header_footer = <<<SCRIPT
+<script type="text/php">
+if ( isset(\$pdf) ) {
+ \$font = Font_Metrics::get_font("Helvetica");
+ \$size = 10;
+ \$color = array(0,0,0);
+ \$text_height = Font_Metrics::get_font_height(\$font, \$size);
+
+ \$foot = \$pdf->open_object();
+
+ \$w = \$pdf->get_width();
+ \$h = \$pdf->get_height();
+
+ // Draw a line along the bottom
+ \$y = \$h - 2 * \$text_height - 24;
+ \$pdf->line(16, \$y, \$w - 16, \$y, \$color, 1);
+
+ \$y += \$text_height;
+
+ \$text = "";
+ \$pdf->text(16, \$y, \$text, \$font, \$size, \$color);
+
+ \$pdf->close_object();
+ \$pdf->add_object(\$foot, "all");
+
+ \$text = "Page {PAGE_NUM}/{PAGE_COUNT}";
+
+ \$width = Font_Metrics::get_text_width("Page 10/20", \$font, \$size);
+ \$pdf->page_text(\$w-5 - \$width, \$y, \$text, \$font, \$size, \$color);
+
+}
+</script>
+SCRIPT;
+
+ $html = $pagestring;
+ $html = str_replace( '</body></html>',
$header_footer.'</body></html>', $html );
+ $html = str_replace('</head>','<style
type="text/css">body{padding:10px 10px 35px;}</style></head>',$html); // Insert
styling to make room for header/footer.
+ $html = str_replace ('<img
src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" />',
"", $html);
+
+ // Work around slow PDF generation on large pages.
+ if( !ini_get('safe_mode') ) {
+ set_time_limit(120);
+ }
+
+ // TODO disable warnings temporarily and then pipe them to the
log.
+ global $wgOut, $IP, $wgPdfExportAttach;
+ $wgOut->disable();
+ #$old_error_level = error_reporting( 0 );
+ $dompdf = new DOMPDF();
+ $dompdf->set_base_path("$IP/");
+ $dompdf->set_paper( strtolower( $options['size'] ),
$options['orientation']);
+ $dompdf->load_html($html);
+ $dompdf->render();
+ $perms = array();
+ if( $options['pass_protect'] == 'yes' ) {
+ if( $options['perm_print'] == 'no' ) {
+ $perms[] = 'no-print';
+ }
+ if( $options['perm_modify'] == 'no' ) {
+ $perms[] = 'no-modify';
+ }
+ if( $options['perm_copy'] == 'no' ) {
+ $perms[] = 'no-copy';
+ }
+ if( $options['perm_annotate'] == 'no' ) {
+ $perms[] = 'no-annotate';
+ }
+ if( count( $perms ) == 0 ) {
+
$dompdf->get_canvas()->get_cpdf()->setEncryption($options['user_pass'],
$options['owner_pass'], array('all'));
+ } else {
+
$dompdf->get_canvas()->get_cpdf()->setEncryption($options['user_pass'],
$options['owner_pass'], $perms);
+ }
+ }
+ $dompdf->stream(utf8_decode($options['filename']) . ".pdf",
array('Attachment'=>($wgPdfExportAttach?1:0)));
+ #error_reporting( $old_error_level );
+ }
+
+ /**
+ * Get the HTML for a page. This function should filter out any code
that the converter can't handle like <script> tags.
+ * @param String $page The page name
+ * @param Array $options An array of options.
+ */
+ function getPageHtml($page, $options) {
+ global $wgUser;
+ global $wgParser;
+ global $wgScriptPath;
+ global $wgServer;
+ global $wgPdfExportHttpsImages;
+ global $wgPdfExportMaxImageWidth;
+
+ $title = Title::newFromText( $page );
+ if( is_null( $title ) || !$title->userCan( 'read' ) )
+ return null;
+ $article = new Article( $title );
+ $content = $article->getContentObject();
+ $parserOptions = ParserOptions::newFromUser( $wgUser );
+ $parserOptions->setEditSection( false );
+ $parserOptions->setTidy(true);
+ $parserOutput = $wgParser->parse( $article->preSaveTransform(
"__NOTOC__\n\n". ContentHandler::getContentText( $content ) ) ."\n\n", $title,
$parserOptions );
+
+ $bhtml = $parserOutput->getText();
+ // Hack to thread the EUR sign correctly
+ $bhtml = str_replace(chr(0xE2) . chr(0x82) . chr(0xAC),
chr(0xA4), $bhtml);
+ $bhtml = utf8_decode($bhtml);
+
+ // add the '"'. so links pointing to other wikis do not get
erroneously converted.
+ $bhtml = str_replace('"'.$wgScriptPath,
'"'.$wgServer.$wgScriptPath, $bhtml);
+ $bhtml = str_replace('/w/', $wgServer.'/w/', $bhtml);
+
+ // Comment out previous two code lines if wiki is on the root
folder and uncomment the following lines
+ // global $wgUploadPath,$wgScript;
+ // $bhtml = str_replace ($wgUploadPath,
$wgServer.$wgUploadPath,$bhtml);
+ // if (strlen($wgScriptPath)>0)
+ // $pathToTitle=$wgScriptPath;
+ // else $pathToTitle=$wgScript;
+ // $bhtml = str_replace ("href=\"$pathToTitle",
'href="'.$wgServer.$pathToTitle, $bhtml);
+
+ // removed heights of images
+ $bhtml = preg_replace('/height="\d+"/', '', $bhtml);
+ // set upper limit for width
+ $bhtml = preg_replace('/width="(\d+)"/e', '"width=\"".($1>
$wgPdfExportMaxImageWidth ? $wgPdfExportMaxImageWidth : $1)."\""', $bhtml);
+
+ if ($wgPdfExportHttpsImages) {
+ $bhtml = str_replace('img src=\"https:\/\/','img
src=\"http:\/\/', $bhtml);
+ }
+
+ $css = $this->getPageCss( $page, $options );
+ return "<html><head><title>" . utf8_decode($page) .
"</title>$css</head><body>" . $bhtml . "</body></html>";
+ }
+
+ /**
+ * Get any CSS that needs to be added to the page for the PDF tool.
+ * @param String $page The page name
+ * @param Array $options An array of options.
+ */
+ function getPageCss($page, $options) {
+ global $wgServer, $wgScriptPath;
+
+ return '<link rel="stylesheet"
href="'.$wgServer.$wgScriptPath.'/skins/vector/main-ltr.css?207"
type="text/css" media="screen" />'.
+ '<link rel="stylesheet"
href="'.$wgServer.$wgScriptPath.'/skins/common/shared.css?207" type="text/css"
media="screen" />'.
+ '<link rel="stylesheet"
href="'.$wgServer.$wgScriptPath.'/index.php?title=MediaWiki:Common.css&usemsgcache=yes&ctype=text%2Fcss&smaxage=18000&action=raw&maxage=18000"
type="text/css" media="all" />';
+ }
+}
diff --git a/converters/HtmlDocPdfConverter.php
b/converters/HtmlDocPdfConverter.php
index c9b5963..9842517 100755
--- a/converters/HtmlDocPdfConverter.php
+++ b/converters/HtmlDocPdfConverter.php
@@ -4,18 +4,18 @@
/**
* An HTMLDoc based conversion backend.
- *
+ *
* Installation:
* HTMLDoc can be downloaded from here: http://www.htmldoc.org/ or on an
Ubuntu based system you can do
* apt-get install htmldoc. Once installed, set $wgPdfExportHtmlDocPath equal
to the full path to the
* htmldoc binary.
- *
+ *
* @author Thomas Hempel
* @author Christian Neubauer
*/
class HtmlDocPdfConverter extends PdfConverter {
/**
- * Sets up any necessary command line options.
+ * Sets up any necessary command line options.
* @param Array $options An array of options.
*/
function initialize (&$options) {
@@ -25,7 +25,7 @@
} else {
$options['orientation'] = " --portrait ";
}
-
+
// Setup permissions
$perms = array();
$options['permissions'] = '';
@@ -47,7 +47,7 @@
} else {
$options['permissions'] .= '--permissions ' .
implode( ',', $perms ) . ' --encryption';
}
-
+
if( $options['owner_pass'] != '' ) {
$options['permissions'] .= ' --owner-password '
. $options['owner_pass'];
}
@@ -144,11 +144,12 @@
if (is_null($title) || !$title->userCan( 'read' )) {
return null;
}
- $article = new Article($title);
+ $article = new Article( $title );
$parserOptions = ParserOptions::newFromUser($wgUser);
$parserOptions->setEditSection(false);
$parserOptions->setTidy(true);
- $parserOutput =
$wgParser->parse($article->preSaveTransform("__NOTOC__\n\n".$article->getContent())."\n\n",
$title, $parserOptions);
+ $content = $article->getContentObject();
+ $parserOutput =
$wgParser->parse($article->preSaveTransform("__NOTOC__\n\n" .
ContentHandler::getContentText( $content ) ) . "\n\n", $title, $parserOptions);
$bhtml = $parserOutput->getText();
// XXX Hack to thread the EUR sign correctly
diff --git a/converters/MPdfConverter.php b/converters/MPdfConverter.php
index e8555bc..b1ab9d9 100755
--- a/converters/MPdfConverter.php
+++ b/converters/MPdfConverter.php
@@ -46,7 +46,7 @@
$mpdf = new mPDF();
$mpdf->WriteHTML($html);
-
+
if( $options['pass_protect'] == 'yes' ) {
if( $options['perm_print'] == 'yes' ) {
$perms[] = 'print';
@@ -102,7 +102,8 @@
$parserOptions = ParserOptions::newFromUser($wgUser);
$parserOptions->setEditSection(false);
$parserOptions->setTidy(true);
- $parserOutput =
$wgParser->parse($article->preSaveTransform("__NOTOC__\n\n".$article->getContent())."\n\n",
$title, $parserOptions);
+ $content = $article->getContentObject();
+ $parserOutput =
$wgParser->parse($article->preSaveTransform("__NOTOC__\n\n".
ContentHandler::getContentText( $content ) ) ."\n\n", $title, $parserOptions);
$bhtml = $parserOutput->getText();
# Note: we don't want to utf8_decode here. mPDF handles UFT-8
characters.
@@ -147,7 +148,7 @@
EOD;
return $html;
}
-
+
/**
* Get any CSS that needs to be added to the page for the PDF tool.
* @param String $page The page name
@@ -155,7 +156,7 @@
*/
function getPageCss($page, $options) {
global $wgServer, $wgScriptPath;
-
+
return '<link rel="stylesheet"
href="'.$wgServer.$wgScriptPath.'/skins/vector/main-ltr.css?207"
type="text/css" media="screen" />'.
'<link rel="stylesheet"
href="'.$wgServer.$wgScriptPath.'/skins/common/shared.css?207" type="text/css"
media="screen" />'.
'<link rel="stylesheet"
href="'.$wgServer.$wgScriptPath.'/index.php?title=MediaWiki:Common.css&usemsgcache=yes&ctype=text%2Fcss&smaxage=18000&action=raw&maxage=18000"
type="text/css" media="all" />';
diff --git a/converters/PrincePdfConverter.php
b/converters/PrincePdfConverter.php
index b859c39..405e7df 100755
--- a/converters/PrincePdfConverter.php
+++ b/converters/PrincePdfConverter.php
@@ -4,11 +4,11 @@
/**
* A PrinceXML based conversion backend.
- *
+ *
* Installation:
* Prince can be downloaded from here: http://www.princexml.com/download/.
* You also need the PHP wrapper from here:
http://www.princexml.com/download/wrappers/.
- *
+ *
* @author Christian Neubauer
*
*/
@@ -21,7 +21,7 @@
global $wgPdfExportPrincePhpInterface;
require_once( $wgPdfExportPrincePhpInterface );
}
-
+
/**
* Ouput the Pdf.
* @param Array $pages An array of page names.
@@ -34,7 +34,7 @@
foreach( $pages as $page ) {
$html = $this->getPageHtml($page, $options);
}
-
+
// TODO handle this error somehow
if (!$html) {
return null;
@@ -47,14 +47,14 @@
wfDebugLog('pdf', "Princexml is not installed
correctly.");
return null;
}
-
+
$error = false;
$prince = new Prince($wgPdfExportPrincePath );
-
+
// TODO Make this configurable
$logfile = getcwd().'/logs/prince_pdf.log';
$prince->setLog($logfile);
-
+
if ($options['pass_protect'] == 'yes') {
$prince->setEncryptInfo(128, $options['user_pass'],
$options['owner_pass'], $options['perm_print'], $options['perm_modify'],
$options['perm_copy'], $options['perm_annotate']);
}
@@ -81,7 +81,7 @@
echo $pdf;
}
}
-
+
/**
* Get the HTML for a page. This function should filter out any code
that the converter can't handle like <script> tags.
* @param String $page The page name
@@ -91,7 +91,7 @@
global $wgUser;
global $wgParser;
global $wgScriptPath;
- global $wgServer;
+ global $wgServer;
global $wgPdfExportHttpsImages;
global $wgRawHtml;
global $wgPdfExportMaxImageWidth;
@@ -101,17 +101,18 @@
// @TODO throw error
return null;
}
-
+
if( !$title->userCan( 'read' ) ) {
// @TODO throw error
return null;
}
-
+
$article = new Article($title);
$parserOptions = ParserOptions::newFromUser( $wgUser );
$parserOptions->setEditSection( false );
$parserOptions->setTidy(true);
- $parserOutput = $wgParser->parse( $article->preSaveTransform(
"__NOTOC__\n\n".$article->getContent() ) ."\n\n", $title, $parserOptions );
+ $content = $article->getContentObject();
+ $parserOutput = $wgParser->parse( $article->preSaveTransform(
"__NOTOC__\n\n". ContentHandler::getContentText( $content ) ) ."\n\n", $title,
$parserOptions );
$bhtml = $parserOutput->getText();
// Hack to thread the EUR sign correctly
@@ -121,7 +122,7 @@
// add the '"'. so links pointing to other wikis do not get
erroneously converted.
$bhtml = str_replace ('"'.$wgScriptPath, '"'.$wgServer .
$wgScriptPath, $bhtml);
$bhtml = str_replace ('/w/',$wgServer . '/w/', $bhtml);
-
+
// remove scripts
$bhtml = preg_replace('/<script[^>]*?>.*?><\/script>/is', '$1',
$bhtml);
@@ -129,11 +130,11 @@
$bhtml = preg_replace ('/height="\d+"/', '', $bhtml);
// set upper limit for width
$bhtml = preg_replace ('/width="(\d+)"/e', '"width=\"".($1>
$wgPdfExportMaxImageWidth ? $wgPdfExportMaxImageWidth : $1)."\""', $bhtml);
-
+
if ($wgPdfExportHttpsImages) {
$bhtml = str_replace('img src=\"https:\/\/','img
src=\"http:\/\/', $bhtml);
}
-
+
$css = $this->getPageCss( $page, $options );
$page = utf8_decode( $page );
$html = <<<EOD
@@ -152,7 +153,7 @@
return $html;
}
-
+
/**
* Get any CSS that needs to be added to the page for the PDF tool.
* @param String $page The page name
@@ -176,7 +177,7 @@
$marginsides = $options['marginsides'];
// $bottom_css represents specific CSS for PDF conversion only,
will not effect the html
// may need to change left & right margins to 2.54cm if
converting PDF to a Word Document
-
+
// TODO fix font family to use value in options
$bottom_css = <<<EOD
@page {
--
To view, visit https://gerrit.wikimedia.org/r/326451
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0dc43c8ed8e8cad56f0c5bb96feaefc601a26a11
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/PdfExport
Gerrit-Branch: master
Gerrit-Owner: Filip <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits