From: vincent@cubedesigners.com Date: Tue, 6 Nov 2018 10:04:02 +0000 (+0000) Subject: fix #2330 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=3aa91bcaf007731d5a79f57e23ef5244cbd87831;p=cubeextranet.git fix #2330 @0.5 --- diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index 6effff7b4..e2fdf1c6b 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -1382,10 +1382,17 @@ class wsHTML5Compiler break; } + $rasterizePages = $this->config->rasterizePages; + $thumbs = array(); foreach ($this->pages as $page => $infos) { $docdir = wsDocument::getDir($infos['document_id']); - if ($this->svg) { + + $thisrasterize = in_array($page, $rasterizePages); + $thisimagesvg = !$thisrasterize && $this->svg; + $thisbackgroundPrefix = $thisrasterize ? ['t'] : $this->backgroundsPrefix; + + if ($thisimagesvg) { $full = $docdir . 'html/fp' . $infos['document_page'] . '.svg'; $fullopt = $docdir . 'html/fo' . $infos['document_page'] . '%s.svg'; $orig = $docdir . 'html/tp' . $infos['document_page'] . '.svg'; @@ -1409,9 +1416,8 @@ class wsHTML5Compiler } } - foreach ($this->getResolutions() as $r) { - foreach ($this->backgroundsPrefix as $backgroundsPrefix) { + foreach ($thisbackgroundPrefix as $backgroundsPrefix) { $srcPrefix = $backgroundsPrefix; if ($backgroundsPrefix == 'p') { $srcPrefix = 'h';