]> _ Git - cubeextranet.git/commitdiff
fix #1562 @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 18 Jul 2017 17:04:11 +0000 (17:04 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 18 Jul 2017 17:04:11 +0000 (17:04 +0000)
inc/ws/Controlleur/class.ws.maintenance.php
inc/ws/Metier/class.ws.document.php

index 6c27049aa4ef03223113398388e4ccf270f2f90d..1294645a0961118ea43094c0f8c8f7a487b8e355 100644 (file)
@@ -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);
+       }
 
 }
+
+
index fe44d5038e6d2ca5cb758e2347f019ecc556384a..b032c1ed9f7bb46dff7e04110c7eb6ace2770cdc 100644 (file)
@@ -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);