]> _ Git - fluidbook_tools.git/commitdiff
wip #5220
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 7 Apr 2022 19:42:44 +0000 (21:42 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 7 Apr 2022 19:42:44 +0000 (21:42 +0200)
src/Jobs/ProcessFile.php

index f421e94e91ac69c0b6084d08cbd6a5887f0f3787..d44a3f0b6aebb81877d0e321b6a37359698b4b59 100644 (file)
@@ -220,7 +220,7 @@ class ProcessFile
             if ($this->getResolution() === 'thumb') {
                 PDFTools::makeMiniShot($this->getSplittedPDFPage(), $file, 1, $this->getFormat());
             } else {
-                $rr = $this->getVersion() === 'html' ? $this->getJob()->getResolutionRatio() : $this->getJob()->getMobileFirstRatio();
+                $rr = $this->getVersion() === 'html' ? $this->getResolutionRatio() : $this->getMobileRatio();
                 PDFTools::makeShotPNM($this->getSplittedPDFPage(), $file, 1, '', $this->getResolution() * $rr, 85, 4, $this->isWithTexts(), null, null, $this->getFormat());
             }
         } else if ($this->getFormat() === 'swf') {
@@ -250,6 +250,16 @@ class ProcessFile
         SVGTools::optimizeSVG($inter, $out);
     }
 
+    public function getResolutionRatio(): float
+    {
+        return $this->getJob()->getResolutionRatio();
+    }
+
+    public function getMobileRatio(): float
+    {
+        return $this->getJob()->getMobileFirstRatio();
+    }
+
     public function makeOptimizedSVGFile($out)
     {
         $in = $this->makeSVGFile();