From: Vincent Vanwaelscappel Date: Tue, 19 Oct 2021 16:43:53 +0000 (+0200) Subject: wip #4808 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=1c29f46513f08c1ab62e7d17ac32313e73f7707c;p=fluidbook_tools.git wip #4808 @0.25 --- diff --git a/src/Compiler/Compiler.php b/src/Compiler/Compiler.php index 7169c82..299e246 100644 --- a/src/Compiler/Compiler.php +++ b/src/Compiler/Compiler.php @@ -6,9 +6,9 @@ use Cubist\Util\Files\Files; use Cubist\Util\Files\VirtualDirectory; use Cubist\Util\PHP; use Exception; +use Fluidbook\Tools\Document; use Fluidbook\Tools\Jobs\ProcessFile; use Fluidbook\Tools\Jobs\ProcessPage; -use Cubist\PDF\Document; use Fluidbook\Tools\Search\SearchIndex; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldBeUnique; diff --git a/src/Compiler/Source.php b/src/Compiler/Source.php index 81e85c0..d875941 100644 --- a/src/Compiler/Source.php +++ b/src/Compiler/Source.php @@ -2,7 +2,7 @@ namespace Fluidbook\Tools\Compiler; -use Cubist\PDF\Document; +use Fluidbook\Tools\Document; class Source { diff --git a/src/Document.php b/src/Document.php new file mode 100644 index 0000000..6642cc7 --- /dev/null +++ b/src/Document.php @@ -0,0 +1,35 @@ +processPage($i, $files, $sync); + } + stop_measure('Process pages (doc)'); + } + + /** + * @param $page int + * @param $dest string + * @param $files ProcessFile[] + * @param false $sync + */ + public function processPage($page, $files, $sync = false) + { + $dispatchFunction = $sync ? 'dispatchSync' : 'dispatch'; + ProcessPage::$dispatchFunction($this, $page, $files); + } +} diff --git a/src/Jobs/ProcessPage.php b/src/Jobs/ProcessPage.php index 3585580..2c3ea35 100644 --- a/src/Jobs/ProcessPage.php +++ b/src/Jobs/ProcessPage.php @@ -3,7 +3,7 @@ namespace Fluidbook\Tools\Jobs; use Cubist\Util\Files\Files; -use Cubist\PDF\Document; +use Fluidbook\Tools\Document; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable;