Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Poppler in path for pdf2image

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.

like image 476
Revolucion for Monica Avatar asked Nov 26 '18 12:11

Revolucion for Monica


People also ask

Is poppler installed and in path Linux?

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.


1 Answers

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.

like image 50
Belval Avatar answered Sep 18 '22 14:09

Belval