-
Notifications
You must be signed in to change notification settings - Fork 94
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
Error of 'Undefined Constant 'IMG_JPEG' #38
Comments
Can I ask if you made any progress with this? We're having exactly the same problem
I'm sure it can't just be the 2 of us! |
Hi Arathra- No sorry I didn't, and gave up on it. I was trying to create forms in pdf for a client - then read the data out. I found PDFFiller instead and am using that. It will export the fields into an excel format for you. Phil |
Thanks for getting back to me, Phil. Shame about that; I guess that means we'll be looking for an alternative as well. We need to "read" users' PDF uploads so while PDFFiller isn't for us, I'm sure something out there will work. All the best. |
Hi Phil, It took a bloody long time but I think I have solved it by using a different PDF converter here: https://github.com/smalot/pdfparser/ along with vendor/autoload.php It works for me and doesn't produce any errors. Cheers |
That’s great news Christian, and thanks for letting me know.
I’ll have a look at that
Regards
Phil Jones
From: arathra <[email protected]>
Sent: 29 October 2020 18:00
To: christian-vigh-phpclasses/PdfToText <[email protected]>
Cc: Phil Jones <[email protected]>; Author <[email protected]>
Subject: Re: [christian-vigh-phpclasses/PdfToText] Error of 'Undefined Constant 'IMG_JPEG' (#38)
Hi Phil,
It took a bloody long time but I think I have solved it by using a different PDF converter here: https://github.com/smalot/pdfparser/ along with vendor/autoload.php
It works for me and doesn't produce any errors.
Cheers
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#38 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AGHHW6DH6GYENK37ZGKFZELSNGUQZANCNFSM4R5PKJAA> . <https://github.com/notifications/beacon/AGHHW6EH7EXR23SMP2O6UZLSNGUQZA5CNFSM4R5PKJAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFLM6TQQ.gif>
|
hi I think I have solved it you need to downgrade your php version to 7.4 |
I'm sure none of the people that asked this are in need of it anymore but for anyone else that still encounters this error, all you need to do is put the IMG_JPEG in quotes like the error is suggesting. PHP Warning: Use of undefined constant IMG_JPEG - assumed 'IMG_JPEG' (this will throw an Error in a future version of PHP) just go to the pdftotext class ctrl+f to find IMG_JPEG and change it to 'IMG_JPEG' |
Hope someone can help with this. I'm trying to use this pdftotext class in a script that runs without a graphical interface - just to get some text out of a pdf. I'm running it just as a bat file. or command line and getting the error;
Use of undefined constant IMG_JPEG - assumed 'IMG_JPEG' and it's stopping my script.
Any ideas how i fix this.
Thanks in advance
The text was updated successfully, but these errors were encountered: