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
code
. #include <poppler-qt4.h>code
. with the correct path of the header file. currently i have this error in QT creator ":: error: cannot find -lpoppler-qt4". – nemo