-
-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues and found no similar reports
Are you using the latest version of this package?
- The issue I'm reporting exists in the latest release
Can other PDF readers read the file?
- The PDF I'm trying to read opens correctly in at least one other PDF reader
When running this snippet
$document = (new PdfParser())->parseFile('pdf_notparsed_vo37ajbgtlsm7Ytckwh.pdf');
$document->getText();I run into the following issue/exception (Please attach the pdf)
Uncaught PrinsFrank\PdfParser\Exception\ParseFailureException: Expected "5 0 obj" on first line, got "4 0 obj" in ~/pdfparser/vendor/prinsfrank/pdfparser/src/Document/Object/Item/UncompressedObject/UncompressedObjectParser.php:19
Stack trace:
#0 ~/pdfparser/vendor/prinsfrank/pdfparser/src/Document/Document.php(118): PrinsFrank\PdfParser\Document\Object\Item\UncompressedObject\UncompressedObjectParser::parseObject(Object(PrinsFrank\PdfParser\Document\CrossReference\Source\Section\SubSection\Entry\CrossReferenceEntryInUseObject), 5, Object(PrinsFrank\PdfParser\Stream\InMemoryStream))
#1 ~/pdfparser/vendor/prinsfrank/pdfparser/src/Document/Document.php(63): PrinsFrank\PdfParser\Document\Document->getObject(5, 'PrinsFrank\\PdfP...')
#2 ~/pdfparser/vendor/prinsfrank/pdfparser/src/Document/Document.php(139): PrinsFrank\PdfParser\Document\Document->getCatalog()
#3 ~/pdfparser/vendor/prinsfrank/pdfparser/src/Document/Document.php(150): PrinsFrank\PdfParser\Document\Document->getPages()
#4 ~/pdfparser/extract.php(15): PrinsFrank\PdfParser\Document\Document->getText()
#5 {main}
thrown in ~/pdfparser/vendor/prinsfrank/pdfparser/src/Document/Object/Item/UncompressedObject/UncompressedObjectParser.php on line 19
[pdf_notparsed_vo37ajbgtlsm7Ytckwh.pdf](https://github.com/user-attachments/files/21368622/pdf_notparsed_vo37ajbgtlsm7Ytckwh.pdf)
Do you allow attachment files to be used in tests to prevent regressions?
- Yes, I give permission to use this file as a test file to prevent future regressions (And am authorized to give this permission)