qt - 由于 poppler,无法在 Windows 上安装 pdftotext

标签 qt pip pdftotext poppler

我正在尝试在 Windows 上安装 pdftotext:

pip install pdftotext

它最初失败是因为缺少 MS visual studio(现已安装),现在由于 poppler 问题而失败。我已经下载了 poppler,它安装在

C:\Program Files (x86)\poppler

我的路径包括这个目录。

安装失败并出现错误 screen image of error

我在 Program Files (x86) 中找不到文件 poppler-cpp.lib

我知道安装 poppler 是有问题的,网络上有很多与之相关的问题和 one seems to be my problem exactly (标记于 2018 年 7 月 19 日),但似乎没有提供任何解决方案。我把它安装在 linux 上,它像梦一样工作。但是,我也需要在 Windows 上工作。

有人可以帮我解决这个问题吗?

[编辑 2018.09.17 我找到了对它的引用 here :

... The problem was that this binaries files were dynamic and, from the files with .lib extension (poppler.lib, poppler-cpp.lib, poppler-qt4.lib), only poppler.lib was a static library. Due to this, and using the cMake files content in the download of the source code of poppler I tried to generate static versions from all the dependencies of poppler, which was an easy thing to do ...

这会帮助别人来帮助我吗?

最佳答案

我遇到了完全相同的问题,但无法编译解决方案。

我正在使用的解决方法是运行与 miktex 2.9 一起安装的 pdftotext.exe(我已经将其用于 latex )。

安装miktex后确定pdftotext.exe的路径。然后您可以使用子流程模块运行它。

Import subprocess
Subprocess.call([path/pdftotext.exe, 
options, file.pdf])

用你需要的选项切换选项。

关于qt - 由于 poppler,无法在 Windows 上安装 pdftotext,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52336495/

相关文章:

c++ - 启动时的 Qt 全屏

c - GTK 中的信号和槽

java - 如何在java swing中将Pdf文件转换为doc文件?

python - 使用 conda 和 poppler 安装后无法导入 pdftotext,Windows 10

c++ - Qt 模型- View - Controller

qt - Qt3 中以毫秒为单位的 QDateTime 到 QString

python - Ubuntu 17 : Can't install mysqlclient

pdftotext - 从 pdf 文件中删除页码、页眉和页脚

python - git 克隆 + 在 Python 中安装

python - 无法 pip 安装 mysql-python