The plan for now is to make a subclass of QImageIOHandler to expose PDF as an image format: that way an ordinary Image can be used to render a page of a PDF in QML. And Image will get the same currentFrame and frameCount properties that are in AnimatedImage, so that you can use currentFrame to step through the pages or frames of any multi-image format (such as TIFF, ICO, PDF).
Other features such as selecting ranges of characters, searching etc. can be developed via layers on top. But the most basic thing you can do with a PDF is render a page, and PDFium currently uses the Skia engine to do that, so it's easier to let it render whole-page images than any other rendering strategy. Thus our PDF support will be quite like our SVG support so far in Qt Quick. Later we can think about doing it via QPainter, perhaps, or by creating scene graph nodes for objects (such as glyphs, images and vector graphics) within each page: but the feasibility of that is uncertain so far (see QTBUG-77505).
|For Gerrit Dashboard: QTBUG-77506|
|285826,8||Cache frames from multi-frame Image||dev||qt/qtdeclarative||Status: NEW||0||0|
|287726,6||WIP allow loading images from arbitrary QFile subclasses||dev||qt/qtdeclarative||Status: NEW||-2||0|