How to Open pdf in QtWebview or QML in general ?
Hey how can i open pdf in Qtwebview ?
I have a url which has pdf for ex this url : http://www.tutorialspoint.com/java/java_tutorial.pdf
Qtwebview does not open that url .
IS there any other way to open pdf in QML ?
how can i add it to my project ? is it possible to do it with just qml ?
For poppler, most major linux dists are providing devel packages so you can
#include <poppler-qt5.h>and add
LIBS += -lpoppler-qt5to your .pro file. If precompiled poppler (e.g. Windows) is not available, you have to build it from source.
For qtpdf, build qpdf.pro (qmake, make, make install) , add
QT += pdfand
#include <QPdfDocument>in your source.
Take a look at the build instruction and examples of each project.