我需要一个pdf查看器库来使用我的应用程序, am使用c ++和QT
我下载 Poppler 和代码示例 Poppler Qt4接口库 但是,我不知道如何配置库在我的代码中工作。
提前感谢,任何提示都被赞赏为完全失去。
解决方案我在Ubuntu上运行:
./ configure make make install创建并安装了poppler库。根据我的理解,您可以在Windows上使用 msys / mingw 类似这样的东西。
现在在 .pro 文件添加以下行:
INCLUDEPATH + = / path_to_poppler_include_files / qt4 LIBS + -L / path_to_poppler_libs -lpoppler-qt4,代码如下:
#include< poppler-qt4.h> .... QString文件名; Poppler :: Document * document = Poppler :: Document :: load(filename); if(!document || document-> isLocked()) { // ... 删除文档; }应该为您构建和运行。
希望这有助于您,
i need a pdf viewer library to be used in my app, am using c++ and QT
i downloaded Poppler and code example The Poppler Qt4 interface library but, i do not know how to configure the library to work in my code. i am using QT Creater, in windows xp.
thanks in advance, any hint is appreciated as am completely lost.
解决方案assuming you've installed poppler headers and libraries on your system correctly. I'm on ubuntu, and running:
./configure make make installmade poppler libraries built and installed. From my understanding you can use msys/mingw on windows to something similar to this.
Now in your .pro file add following lines:
INCLUDEPATH += /path_to_poppler_include_files/qt4 LIBS += -L/path_to_poppler_libs -lpoppler-qt4and the code like this:
#include <poppler-qt4.h> .... QString filename; Poppler::Document* document = Poppler::Document::load(filename); if (!document || document->isLocked()) { // ... delete document; }should build and run for you.
hope this helps, regards
更多推荐
使用Poppler Qt4 c ++
发布评论