From: vincent@cubedesigners.com Date: Fri, 7 Sep 2018 16:23:46 +0000 (+0000) Subject: fix #2221 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7ce905a41ece89d39af9184fecd11019cfa8ed66;p=cubeextranet.git fix #2221 @1 --- diff --git a/inc/ws/Metier/class.ws.document.php b/inc/ws/Metier/class.ws.document.php index 82e82e3f1..daeb57853 100644 --- a/inc/ws/Metier/class.ws.document.php +++ b/inc/ws/Metier/class.ws.document.php @@ -653,6 +653,10 @@ class wsDocument extends cubeMetier public function makeSVGFile($page) { $svgFile = $this->out . '/html/fp' . $page . '.svg'; + $source = $this->cropped; + if (!file_exists($this->cropped)) { + $source = $this->in; + } $pdftocairo = new cubeCommandLine('pdftocairo'); $pdftocairo->setPath(CONVERTER_PATH); @@ -661,15 +665,16 @@ class wsDocument extends cubeMetier $pdftocairo->setArg('r', 300); $pdftocairo->setArg(null, '-expand'); $pdftocairo->setArg(null, '-svg'); - $pdftocairo->setArg(null, $this->cropped); + $pdftocairo->setArg(null, $source); $pdftocairo->setArg(null, $svgFile); $pdftocairo->execute(); + $this->addToLog($pdftocairo, true, $page); } public static function extractTexts($svgFile, $textFile, $force = false) { - $do = $force || !file_exists($textFile) || filemtime($svgFile) > filemtime($textFile) || filemtime($textFile) < filemtime(__FILE__); + $do = $force || !file_exists($textFile) || filesize($textFile) < 100 || filemtime($svgFile) > filemtime($textFile) || filemtime($textFile) < filemtime(__FILE__); if (!$do) { return; } diff --git a/inc/ws/Util/html5/master/class.ws.html5.links.php b/inc/ws/Util/html5/master/class.ws.html5.links.php index 5974acf99..a8cd43807 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -1083,7 +1083,7 @@ class htmlMultimediaLink extends wsHTML5Link $iw = $this->_config['width']; $ih = $this->_config['height']; - $ld = ''; + $ld = ' '; if (isset($this->_config['lowDef'])) { $ld = ' data-ld="' . str_replace('index.html', $this->_config['lowDef'], $this->_url) . '" '; }