<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>205802</bug_id>
          
          <creation_ts>2009-08-31 17:15:58 +0000</creation_ts>
          <short_desc>print margins are not remembered / not persistent</short_desc>
          <delta_ts>2014-04-29 08:33:56 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kate</product>
          <component>part</component>
          <version>unspecified</version>
          <rep_platform>Debian testing</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>198172</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>HI</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="haro">habista</reporter>
          <assigned_to name="KWrite Developers">kwrite-bugs-null</assigned_to>
          <cc>E.microcorys</cc>
    
    <cc>emilio.recio</cc>
    
    <cc>linux</cc>
    
    <cc>shaun.andrew</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>5</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>822146</commentid>
    <comment_count>0</comment_count>
    <who name="haro">habista</who>
    <bug_when>2009-08-31 17:15:58 +0000</bug_when>
    <thetext>Version:            (using KDE 4.3.0)
OS:                Linux
Installed from:    Debian testing/unstable Packages

In kWrite I can set margins for printed text: top, bottom, right, left.
To do this: file -&gt; print -&gt; properties -&gt; margins.
In earlier versions of kWrite there was a button &quot;ok&quot; to set these margins for the actual print-out, and in addition a button &quot;save&quot; (or: &quot;Speichern&quot;, &quot;store&quot;???), to set these margins permanently. This &apos;save-button&apos; is missing. So I have to set the margins every time I wish to print something.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>852316</commentid>
    <comment_count>1</comment_count>
    <who name="Martin Senftleben">linux</who>
    <bug_when>2009-10-29 05:51:01 +0000</bug_when>
    <thetext>I can confirm this particularly for KMail. Using KDE 4.3.1, Kontact 4.3.2. I have to print emails quite regularly, and every time, for every single printout, I have te set the margins new, otherwise the margins are too narrow. This is quite annoying.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1129484</commentid>
    <comment_count>2</comment_count>
    <who name="Tallowwood">E.microcorys</who>
    <bug_when>2011-06-10 08:54:43 +0000</bug_when>
    <thetext>Using Linux openSUSE 11.4 KDE 4.5 / 4.6. I can confirm this issue persists. 
Changing margin settings in KDE Print -&gt; Properties -&gt; margins is not persistent. Having to change 4 specific margin settings for each print job is quite frustrating and a big waste of time. The problem is reproducible in other KDE apps, including Konqueror, Kwrite, Kate and Kmail.

There is no obvious place for users to change default margins elsewhere. Entering specific margin settings with CUPS lpoptions command (~/.cups/lpotions) is not effective - default KDE margin settings continue to apply. I do not know how to enter specific margin settings for Qprinter.

When Kate / Kwrite is installed from openSUSE repos for KDE4 the default is 4.23mm all round. Saves paper but too narrow for my purpose. 
When Kate / Kwrite is installed from openSUSE repos for LXDE the default is 1in (T&amp;B), 1.25in (L&amp;R). More practical for my purpose. 

If this is not a bug, it would be helpful if directions could be provided to enable users to set alternate and persistent default margins.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1150941</commentid>
    <comment_count>3</comment_count>
    <who name="Dominik Haumann">dhaumann</who>
    <bug_when>2011-08-07 12:10:04 +0000</bug_when>
    <thetext>This is a huge issue in the Qt printing system.
Setting the margins with QPrinter::setPageMargins(...) does not have any effect on the QPrintDialog, although it operates on QPrinter.

I&apos;ve tried to work around the bugs in the QPrinter and QPrintDialog with setPageMargins() and getPageMargins() without any success. It first needs to be fixed in Qt.

Relevant links:
- https://bugs.kde.org/show_bug.cgi?id=256975
- https://bugreports.qt.nokia.com/browse/QTBUG-15351 (most important)
- http://bugs.kde.org/show_bug.cgi?id=180051

Chances that this gets fixed are low, unfortunately.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1150949</commentid>
    <comment_count>4</comment_count>
    <who name="Dominik Haumann">dhaumann</who>
    <bug_when>2011-08-07 12:30:51 +0000</bug_when>
    <thetext>Git commit 1aa12bace62fffbcad357623842a0fc01607b3c0 by Dominik Haumann.
Committed on 07/08/2011 at 14:26.
Pushed by dhaumann into branch &apos;master&apos;.

attempt to work around Qt printing bugs

NOTE: Saving &amp; loading the margins works around QPrinter/QPrintDialog bugs:
- https://bugreports.qt.nokia.com/browse/QTBUG-15351
- https://bugs.kde.org/show_bug.cgi?id=205802
- https://bugs.kde.org/show_bug.cgi?id=180051
Changing the margins now works. However, when you reopen the print dialog
later, the WRONG margins are displayed. The correct ones are still used.
This is a critical bug in Qt.

The real issue is Qt. And it&apos;s a critical one. But since it wasn&apos;t fixed for
years, it probably will never get fixed. That&apos;s why this workaround is better
than nothing...

CCBUG: 205802
CCBUG: 180051

M  +43   -1    part/utils/kateprinter.cpp
M  +2    -0    part/utils/kateprinter.h

http://commits.kde.org/kate/1aa12bace62fffbcad357623842a0fc01607b3c0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1150954</commentid>
    <comment_count>5</comment_count>
    <who name="Dominik Haumann">dhaumann</who>
    <bug_when>2011-08-07 12:34:57 +0000</bug_when>
    <thetext>Found a duplicate report in kdelibs. So close this. We cannot do more about it anyway.

*** This bug has been marked as a duplicate of bug 198172 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1196377</commentid>
    <comment_count>6</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2011-12-08 11:07:00 +0000</bug_when>
    <thetext>*** Bug 287864 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1444368</commentid>
    <comment_count>7</comment_count>
    <who name="Dominik Haumann">dhaumann</who>
    <bug_when>2014-04-29 08:33:56 +0000</bug_when>
    <thetext>For the record: This change-set was removed again in commit 
http://commits.kde.org/kate/7d598e1ad7531ceb90e0f98df4b13bfbc8300a5a
since this issue is fixed in Qt 5.0. Therefore, in Kate running on Qt5 and KDE Frameworks 5 (Plasma Next), this issue is cleanly resolved.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>