Rendering PDF in PyQT5

Justin Giffard jusgif at gmail.com
Tue Jun 30 14:47:13 BST 2020


Hi Olaf

Just checking in terms of your code. Are you displaying the actual PDF file
that's generated or are you displaying the original HTML? My current use is
I have generated a PDF with tables and barcodes and such using ReportLab.
So I would need to load and display that PDF.

Justin

On Tue, Jun 30, 2020 at 2:43 PM Olaf Art Ananda <artanidos at gmail.com> wrote:

> Hey Justin
>
> Have a look at my EbookCreator https://github.com/Artanidos/EbookCreator
> I am using weasyprint to render PDF and I have got a HTML based preview.
> Maybe that gives you an idea.
>
> Art
>
>
>
> -------- Ursprüngliche Nachricht --------
> Von: Justin Giffard <jusgif at gmail.com>
> Datum: Di., 30. Juni 2020, 13:28
> An: pyqt at riverbankcomputing.com
> Betreff: Rendering PDF in PyQT5
>
> 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?
>
> Justin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20200630/6daf28d4/attachment.htm>


More information about the PyQt mailing list