From: Vincent Vanwaelscappel Date: Tue, 19 Oct 2021 16:44:11 +0000 (+0200) Subject: wip #4808 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=eee8b4480a3726a3c0c1361ba90abde41df04dad;p=cubist_pdf.git wip #4808 @0.25 --- diff --git a/composer.json b/composer.json index 921cad0..de312df 100644 --- a/composer.json +++ b/composer.json @@ -23,6 +23,7 @@ "php": ">=7.3.0", "ext-json": "*", "ext-dom": "*", + "ext-libxml": "*", "laravel/framework": "~5.8|^6.0|^7.0|^8.0", "cubist/util": "dev-master" }, diff --git a/src/CommandLine/FWSTK.php b/src/CommandLine/FWSTK.php index dc4fe3c..e80ebea 100644 --- a/src/CommandLine/FWSTK.php +++ b/src/CommandLine/FWSTK.php @@ -4,7 +4,6 @@ namespace Cubist\PDF\CommandLine; use Cubist\PDF\PDFTools; use Cubist\Util\CommandLine; -use Fluidbook\Tools\FluidbookTools; class FWSTK extends CommandLine { diff --git a/src/Document.php b/src/Document.php index 2a6b401..53b4957 100644 --- a/src/Document.php +++ b/src/Document.php @@ -3,9 +3,8 @@ namespace Cubist\PDF; use Cubist\Util\Text; -use Fluidbook\Tools\CommandLine\FWSTK; -use Fluidbook\Tools\Jobs\ProcessFile; -use Fluidbook\Tools\Jobs\ProcessPage; +use Cubist\PDF\CommandLine\FWSTK; + class Document { @@ -147,32 +146,6 @@ class Document return $this->width; } - /** - * @param ProcessFile[] $files - * @param array $pages - * @param bool $sync - */ - public function processPages($files, $pages, $sync = false) - { - start_measure('Process pages (doc)'); - foreach ($pages as $i) { - $this->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); - } - public function processLinks() { PDFTools::extractLinks($this->getPDFInput(), $this->getConvertPath()); @@ -180,12 +153,8 @@ class Document public function processTexts() { - start_measure('Extract texts'); PDFTools::extractTexts($this->getPDFInput(), $this->getConvertPath()); - stop_measure('Extract texts'); - start_measure('Get highlights data'); PDFTools::extractHighlightsData($this->getPDFInput(), $this->getConvertPath()); - stop_measure('Get highlights data'); } public function getPageNumbers()