This explains the inconsistent results I kept getting in #332331. If print is pressed within the print dialog, without opening the printer "properties" dialog and accepting it, the margins default to 10pt on each side instead of respecting the printer's default margins. If print is pressed first, here is what's sent to CUPS: page-bottom=10 page-left=10 page-right=10 page-top=10 However if the properties dialog is opened and accepted, here is what is sent (the defaults for my printer): page-bottom=36 page-left=18 page-right=18 page-top=9 The offending function seems to be QPrinter::getPageMargins() on line 654 in core/fileprinter.cpp. That's a Qt function, so this could be a Qt bug, but I'm not sure if there's a way to work around it in Okular. Reproducible: Always Steps to Reproduce: 1. Print document without opening "Properties" 2. Observe 10pt margins sent to printer. 3. Print again after opening and accepting "Properties" 4. Observe printer default margins sent to printer. Actual Results: 10pt margins sent unless Properties dialog is accepted. Expected Results: Default printer margins are sent without having to open and accept Properties dialog.
Yes, it's a Qt bug and i don't think there's a way to workaround it sadly, when i get some time i'll try having a look. Thanks for caring about Okular :)
(In reply to comment #1) > Yes, it's a Qt bug and i don't think there's a way to workaround it sadly, > Indeed, see: https://bugreports.qt-project.org/browse/QTBUG-15351 and bug 198172 (ie this one is a dup)
I just had a short look and could not reproduce the issue. @pres1234: Does the problem still occur for you? If so, what Okular and Qt versions are you using?