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

unsupported colorspace for '{output}' #328

Open
itDjango opened this issue Dec 3, 2024 · 0 comments
Open

unsupported colorspace for '{output}' #328

itDjango opened this issue Dec 3, 2024 · 0 comments

Comments

@itDjango
Copy link

itDjango commented Dec 3, 2024

Description of the bug

I'm encountering an error during parsing: "unsupported colorspace for '{output}'".

My requirement is that I cannot modify the original PDF file, so I need to address this issue within the parsing script itself.

I've noticed others have raised this issue as well, but it hasn't been resolved. How can I tackle this problem without altering the source code?

How to reproduce the bug

000.pdf
Problem file

def to_docx(file_path):
    try:
        pdf_file = file_path
        word_file_path = file_path[:-4] + '.docx'
        docx_file = word_file_path
        start_time = time.time()
        cv = Converter(pdf_file)
        cv.convert(docx_file, start=0, end=None)
        cv.close()
        end_time = time.time()
        logger.info(start_time-end_time)
        return True
    except Exception as e:
       logger.error(f': {e}')
       return False

‘ERROR’ unsupported colorspace for '{output}'

pdf2docx version

0.5.8

Operating system

Linux

Python version

3.12

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