]> _ Git - cubeextranet.git/commitdiff
fix #2330 @0.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 6 Nov 2018 10:04:02 +0000 (10:04 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 6 Nov 2018 10:04:02 +0000 (10:04 +0000)
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index 6effff7b4d3d9f40058b200286c2d9d0dee0157b..e2fdf1c6b42e94f595598413994048856793d9c1 100644 (file)
@@ -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';