From 3aae6a23bfd22c8bb79275588fea44b68564bfd7 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 17 May 2022 17:08:06 +0200 Subject: [PATCH] wip #5220 @2 --- src/Process.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Process.php b/src/Process.php index 6115f0d..3ab9365 100644 --- a/src/Process.php +++ b/src/Process.php @@ -2,7 +2,9 @@ namespace Fluidbook\Farmer; +use Fluidbook\Tools\Document; use Fluidbook\Tools\Jobs\ProcessFile; +use Fluidbook\Tools\Jobs\ProcessPage; class Process extends ProcessFile { @@ -15,6 +17,7 @@ class Process extends ProcessFile protected $mobileRatio = 1; protected $resolutionRatio = 1; protected $filespath; + protected $_job = null; public function __construct($out, $page, $resolutionRatio, $mobileRatio, $format = 'jpg', $resolution = 150, $withGraphics = true, $withTexts = true, $version = 'html', $force = false) { @@ -111,4 +114,12 @@ class Process extends ProcessFile return str_replace(self::LOCAL_ROOT, self::DISTANT_ROOT, $this->getPath($this->isForce())); } + public function getJob(): ProcessPage + { + if (null === $this->job) { + $this->job = new ProcessPage(new Document($this->getOut() . '/original.pdf'), $this->getPage()); + } + return parent::getJob(); + } + } \ No newline at end of file -- 2.39.5