From: vincent@cubedesigners.com Date: Tue, 21 Jul 2020 17:49:36 +0000 (+0000) Subject: wip #3807 @2.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7c1cb110c766478cf9d6e63a51dcfe3ac3de3974;p=cubeextranet.git wip #3807 @2.5 --- diff --git a/fluidbook/tools/fwstk/.idea/misc.xml b/fluidbook/tools/fwstk/.idea/misc.xml index 91ce3bc21..4aff69c56 100644 --- a/fluidbook/tools/fwstk/.idea/misc.xml +++ b/fluidbook/tools/fwstk/.idea/misc.xml @@ -3,13 +3,6 @@ - - - diff --git a/fluidbook/tools/fwstk/.idea/workspace.xml b/fluidbook/tools/fwstk/.idea/workspace.xml index 01c13350e..00ef263db 100644 --- a/fluidbook/tools/fwstk/.idea/workspace.xml +++ b/fluidbook/tools/fwstk/.idea/workspace.xml @@ -7,27 +7,10 @@ - - - - - - - - - - + - - - - - - - - - + - - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fluidbook/tools/fwstk/out/artifacts/fwstk_jar/fwstk.jar b/fluidbook/tools/fwstk/out/artifacts/fwstk_jar/fwstk.jar index 9111447a0..e77b60ace 100644 Binary files a/fluidbook/tools/fwstk/out/artifacts/fwstk_jar/fwstk.jar and b/fluidbook/tools/fwstk/out/artifacts/fwstk_jar/fwstk.jar differ diff --git a/inc/ws/Metier/class.ws.document.php b/inc/ws/Metier/class.ws.document.php index f4e69dc2d..e30cd1b71 100644 --- a/inc/ws/Metier/class.ws.document.php +++ b/inc/ws/Metier/class.ws.document.php @@ -338,10 +338,26 @@ class wsDocument extends cubeMetier $pdftk->setPath(CONVERTER_PATH); $pdftk->setArg(null, $this->getCroppedPDF()); $pdftk->setArg(null, 'burst'); + $pdftk->setArg(null, 'uncompress'); $pdftk->setArg(null, 'output'); $pdftk->setArg(null, $this->out . 'pdf/p%d.pdf'); $pdftk->execute(); $this->addToLog($pdftk); + + for ($i = 1; $i <= $this->getPagesNumber(); $i++) { + // Remove annotations : https://gist.github.com/stefanschmidt/5248592 + $file = sprintf($this->out . 'pdf/p%d.pdf', $i); + $to = sprintf($this->out . 'pdf/s%d.pdf', $i); + `LANG=C LC_CTYPE=C sed -n '/^\/Annots/!p' $file > $to`; + if (file_exists($to)) { + if (filesize($to) > 0) { + unlink($file); + rename($to, $file); + } else { + unlink($to); + } + } + } } public function CropAndCut() diff --git a/inc/ws/Util/class.ws.links.php b/inc/ws/Util/class.ws.links.php index aef5e13fe..cf5a9300f 100644 --- a/inc/ws/Util/class.ws.links.php +++ b/inc/ws/Util/class.ws.links.php @@ -150,7 +150,7 @@ class wsLinks public static function getLinksAndRulers($book_id, &$links, &$rulers, $time = null) { - return self::getLinksAndRulersFromFile($book_id,$links,$rulers,$time); + return self::getLinksAndRulersFromFile($book_id, $links, $rulers, $time); } public static function getLinksAndRulersFromFile($book_id, &$links, &$rulers, $time = 'latest') @@ -456,7 +456,7 @@ class wsLinks } $link = []; if ($newformat) { - $cols = array('page' => '', 'left' => '', 'top' => '', 'width' => '', 'height' => '', 'type' => '', 'to' => '', 'target' => '_blank', 'video_loop' => true, 'video_auto_start' => true, 'video_controls' => true, 'video_sound_on' => true, 'infobulle' => '', 'numerotation' => 'physical'); + $cols = array('page' => '', 'left' => '', 'top' => '', 'width' => '', 'height' => '', 'type' => '', 'to' => '', 'target' => '_blank', 'video_loop' => true, 'video_auto_start' => true, 'video_controls' => true, 'video_sound_on' => true, 'infobulle' => '', 'numerotation' => 'physical', "inline" => true); } else { $cols = array('page' => '', 'type' => '', 'to' => '', 'left' => '', 'top' => '', 'width' => '', 'height' => '', 'target' => '_blank', 'video_loop' => true, 'video_auto_start' => true, 'video_controls' => true, 'video_sound_on' => true, 'infobulle' => '', 'numerotation' => 'physical'); } @@ -477,6 +477,12 @@ class wsLinks } $k++; } + + if ($link['type'] == 18) { + $link['infobulle'] = $link['to']; + $link['to'] = ''; + } + $link['page'] = $page; $links[] = $link; }