2017-03-17 59 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