From 978a21686a9ec12e2bbd141c373f7b3e71e9e3e3 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 19 Apr 2022 14:37:24 +0200 Subject: [PATCH] wait #5189 @0.25 --- src/Jobs/ProcessFile.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Jobs/ProcessFile.php b/src/Jobs/ProcessFile.php index d44a3f0..a5b0f3e 100644 --- a/src/Jobs/ProcessFile.php +++ b/src/Jobs/ProcessFile.php @@ -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); } -- 2.39.5