From 81be4d9c52b09652258db7d3b549d9f655be26bc Mon Sep 17 00:00:00 2001 From: Carsten Rose <carsten.rose@math.uzh.ch> Date: Fri, 16 Feb 2018 11:05:21 +0100 Subject: [PATCH] Notes how to optimize PDF thumbnailing --- extension/qfq/qfq/report/Thumbnail.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extension/qfq/qfq/report/Thumbnail.php b/extension/qfq/qfq/report/Thumbnail.php index 19d8d59e4..973f9ab4e 100644 --- a/extension/qfq/qfq/report/Thumbnail.php +++ b/extension/qfq/qfq/report/Thumbnail.php @@ -169,9 +169,11 @@ class Thumbnail { $ext = strtolower(OnString::strrstr($pathFilenameSource, '.')); // SVG files are best to thumbnail via 'inkscape' - if ($ext == 'svg' && $this->inkscape != '') { +// if ( ($ext == 'svg' || $ext == 'pdf') && $this->inkscape != '') { + if (($ext == 'svg') && $this->inkscape != '') { $inkscapeDimension = Token::explodeDimension($dimension); // Automatically cut white border: --export-area-drawing + // --export-text-to-path $cmdInkscape = $this->inkscape . " --without-gui $inkscapeDimension --export-png $pathFilenameThumbnail $pathFilenameSource"; $outputInkscape = Support::qfqExec($cmdInkscape, $rc); if ($rc == 0) { -- GitLab