-
Notifications
You must be signed in to change notification settings - Fork 938
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
Text extraction issue with extract_text_to_fp - Uncleaned CID characters #1056
Comments
It's been discussed in euske/pdfminer#122 and on stack overflow : https://stackoverflow.com/questions/74416930/how-to-solve-cidx-pdfplumber-python-text-extraction This is the code I've used to solve cid, might not work for all use cases, but works for mine!
|
The handling of unmapped glyphs is a method on from pdfminer.converter import PDFLayoutAnalyzer
PDFLayoutAnalyzer.handle_undefined_char = lambda *args: "" |
Hello,
While using the extract_text_to_fp function with the latest version of pdfminer.six, I've encountered an issue where CID characters (e.g., CID(123)) appear in the extracted text. These characters seem to be associated with the fonts used in the PDF, but there is no straightforward way to clean them or make them readable.
This makes it difficult to obtain a clean and readable text from the PDF, as these CID characters are not converted into standard Unicode characters or intelligible text. I would like to know if there is a recommended way to handle this issue with pdfminer.six or if improvements can be made to the library to manage such cases more effectively.
Additional Information:
Version of pdfminer.six used: Version: 20240706
Operating system: linux
Example code used for extraction:
Thank you for your incomming answer and your time.
page10.pdf
The text was updated successfully, but these errors were encountered: