]> _ Git - cubist_pdf.git/commitdiff
wip #6586 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 20 Dec 2023 11:57:53 +0000 (12:57 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 20 Dec 2023 11:57:53 +0000 (12:57 +0100)
src/PDFTools.php

index 80d8cda97676749f2ce27f65501288b2d57d148b..5dfd3dc646165de0eb06e1faf621711f4a13f08f 100644 (file)
@@ -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 = '')