[Interest] QQuickImageProvider for PDF rendering

Neubert Stefan NES at hekatron.de
Tue Feb 11 15:38:26 CET 2020

Hi list,

we are using a QQuickImageProvider to load and render PDF pages through qtpdf to display the pages in QtQuick.
Right now we use an additional qmlExtentionPlugin to get the information about a pdf document, like page count
and request the page images in a QtQuick Image by setting the source property to something like
"image:://ProviderName/PathToPDF/pageNumber". The image provider has some queues holding the last
requested documents and pages to avoid reloading the pdfs all the time. This is working quite fine.

We are searching for an approach how to avoid the double loading, in our extention plugin and in the image provider.

One idea was to extend an image provider with Q_PROPERTY or something else to access the meta data of the loaded
pdfs, like accessing a singleton object in QtQuick, but we donĀ“t know if this would be the right approach or even possible.
The qt blog about qtpdf in 2017 said something about adding QtQuick support, but there has not been any work on it.

Any suggestion on how to properly implement qtpdf in QQuick or how to extend an image provider with additional
meta data is welcome.

Regards Stefan
Hekatron Technik GmbH
Bruehlmatten 3a - 9
D-79295 Sulzburg
Reg.-Ger. Freiburg HRB 300243
Michael Roth, Daniel Liechti, Armin Berchtold
Telefon +49 7634 500-0
Telefax +49 7634 500-316

More information about the Interest mailing list