]> _ Git - fluidbook_tools.git/commitdiff
wait #5189 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 19 Apr 2022 12:37:24 +0000 (14:37 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 19 Apr 2022 12:37:24 +0000 (14:37 +0200)
src/Jobs/ProcessFile.php

index d44a3f0b6aebb81877d0e321b6a37359698b4b59..a5b0f3e17b627bc2f680d5852995ee66f52cbab7 100644 (file)
@@ -172,7 +172,11 @@ class ProcessFile
             $prefix = $this->isWithGraphics() ? 'f' : 't';
             $res = $dir . $prefix . 'o' . $this->getPage();
             if ($this->isWithGraphics()) {
-                $res .= '-' . $this->getResolution();
+                if ($this->getResolution() == 0) {
+                    $res = $dir . $prefix . 'p' . $this->getPage();
+                } else {
+                    $res .= '-' . $this->getResolution();
+                }
             }
             $res .= '.svg';
             $reffile = $this->makeSVGFile();
@@ -212,7 +216,11 @@ class ProcessFile
         touch($lock);
         if ($this->getFormat() === 'svg') {
             if ($this->isWithGraphics()) {
-                $this->makeOptimizedSVGFile($file);
+                if ($this->getResolution() > 0) {
+                    $this->makeOptimizedSVGFile($file);
+                } else {
+                    $this->makeSVGFile();
+                }
             } else {
                 $this->makeTextSVGFile($file);
             }