[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: Rendering PDF in PyQT5
From: Wilbert Berendsen <wb () xs4all ! nl>
Date: 2020-07-07 5:33:14
Message-ID: 20200707073314.5aaefc0a () sweelinck
[Download RAW message or body]
Op Tue, 30 Jun 2020 14:28:12 +0200
Justin Giffard <jusgif@gmail.com> schreef:
> Hi there
>
> Asked recently about a print preview in PyQT5 and Paolo attempted to
> help me but we came to the conclusion that there's no real way to do
> this out of the box. I then started investigating making my own print
> preview screen but we can't really find a decent way to do it display
> the PDF. I have tried a webview in the past which seemed to work okay
> 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.
>
> Can anyone make any suggestions on this?
You could use QPageView: https://qpageview.org/
It uses the python binding of Poppler-Qt5 for rendering
https://pypi.org/project/python-poppler-qt5/
Good luck!
--
Wilbert Berendsen (www.wilbertberendsen.nl)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic