How to display pages with poppler
-
I'm trying to make a Document Viewer and i'm kinda stuck. I'm using poppler lib. I can open PDFs, and view a single page(the page number that is passed to poppler page function), by rendering it to Qimage and displaying it using a QLable. How can i display all pages, and how can i make continious view mode?
-
Hi chronix,
you have to implement this by yourselfe.
You can ask the poppler document for the number of pages
the pdf includes and render every page to an image.
Then you need to implement some kind of page switching, like
pressing the right arrow key to display the next page in your label.
Poppler only gives you the ability to render pages or search for text, aso.
You have to build the viewer part arround this. -
-
@DrageFabeldyr
Not very hard to find the old page: https://doc.qt.io/archives/qq/qq27-poppler.htmlEDIT BTW, Qt things have changed since 2015. If you want a PDF viewer now, what about https://doc.qt.io/qt-5/qtpdf-pdfviewer-example.html ?