using Poppler Qt4 c++

谁说我不能喝 提交于 2019-12-03 01:48:09

assuming you've installed poppler headers and libraries on your system correctly. I'm on ubuntu, and running:

./configure
make
make install

made 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-qt4

and 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!