[Interest] QQuickImageProvider for PDF rendering
NES at hekatron.de
Wed Feb 12 08:26:08 CET 2020
Hi Shawn and Michal,
thank you very much, this is what we´re looking for. Looking at the commit log, it seems our question was just in time.
Von: Shawn Rutledge <Shawn.Rutledge at qt.io>
Gesendet: Dienstag, 11. Februar 2020 15:55
An: Neubert Stefan <NES at hekatron.de>
Cc: interest at qt-project.org
Betreff: Re: [Interest] QQuickImageProvider for PDF rendering
> 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).
Hekatron Technik GmbH
Bruehlmatten 3a - 9
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