From: Vincent Vanwaelscappel Date: Thu, 7 Apr 2022 19:42:44 +0000 (+0200) Subject: wip #5220 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=e7d63196c3d175aaba8a6598210308a26f74044a;p=fluidbook_tools.git wip #5220 --- diff --git a/src/Jobs/ProcessFile.php b/src/Jobs/ProcessFile.php index f421e94..d44a3f0 100644 --- a/src/Jobs/ProcessFile.php +++ b/src/Jobs/ProcessFile.php @@ -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();