]> _ Git - cubeextranet.git/commitdiff
wait #4965 @0:20
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 17 Dec 2021 11:43:25 +0000 (11:43 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 17 Dec 2021 11:43:25 +0000 (11:43 +0000)
inc/ws/Util/html5/master/class.ws.html5.links.php

index 827e66c31673e9d7f0661aa703e8324cb4285c61..537b01d981e0cf9b9339c1da9ad31a3af838120b 100644 (file)
@@ -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`;