-
Notifications
You must be signed in to change notification settings - Fork 548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined variable in ->getObjectsByType('EmbeddedFile') but there is an attachment inside given #740
Comments
Hi together, |
In your code the variable $pdfParsed->getObjectsByType('EmbeddedFile');
foreach ($embeddedFiles as $embeddedFile) {
$embeddedFile->getContent(); // returns Undefined variable $embeddedFile
} It should complain that |
You are right.
it does not get into the foreach. |
Same problem here, pdf clearly had attachments, but EmbeddedFiles was empty. Dumped some PDFObjects and Headers and it turned out that in these PDFs the attachments seem to be stored in a different way. Not a PDF guy, so no idea why and if that should be supported by smalot. Here is how to get the XML Content:
Was able to parse your PDF and extract the XML. Hope that helps. |
|
Description:
I have analyzed the bug so far, that there is a problem concerning embeddedFiles.
PDF input
Example pdf invoice.
Rechnung RE-202400282 vom 09.10.2024 zu Ihr Zeichen.pdf
Expected output & actual output
There is only one embedded File in it (please ignore why i use foreach here)
expected Output should be that the variable $embeddedFile is not undefined.
Code
see above :)
Kind regards
The text was updated successfully, but these errors were encountered: