Bug 177000

Summary: Does not use correct paper size as default in dialog.
Product: [Unmaintained] kdelibs Reporter: doc.evans
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: jlayt, tyrerj
Priority: NOR    
Version: SVN   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description doc.evans 2008-12-05 18:07:24 UTC
Version:            (using KDE 4.1.3)
OS:                Linux
Installed from:    Ubuntu Packages

In my system settings, the default paper size is set as US Letter.

However, when I go to print a document, okular seems to believe that my default paper size is A4.

(See also the possibly-related bug 176999.)
Comment 1 Albert Astals Cid 2008-12-08 17:45:16 UTC
Where did you in systemsettings set the paper size?
Comment 2 doc.evans 2008-12-08 19:14:00 UTC
K Menu | System Settings | Regional & Language | Other | Paper Format

All other KDE programs seem to honour that setting.

Comment 3 Pino Toscano 2008-12-14 15:28:20 UTC
The printing dialog is provided by Qt, so hardly can follow KDE settings.
Comment 4 John Layt 2008-12-14 16:55:18 UTC
Could you explain the problem a little more?  Is it that the Print Dialog defaults to A4, or that Okular tries to print the document with a page size of A4 despite the dialog saying Letter?

1) Do you have the printers default Paper Size in CUPS set to A4 or Letter?

2) When printing in Okular in the Print Dialog in Properties, what does the Paper Size show as in both the Page and Advanced tabs?  Letter or A4?

3) If printing a plain text document from kwrite, or a webpage from konqueror, what paper size does the Print Dialog show in Properties? Letter or A4?
Comment 5 doc.evans 2008-12-15 00:34:11 UTC
(In reply to comment #3)
> The printing dialog is provided by Qt, so hardly can follow KDE settings.
> 

As a user, I don't care where the dialog comes from. If okular, an avowedly KDE program) doesn't follow my system-wide KDE settings, it's a bug. The paper size is something one almost never looks at before printing (especially since it's not presented by default when one goes to print); it's extremely annoying that it prints by default at an incorrect size.

Also,  Konqueror, for example (and, as I mentioned, every other program I've tried to print from in KDE4) follows the KDE setting. I don't understand why okular has to be different.

Comment 6 doc.evans 2008-12-15 05:04:28 UTC
(In reply to comment #4)
> Could you explain the problem a little more?  Is it that the Print Dialog
> defaults to A4, or that Okular tries to print the document with a page size of
> A4 despite the dialog saying Letter?

The former.

> 
> 1) Do you have the printers default Paper Size in CUPS set to A4 or Letter?
> 

Letter.

> 2) When printing in Okular in the Print Dialog in Properties, what does the
> Paper Size show as in both the Page and Advanced tabs?  Letter or A4?
> 

A4. That's the bug.

> 3) If printing a plain text document from kwrite, or a webpage from konqueror,
> what paper size does the Print Dialog show in Properties? Letter or A4?
> 

Letter.

Comment 7 John Layt 2008-12-16 23:29:23 UTC
OK, I have recreated the problem, and it is actually a symptom of bug https://bugs.kde.org/show_bug.cgi?id=177360, the original reporter mentions that this is an issue for him too.  Qt have an issue raised in the tracker linking back to 177360, so we'll deal with it there.

*** This bug has been marked as a duplicate of bug 177360 ***
Comment 8 James Richard Tyrer 2009-02-07 23:57:44 UTC
HELLO!  This still doesn't work.

Re: Comment #3

http://doc.trolltech.com/4.4/qprinter.html#setPaperSize

"This function is useful mostly for setting a default value that the user can override in the print dialog."

"kdeglobals":

[Locale]
Country=<country>

I presume that KDE libs can come up with a default paper size from this since the KCM does.

Comment 9 John Layt 2009-02-08 23:56:46 UTC
No, this does work with Qt 4.4.4, as noted above this particular issue as reported by the user was due to the Qt bug.  This has been confirmed as resolved by the users in the original bug report.

If you mean that the Print Dialog does not default to what is set in the Locale KCM then this is deliberate and correct behaviour, the dialog defaults to what the printer default is set to in CUPS or lp.  You can set the Locale default to A4 and make the dialog default to this all you like, but if the printer only has foolscap paper then it's not much good.  We will continue to default to the current CUPS default as chosen by the user as being the correct option.

*** This bug has been marked as a duplicate of bug 177360 ***
Comment 10 James Richard Tyrer 2009-02-09 01:21:27 UTC
Re: Comment #9

You are partially correct.  The default for the selected printer should override the default for the locale.  However, that applies only to printers that are actual physical devices.  The default for PS and PDF should still be what was set in the Locale KCM.
Comment 11 James Richard Tyrer 2009-02-09 02:02:54 UTC
This isn't really a duplicate -- this bug is only about the paper size issue (one bug per issue is easier to keep track of).  Slight adjustment to title.

However, I will presume that it has been fixed till I build TRUNK against the current QT-COPY (923321) and see if it works correctly.
Comment 12 James Richard Tyrer 2009-02-12 00:21:11 UTC
I have now built KDE TRUNK (924584) against the updated Qt-COPY, and it didn't fix the problem.

This doesn't work.  Perhaps it works with CUPS but that would still be a bug since it doesn't work with LPR.  I agree with #5 that #3 is irrelevant.  This needs to work correctly.  The default should be what is set in System Settings and for printers that are physical devices, that default should be overridden by the default setting for the printer (if any).

Since this is not really a duplicate, I am reopening it.
Comment 13 John Layt 2009-02-12 23:08:59 UTC
James, please stop re-opening THIS bug.  THIS bug was a symptom of the problem described in 117360 and was not the issue you want addressed.  THIS bug was resolved by the resolution to bug 117360.  Please open a new bug for the other issue, where we can continue this 'discussion'.

Note: mistype by me above, original issue worked around in Okular in KDE 4.1.4 and 4.2, will be properly resolved in Qt 4.5.

*** This bug has been marked as a duplicate of bug 117360 ***
Comment 14 James Richard Tyrer 2009-02-13 00:03:20 UTC
This bug has not been fixed.  See bug 184188
Comment 15 John Layt 2009-02-13 00:31:42 UTC
Correct the duplicate bug number.

*** This bug has been marked as a duplicate of bug 177360 ***
Comment 16 James Richard Tyrer 2009-02-20 10:08:30 UTC
Re: Comment #15:

Thank you.  Perhaps this might explain why I was a bit confused. :-)