-
Notifications
You must be signed in to change notification settings - Fork 550
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
Notice: iconv(): Detected an illegal character in input string #549
Comments
Can you provide a PDF or example input which raises this error? |
I will try to reproduce this bug with a PDF without sensitive information. |
Facing the same issue with Laravel 10.0 and smalot/pdfparser 2.3.0 Getting following exception: at C:\xampp\htdocs\desmis\vendor\smalot\pdfparser\src\Smalot\PdfParser\Font.php:606 Attaching pdf file being parsed. |
@samvidhik Please test if #580 fixes your problem. A note in the pull request would be appreciated. |
IssueHi @k00ni, I'm having the same issue here.
FixesThe solution proposed at #580 does solve my issue. Before that, I had tried working with
|
I also had this error. #580 solved it completely. |
* fix to iconv() illegal character error (issue #549) * display warnings in PHPUnit; added incomplete test to demonstrate fix * revert --display-notices in Makefile because it fails in versions < 10 * Fixed coding style problem * FontTest.php: finalized test which triggers notice when don't using the fix --------- Co-authored-by: Konrad Abicht <hi@inspirito.de>
Description:
I am getting this warning on
$pdf->getPages()[0]->getDataTm()
:Notice: iconv(): Detected an illegal character in input string
Stack Trace:
ErrorException: Notice: iconv(): Detected an illegal character in input string
#8 vendor/smalot/pdfparser/src/Smalot/PdfParser/Font.php(604): Smalot\PdfParser\Font::decodeContentByEncodingElement
#7 vendor/smalot/pdfparser/src/Smalot/PdfParser/Font.php(553): Smalot\PdfParser\Font::decodeContentByEncoding
#6 vendor/smalot/pdfparser/src/Smalot/PdfParser/Font.php(467): Smalot\PdfParser\Font::decodeContent
#5 vendor/smalot/pdfparser/src/Smalot/PdfParser/Page.php(467): Smalot\PdfParser\Page::extractDecodedRawData
#4 vendor/smalot/pdfparser/src/Smalot/PdfParser/Page.php(502): Smalot\PdfParser\Page::getDataCommands
#3 vendor/smalot/pdfparser/src/Smalot/PdfParser/Page.php(655): Smalot\PdfParser\Page::getDataTm
The text was updated successfully, but these errors were encountered: