]> _ Git - cubeextranet.git/commitdiff
#1584
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 17 Jan 2018 17:25:26 +0000 (17:25 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 17 Jan 2018 17:25:26 +0000 (17:25 +0000)
inc/ws/Metier/class.ws.document.php
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index 8dde71763886a484caec5c287f287113df6476fe..2560509a9978aeef363b086d372d0a0339b39dac 100644 (file)
@@ -598,6 +598,8 @@ class wsDocument extends cubeMetier {
                $pdftocairo->setPath(CONVERTER_PATH);
                $pdftocairo->setArg('f', $page);
                $pdftocairo->setArg('l', $page);
+               $pdftocairo->setArg('r', 300);
+               $pdftocairo->setArg(null, '-expand');
                $pdftocairo->setArg(null, '-svg');
                $pdftocairo->setArg(null, $this->cropped);
                $pdftocairo->setArg(null, $svgFile);
index 0d15cdb48acca18d9169b831ba69077fc3e928ef..30aa9412bf24fb3404cf15d18d98420f08d725eb 100644 (file)
@@ -230,7 +230,7 @@ class wsHTML5Compiler {
                $this->cssOneWidth = $this->width * $this->cssOneScale;
                $this->cssOneHeight = $this->height * $this->cssOneScale;
 
-               $this->cssSVGScale = 0.75 / 2;
+               $this->cssSVGScale = 1;
 
                $this->scale = 1;
                if ($this->book->parametres->zoomMode == 1) {
@@ -1333,25 +1333,17 @@ class wsHTML5Compiler {
                $lessVariables['page-transition-duration'] = $this->book->parametres->mobileTransitionDuration . 's';
 
 
-               $res[] = '.background{' . wsHTML5::writeCSSUA('transform-origin', 'top left') . ';}';
-               foreach ($this->getResolutions() as $r) {
-                       $ratio = round(72 / $r, 3) * $cssScale;
+               $res[] = '.background{width:100%;height:100%}';
 
-                       $wr = $cssWidth / $ratio;
-                       $hr = $cssHeight / $ratio;
-
-                       $br = '.background.r' . $r . '{';
-                       if ($ratio != 1) {
-                               $br .= wsHTML5::writeCSSUA('transform', 'scale(' . $ratio . ')') . ';';
-                       }
-                       $br .= 'width:' . $wr . 'px;height:' . $hr . 'px;}';
-                       $res[] = $br;
-               }
-               $texts = '.texts{' . wsHTML5::writeCSSUA('transform-origin', 'top left') . ';';
-               $texts .= wsHTML5::writeCSSUA('transform', 'scale(' . round((1 / $this->multiply) * $cssScale * $this->cssSVGScale, 3) . ')') . ';';
-               $texts .= 'width:' . ($wm / $this->cssSVGScale) . 'px; max-width:' . ($wm / $this->cssSVGScale) . 'px;';
-               $texts .= 'height:' . ($hm / $this->cssSVGScale) . 'px; max-height:' . ($hm / $this->cssSVGScale) . 'px;';
-               $texts .= '}';
+               if ($this->cssSVGScale != 1) {
+                       $texts = '.texts{' . wsHTML5::writeCSSUA('transform-origin', 'top left') . ';';
+                       $texts .= wsHTML5::writeCSSUA('transform', 'scale(' . round((1 / $this->multiply) * $cssScale * $this->cssSVGScale, 3) . ')') . ';';
+                       $texts .= 'width:' . ($wm / $this->cssSVGScale) . 'px; max-width:' . ($wm / $this->cssSVGScale) . 'px;';
+                       $texts .= 'height:' . ($hm / $this->cssSVGScale) . 'px; max-height:' . ($hm / $this->cssSVGScale) . 'px;';
+                       $texts .= '}';
+               } else {
+                       $texts = '.texts{width:' . floor(($wm / $this->cssSVGScale) + 4) . 'px;height:' . floor(($hm / $this->cssSVGScale) + 4) . 'px;}';
+               }
                $res[] = $texts;
 
                // Theme