Chinese text problems
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 2.7k
- Forks
- 579
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
- PHP Version: 8.2
- PDFParser Version: 2.8 RC 2
Description:
PDF input
Expected output & actual output
I get an avalanche of weird characters Ex:
\nµ¡úÕ╝ÅÕ«úÕ©âÕ╝ÇÕ▒òÞé⵩àÕ£░õ©╗Õ»îÕå£þÜäµûùõ║ëÒÇéÚÇÜÕæèµîçÕç║´╝ÜÞÁúÞÑ┐ÕìùÕàÜÕåൣëõ©Çõ©Ñ\nÚçìþÜäÕì▒µ£║´╝îÕì│Õ£░õ©╗Õ»îÕå£ÕààÕí×ÕàÜþÜäÕÉäþ║ºÕ£░µû╣µîçÕ»╝µ£║Õà│´╝îÕàÜþÜäµö┐þ¡ûÕ«îÕà¿\nµÿ»µ£║õ╝Üõ©╗õ╣ëþÜäµö┐þ¡û´╝îÞïÑõ©ìÕ¢╗Õ║òÞé⵩à´╝îõ©ìõ¢åõ©ìÞ⢵ëºÞíîÕàÜþÜäõ╝ƒÕñºþÜäµö┐µ▓╗\nõ╗╗Õèí´╝îÞÇîõ©öÚØ®Õ梵á╣µ£¼ÞªüÚü¡Õñ▒Þ┤ÑÒÇéÞüöÕ©¡õ╝ÜÞ««ÕÅÀÕżÕàÜÕåàÚØ®Õæ¢ÕÉîÕ┐ùÞ
Code
$pdf = $parser->parseFile(storage_path('app/'.$path));
dd($pdf->getText());
I`m on Ubuntu 22,I have the chinese language installed. Thanks for your work!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report with the linked Chinese PDF on Ubuntu 22 using PHP 8.2, starting from parseFile() and inspecting the output of getText(). Compare the extracted Chinese text with the PDF input; done means identifying and correcting the character corruption without breaking extraction for the reported document.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100