Print preview and print PDF in PyQT5

Justin Giffard jusgif at gmail.com
Fri Jun 12 12:08:08 BST 2020


Good afternoon

I'm looking for a way to make a print preview and print a PDF. I've tried
various things including trying to use a webview and print from there
without much success.

Currently I am generating a PDF with reportlab but ideally what I want is
to be able view the document after the pdf is generated (based on
data fetched from a database) and then if need be press cancel to alter the
parameters and then view it again then chose which printer I want to print
to and then print. Thus far I haven't had much luck other than making the
app open the document in an external browser / external PDF viewer and then
printing from there or blindly printing to the default printer.


I appreciate any advice

Justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20200612/b38f5b54/attachment.htm>


More information about the PyQt mailing list