From e7d63196c3d175aaba8a6598210308a26f74044a Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 7 Apr 2022 21:42:44 +0200 Subject: [PATCH] wip #5220 --- src/Jobs/ProcessFile.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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(); -- 2.39.5