Skip to content
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

Open
BaillySylvain opened this issue Oct 25, 2024 · 0 comments

Comments

@BaillySylvain
Copy link

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:

            extract_text_to_fp(srcFile, xmlFile, output_type='xml', codec='utf-8', laparams=LAParams(
                detect_vertical=False,
                word_margin=0.2,
                char_margin=3,
                boxes_flow=1,
                all_texts=True,
            ))

Thank you for your incomming answer and your time.
page10.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant