From bb19a83e130a139d8d1449af64151409ba5949b9 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 20 Dec 2023 12:57:53 +0100 Subject: [PATCH] wip #6586 @0.25 --- src/PDFTools.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/PDFTools.php b/src/PDFTools.php index 80d8cda..5dfd3dc 100644 --- a/src/PDFTools.php +++ b/src/PDFTools.php @@ -4,6 +4,7 @@ namespace Cubist\PDF; use Cubist\Util\CommandLine; use Cubist\Util\Files\Files; +use Cubist\Util\Gzip; use Cubist\Util\Text; use Cubist\Util\Cache; use DOMDocument; @@ -477,6 +478,11 @@ class PDFTools $fwstk->setArg('--ignoreSeparators "' . $ignoreSeparators . '"'); } $fwstk->execute(); + $p1path = $out . 'p1.txt'; + if (!Gzip::file_exists($p1path)) { + $fwstk->debug(); + throw new \Exception('An error occured while producing file ' . $p1path); + } } public static function extractHighlightsData($pdf, $out, $mode = 'standard', $ignoreSeparators = '') -- 2.39.5