[Interest] QQuickImageProvider for PDF rendering

Shawn Rutledge Shawn.Rutledge at qt.io
Tue Feb 11 15:54:49 CET 2020


> On 11 Feb 2020, at 15:38, Neubert Stefan <NES at hekatron.de> wrote:
> 
> 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.

I’m working on the QtQuick feature set now.  You can get the latest unfinished code from the wip/qtpdf branch in the qtwebengine repo.  We moved qtpdf there because of the build system, mainly (chromium switching build systems made it difficult to upgrade the pdfium version in the old qtpdf repo, but the work was already mostly done in the webengine repo).



More information about the Interest mailing list