Mar-12-2024, 07:45 PM
(Mar-12-2024, 05:24 PM)deanhystad Wrote:printer.setPageMargins(5, 5, 5, 5, QPrinter.Millimeters)I'm not sure about the units for the margins. 5mm is a bit small but 5 Inch is way too big.
Thanks for pointing into the right direction. This is how it works:
printer.setPageMargins(QMarginsF(0, 0, 5, 5), QPageLayout.Unit.Millimeter)