-
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
bugSomething isn't workingSomething isn't working
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
$pdfParser = new PdfParser();
$pdfParsed = $pdfParser->parseString($pdfContent);
$fileSpecs = $pdfParsed->getCatalog()->getFileSpecifications();
$fileSpecs = array_filter(
$fileSpecs,
static function ($fileSpec) {
return !is_null($fileSpec->getEmbeddedFile());
}
);
foreach ($fileSpecs as $fileSpec) {
$this->attachmentList[] = new Attachment(
$fileSpec->getEmbeddedFile()->getStream()->toString(),
$fileSpec->getFileSpecificationString(),
ltrim($fileSpec->getEmbeddedFile()->getSubType() ?? '', '/')
);
}The error occurs when calling "$fileSpec->getEmbeddedFile()->getStream()->toString(),"
I run into the following issue/exception (Please attach the pdf)
/home/user/vendor/prinsfrank/pdfparser/src/Stream/InMemoryStream.php:26
/home/user/vendor/prinsfrank/pdfparser/src/Document/Object/Item/CompressedObject/CompressedObjectContent/CompressedObjectContentParser.php:27
/home/user/vendor/prinsfrank/pdfparser/src/Document/Object/Item/UncompressedObject/UncompressedObject.php:89
/home/user/vendor/prinsfrank/pdfparser/src/Document/Object/Decorator/DecoratedObject.php:33
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)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working