I'm trying to use pdf2image and it seems I need something called propeller
:
(sum_env) C:\Users\antoi\Documents\Programming\projects\summarizer>python ocr.py -i fr13_idf.pdf Traceback (most recent call last): File "c:\Users\antoi\Documents\Programming\projects\summarizer\sum_env\lib\site-packages\pdf2image\pdf2image.py", line 165, in __page_count proc = Popen(["pdfinfo", pdf_path], stdout=PIPE, stderr=PIPE) File "C:\Python37\lib\subprocess.py", line 769, in __init__ restore_signals, start_new_session) File "C:\Python37\lib\subprocess.py", line 1172, in _execute_child startupinfo) FileNotFoundError: [WinError 2] The system cannot find the file specified During handling of the above exception, another exception occurred: Traceback (most recent call last): File "ocr.py", line 53, in <module> pdfspliterimager(image_path) File "ocr.py", line 32, in pdfspliterimager pages = convert_from_path("document-page%s.pdf" % i, 500) File "c:\Users\antoi\Documents\Programming\projects\summarizer\sum_env\lib\site-packages\pdf2image\pdf2image.py", line 30, in convert_from_path page_count = __page_count(pdf_path, userpw) File "c:\Users\antoi\Documents\Programming\projects\summarizer\sum_env\lib\site-packages\pdf2image\pdf2image.py", line 169, in __page_count raise Exception('Unable to get page count. Is poppler installed and in PATH?') Exception: Unable to get page count. Is poppler installed and in PATH?
I tried this link but it the thing to download didn't solved my problem.
your version of poppler-utils installs pdftocairo into a path that is not in your PATH. you (or somebody else) have messed with the PATH , so it doesn't contain the directory where poppler-utils installed the binaries to any more.
pdf2image is only a wrapper around poppler (not propeller!), to use the module you need to have poppler-utils installed on your machine and in your path.
The procedure is linked in the project's README in the "How to install" section.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With