<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Python GUIs - printing</title><link>https://www.pythonguis.com/</link><description>Create GUI applications with Python and Qt</description><atom:link href="https://www.pythonguis.com/feeds/printing.tag.rss.xml" rel="self"/><lastBuildDate>Sun, 05 Jul 2020 09:00:00 +0000</lastBuildDate><item><title>Exporting Widgets to PDF and Controlling Position in PyQt5 — How to render a QWidget to PDF and position it at the top of the page</title><link>https://www.pythonguis.com/faq/exporting-widgets-and-setting-the-position-of-to-the-top-of-the-paper-in-pyqt5/</link><description>When you're building a PyQt5 application that displays information &amp;mdash; student records, reports, invoices &amp;mdash; you'll often want to export that content to PDF. PyQt5 makes this possible by using &lt;code&gt;QPrinter&lt;/code&gt; and &lt;code&gt;QPainter&lt;/code&gt; to render any &lt;code&gt;QWidget&lt;/code&gt; directly onto a virtual "page." The tricky part is controlling &lt;em&gt;where&lt;/em&gt; the widget appears on that page.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Martin Fitzpatrick</dc:creator><pubDate>Sun, 05 Jul 2020 09:00:00 +0000</pubDate><guid>tag:www.pythonguis.com,2020-07-05:/faq/exporting-widgets-and-setting-the-position-of-to-the-top-of-the-paper-in-pyqt5/</guid><category>pyqt5</category><category>pdf</category><category>qprinter</category><category>qpainter</category><category>widget</category><category>export</category><category>printing</category><category>python</category><category>qt</category><category>qt5</category></item></channel></rss>