Using Poppler Qt4 C ++

I need a PDF view library to be used in my application, I use C ++ and QT

i loaded Poppler and sample code Poppler Qt4 interface library but I don’t 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 I am completely lost.

+5
source share
1 answer

provided that you have correctly installed the headers and poppler libraries on your system. I am on ubuntu and run:

./configure
make
make install

Poppler. , msys/mingw .

.pro :

INCLUDEPATH += /path_to_poppler_include_files/qt4
LIBS += -L/path_to_poppler_libs -lpoppler-qt4

, :

#include <poppler-qt4.h>

....

QString filename;

Poppler::Document* document = Poppler::Document::load(filename);
if (!document || document->isLocked())
{
    // ... 
    delete document;
}

.

, ,

+5

All Articles