2017-03-17 83 views
1

我試圖在Windows 7中使用pypdfocr與Python 2.7。Python 2.7:使用Windows 7的pypdfocr時的難度

這是錯誤消息我收到的時候我嘗試pypdfocrcmd

C:\Users\chamar.stu>pypdfocr F:\test2.pdf Starting conversion of F:\test2.pdf 'pdfimages' is not recognized as an internal or external command, operable program or batch file. WARNING: Could not execute pdfimages to calculate DPI (try installing xpdf or po ppler?), so defaulting to 300dpi Traceback (most recent call last): File "c:\users\chamar.stu\appdata\local\continuum\anaconda2\lib\runpy.py", line 174, in _run_module_as_main ... .... ....

pypdfocr\pypdfocr_tesseract.py", line 98, in _is_version_uptodate ver = [int(x) for x in ver_str.split('.')] ValueError: invalid literal for int() with base 10: '00alpha'

看來,我很想念PopplerXPDF但我沒有通過PyGoObject的poppler安裝的建議here。我也鏈接xpdf在我的環境路徑中,建議here

任何建議讓我擺脫這個小混亂?

回答

1

pypdfocr腳本調用可能使用subprocess模塊pdfimages程序(poppler的一個公用事業,而不是庫)。

我不能輕易辨別出您提到的URI中是否提供了實用程序。

如果沒有,您可以找到預先建立的ms-windows可執行文件, here

確保其中poppler的實用程序的安裝位置是在你的PATH,使pypdfocr可以找到它。

+0

好的,謝謝 - 該網站上的Popple.exe的鏈接已關閉..我必須等待它重新啓動... – Plug4