From: vincent@cubedesigners.com Date: Tue, 18 Jul 2017 17:04:11 +0000 (+0000) Subject: fix #1562 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=a4e32a14fd746653dc397041b85c6be973986abb;p=cubeextranet.git fix #1562 @1 --- diff --git a/inc/ws/Controlleur/class.ws.maintenance.php b/inc/ws/Controlleur/class.ws.maintenance.php index 6c27049aa..1294645a0 100644 --- a/inc/ws/Controlleur/class.ws.maintenance.php +++ b/inc/ws/Controlleur/class.ws.maintenance.php @@ -1290,5 +1290,12 @@ class wsMaintenance { exit; } + public function testSVG() { + $test = '/home/extranet/www/fluidbook/docs/115864/html/test.svg'; + copy('/home/extranet/www/fluidbook/docs/115864/html/tp1.svg', $test); + wsDocument::cleanSVG($test,true); + } } + + diff --git a/inc/ws/Metier/class.ws.document.php b/inc/ws/Metier/class.ws.document.php index fe44d5038..b032c1ed9 100644 --- a/inc/ws/Metier/class.ws.document.php +++ b/inc/ws/Metier/class.ws.document.php @@ -613,23 +613,14 @@ class wsDocument extends cubeMetier { $pdftocairo->setArg(null, $svgFile); $pdftocairo->execute(); $this->addToLog($pdftocairo, true, $page); - $this->_cleanSVG($svgFile, $page); - - $svgFile = $this->out . '/html/m' . $page . '.svg'; - - $mupdf = new CubeIT_CommandLine('mutool'); - $mupdf->setPath(CONVERTER_PATH); - $mupdf->setArg(null, 'draw'); - $mupdf->setArg('F', 'svg'); - - + copy($svgFile, $this->out . '/html/tp' . $page . '.svg'); $this->_cleanSVG($svgFile, $page); } - public static function cleanSVG($svgFile) { + public static function cleanSVG($svgFile,$debug=false) { $svg = new DOMDocument(); $svg->preserveWhiteSpace = false; - $svg->load($svgFile); + $svg->load($svgFile,LIBXML_PARSEHUGE); // Operations to delete $xpath = new DOMXPath($svg);