Rendering PDF in PyQT5

Tomas Sobota tom at sobota.net
Fri Jul 3 17:26:19 BST 2020


Justin, you could try Poppler. There is a version for PyQt5 (version >=
5.4) here:
https://pypi.org/project/python-poppler-qt5/
Tom

On Tue, Jun 30, 2020 at 5:04 PM Florian Bruhin <me at the-compiler.org> wrote:

> On Tue, Jun 30, 2020 at 02:28:12PM +0200, Justin Giffard wrote:
> > I have tried a webview in the past which seemed to work okay
>
> FWIW since Qt 5.13, QtWebEngine can show PDFs using Chromium's PDFium
> viewer:
> https://doc.qt.io/qt-5/qtwebengine-features.html#pdf-file-viewing
>
> > but Paolo came across a C++ QT5 example that made use of a QPdfDocument
> which
> > I later found was held by the QPdfView. This had me excited until I found
> > that it would seem that this is not implemented in PyQT5. Damn another
> brick
> > wall.
>
> Qt PDF uses the same PDFium viewer from QtWebEngine internally as well -
> but I
> think it's still a Qt Labs "work in progress" thing at the moment.
>
> Florian
>
> --
> me at the-compiler.org (Mail/XMPP) | https://www.qutebrowser.org
>        https://bruhin.software/ |
> https://github.com/sponsors/The-Compiler/
>        GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
>              I love long mails! | https://email.is-not-s.ms/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20200703/b3dcb947/attachment.htm>


More information about the PyQt mailing list