From: vincent@cubedesigners.com Date: Fri, 17 Dec 2021 11:43:25 +0000 (+0000) Subject: wait #4965 @0:20 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f7956ee1c67943bec210586faa0a09fea1935d12;p=cubeextranet.git wait #4965 @0:20 --- 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 827e66c31..537b01d98 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -3097,8 +3097,9 @@ class articlePDFLink extends articleLink } $cut = $this->wdir . $name . '.c.pdf'; + $size = $this->wdir . $name . '.s.pdf'; $sinfos = $this->wdir . $name . '.s.nfo'; - if (!file_exists($cut)) { + if (!file_exists($cut) || !file_exists($size) || !file_exists($sinfos) || filesize($sinfos) === 0) { // Cut the pdf in many pages $ratio = $infos->width / $infos->height; $nb = max(1, ceil(0.707071 / $ratio)); @@ -3110,7 +3111,6 @@ class articlePDFLink extends articleLink } // Resize to 210mm width - $size = $this->wdir . $name . '.s.pdf'; `pdfposter $cut $size`; $i = `pdfinfo -f 1 -l 1 -box $size`;