summaryrefslogtreecommitdiff
path: root/extensions/PdfHandler
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-01-29 20:39:08 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-01-29 20:39:08 +0100
commit1b65fa2a5f4c48b02ceda934e9c1aee2d03ce453 (patch)
treee9bb7fa7d4aa7d815810ea807556e49c3a00adf7 /extensions/PdfHandler
parent224b22a051051f6c2e494c3a2fb4adb42898e2d1 (diff)
Update to MediaWiki 1.22.2
Diffstat (limited to 'extensions/PdfHandler')
-rw-r--r--extensions/PdfHandler/PdfHandler_body.php29
1 files changed, 22 insertions, 7 deletions
diff --git a/extensions/PdfHandler/PdfHandler_body.php b/extensions/PdfHandler/PdfHandler_body.php
index 8fa6719b..d9ed4884 100644
--- a/extensions/PdfHandler/PdfHandler_body.php
+++ b/extensions/PdfHandler/PdfHandler_body.php
@@ -167,13 +167,28 @@ class PdfHandler extends ImageHandler {
$srcPath = $image->getLocalRefPath();
- $cmd = '(' . wfEscapeShellArg( $wgPdfProcessor );
- $cmd .= " -sDEVICE=jpeg -sOutputFile=- -dFirstPage={$page} -dLastPage={$page}";
- $cmd .= " -r{$wgPdfHandlerDpi} -dBATCH -dNOPAUSE -q ". wfEscapeShellArg( $srcPath );
- $cmd .= " | " . wfEscapeShellArg( $wgPdfPostProcessor );
- $cmd .= " -depth 8 -resize {$width} - ";
- $cmd .= wfEscapeShellArg( $dstPath ) . ")";
- $cmd .= " 2>&1";
+ $cmd = '(' . wfEscapeShellArg(
+ $wgPdfProcessor,
+ "-sDEVICE=jpeg",
+ "-sOutputFile=-",
+ "-dFirstPage={$page}",
+ "-dLastPage={$page}",
+ "-r{$wgPdfHandlerDpi}",
+ "-dBATCH",
+ "-dNOPAUSE",
+ "-q",
+ $srcPath
+ );
+ $cmd .= " | " . wfEscapeShellArg(
+ $wgPdfPostProcessor,
+ "-depth",
+ "8",
+ "-resize",
+ $width,
+ "-",
+ $dstPath
+ );
+ $cmd .= ") 2>&1";
wfProfileIn( 'PdfHandler' );
wfDebug( __METHOD__ . ": $cmd\n" );