From f84541e2cbdb3a092b107f58855e6a112b4258f9 Mon Sep 17 00:00:00 2001 From: Claus Due Date: Sat, 1 Nov 2025 14:41:01 +0100 Subject: [PATCH] Add case for 'endobj' in PDF parsing Fixes an issue with parsing some PDF documents which contain this instruction. I have no idea what it means. --- src/Smalot/PdfParser/Parser.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Smalot/PdfParser/Parser.php b/src/Smalot/PdfParser/Parser.php index b051f114..8d31656a 100644 --- a/src/Smalot/PdfParser/Parser.php +++ b/src/Smalot/PdfParser/Parser.php @@ -320,6 +320,7 @@ protected function parseHeaderElement(?string $type, $value, ?Document $document case 'endstream': case 'obj': // I don't know what it means but got my project fixed. + case 'endobj': // I don't know what this means either, but it is found in some PDF documents I tried to parse. case '': // Nothing to do with. return null;