summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-02-01 21:35:16 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-02-01 21:35:16 -0500
commit064cec79ca4c8201de0d06bbca6cb7a5345d11be (patch)
tree1d2221b7d5fe2744d82d1241a736a9d9b0666ded /extensions
parent5744df39e15f85c6cc8a9faf8924d77e76d2b216 (diff)
parent1b65fa2a5f4c48b02ceda934e9c1aee2d03ce453 (diff)
Merge branch 'archwiki'
Diffstat (limited to 'extensions')
-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" );