Bug 185296

Summary: okular sends A4 to the printer as paper size
Product: [Applications] okular Reporter: reflection
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED UPSTREAM    
Severity: normal CC: bouf10pub, cfigura77, gtwilliams, howell, luigi.toscano, merrill, neitzke, nyanpasu64, paul, pgnet.dev+kde, polet82, prof.fmpaiva, r-kde, rdieter, whynot
Priority: NOR    
Version: 1.9.3   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description reflection 2009-02-23 04:31:18 UTC
Version:            (using KDE 4.2.0)
OS:                Linux
Installed from:    Ubuntu Packages

This is a widespread defect in Okular. For a complete description please consult the variety of complaints on mailing lists across the internet:

http://www.google.com/search?q=okular+a4

Okular ignores the print settings you specify and ignores the cups settings. It prints to A4 paper no matter what. It also doesn't print double sided. You can specify whatever you want - it's printing single-sided A4.
Comment 1 Pino Toscano 2009-02-23 10:19:54 UTC
(In reply to comment #0)
> This is a widespread defect in Okular. For a complete description please
> consult the variety of complaints on mailing lists across the internet:

As you are pening a bug report, you should tell what is the problem.

For example, your report is not clear at all about the real problem:
a) you cannot change the *default* paper size? (like your "useful" Google search would suggest)
b) even if you change the paper size, it is always seen as A4? (like your seem to implying)

Also, please don't mix different problems in the same bug reports.
Comment 2 reflection 2009-02-23 18:59:37 UTC
The bug report is clear. Your complaints about it are invalid.
Comment 3 Pino Toscano 2009-02-23 19:04:56 UTC
And I'm asking you to make it even more clear, given that it is seems a rant/mixup of various problems.
Comment 4 reflection 2009-02-23 19:07:33 UTC
I see why you are complaining about my perfectly valid bug report. The first google result for this bug is a bug report filed on the exact same issue. In that report you commented that there is nothing that can be done about it from Okular's position and that the fault lies with Qt.
Comment 5 reflection 2009-02-23 19:09:30 UTC
I did not mix issues. I believe you are claiming that "okular doesn't print double sided" and "okular only prints to A4 paper" are separate issues. That is false - they are the same issue.
Comment 6 reflection 2009-02-23 19:10:48 UTC
"When trying to print any PDF file from Okular, it defaults to A4 paper, which
my printer won't print, even though I have it set to 'US Letter' in the systems
settings.  Other applications seem to print fine (IE: Open Office).  I can go
into the printer properties and change it to Letter, and it prints fine for
that job, but the next print will default back to A4."

http://mail.kde.org/pipermail/okular-devel/2008-November/002025.html
Comment 7 reflection 2009-02-23 19:11:38 UTC
"When trying to print a PDF file, printer settings for Okular are "stuck" at A4.
 Cannot find way to change default to US Letter.  I did find the method to
change the print size for a individual file when requesting to print, however
even though I am able to change to US Letter size, when the file is printed,
the instructions to the printer are A4, e.g. I get a message on the printer to
load A4 paper."

http://mail.kde.org/pipermail/okular-devel/2009-January/002621.html
Comment 8 reflection 2009-02-23 19:12:30 UTC
"How do I change the default page size in Okular. The default is always A4. I want letter.

I've been able to change the page size manually using the "Properties" box in the print pop-up window. I'd like to make it the default, but I cannot find a configuration file to make the adjustment. 

The Okular manual does not cover this, and I searched KDE.org and the web without any luck."

http://forums.pcbsd.org/viewtopic.php?f=1&p=79586
Comment 9 reflection 2009-02-23 19:13:24 UTC
"Hi. I have Kubuntu 8.10, an Epson R265 printer and using Okular for PDF's. I only use A5 paper size and although i can select this in the Okular printer options, it always prints out at A4. Checking the Okular properties shows that Okular's print paper size is back at the A4 default. I have no problems with using 'Document Viewer', but would like to use Okular."

https://answers.launchpad.net/ubuntu/+question/49912
Comment 10 reflection 2009-02-23 19:14:28 UTC
"Whenever I load up a PDF, it wants to print to A4, instead of Letter size paper, which gives my printer fits...is there a way to change the default?  I haven't found one...thanks!"

http://kubuntuforums.net/forums/index.php?topic=3098808.0
Comment 11 reflection 2009-02-23 19:15:21 UTC
"If I'm reading a pdf in okular that is formatted on letter size pages, 
and I wish to print a page, I click on File, then Print to bring up a 
print popup. I select the printer I want, check that its properties are 
set to Letter size paper, and submit the print job.  But when it gets to 
the printer, it is set to print on A4 paper.  I can't find where I can 
override this.  Can anyone tell me how to get okular to print on Letter 
size paper? "

http://groups.google.com/group/comp.windows.x.kde/browse_thread/thread/20576b68aeb3cce3?pli=1
Comment 12 reflection 2009-02-23 19:16:28 UTC
"There is one question I haven't found an answer to: 
okular prints to A4 paper even when the "Properties" 
panel of the print dialog says "US Letter". 

The print preview also shows the pages as A4 
even though they are displayed correctly as letter 
on the main screen. 

I went to Google and found a lot of posts talking about 
similar-sounding issues.  But, I don't still know what's 
the conclusion.  Some say it's a bug in KDE 4.x, some 
say it's a bug in Qt, and yet others say it's a bug in 
okular. 

I'm using the testing distribution of Debian. (That means 
it's KDE 3.9.10 ?) 
 "

http://www.nabble.com/replacement-for-kpdf-for-kde-4.X--td21898647.html
Comment 13 Pino Toscano 2009-02-23 19:18:58 UTC
Please STOP the flood, this is of no help.

There are three issues mixed in this bug report:
a) the default paper size does not respect the KDE settings
   -> Qt problem, as Qt does not read KDE configuration about it
b) you choose some paper size in the printing dialog, and instead something A4-sized is sent to the printer
   -> this is mostly likely an Okular problem, and I would like to hear more about it
c) duplex printing is not working
   -> this is a *different* issue, and called bug #175276

But please, *STOP* the flood and just reply to what is your case.
Comment 14 Paul Cullum 2009-03-06 16:08:29 UTC
Maybe I can narrow it down.

My default settings are for Letter sized paper.  If I print 1 page of a PDF from Okular my printer tells me I need to load A4 paper.

I have Kubuntu 8.10 and KDE 4.2 from intrepid-backports.

Just for curiosity's sake I installed Jaunty Alpha 5 with all updates in VirtualBox and the same thing still happens there.

That is also KDE 4.2 but with qt 4.5.0.

To summarize... the problem is option b.

 "b) you choose some paper size in the printing dialog, and instead something
A4-sized is sent to the printer
   -> this is mostly likely an Okular problem, and I would like to hear more
about it"
Comment 15 Paul Cullum 2009-03-06 16:26:12 UTC
I'll be more specific with my versions.
Intrepid:
okular         4:4.2.0-0ubuntu1~intrepid1  (version 0.8)
libqt4-core    4.4.3-0ubuntu1.2

Jaunty:
okular          4:4.2.1-0ubuntu1  (version 0.8.1)
libqt4-core     4.5.0-0ubuntu1 

Now this bug is pretty much the same bug as bug 180280 which was resolved as a duplicate of bug 177360.  Bug 180280 also claims the fix is upstream and will be available in 4.2 and QT 4.5.

It's either not fixed or the fix hasn't made it to the current versions in Jaunty.
Comment 16 pgnet 2009-03-28 16:25:48 UTC
(In reply to comment #15)
> My default settings are for Letter sized paper.  If I print 1 page of a PDF
> from Okular my printer tells me I need to load A4 paper.
...
> It's either not fixed or the fix hasn't made it to the current versions in
> Jaunty.

i'm seeing exactly the same behavior on openSUSE 11.1, with KDE sourced from the KDE 'Factory' repo mix:

 .../KDE:/KDE4:/Community/openSUSE_11.1_KDE4_Factory_Desktop/
 .../KDE:/KDE4:/Factory:/Desktop/openSUSE_11.1/
 .../KDE:/KDE4:/Factory:/Extra-Apps/openSUSE_11.1/
 .../KDE:/Qt/openSUSE_11.1

including, in particular,

	kde4-okular-4.2.1-83.1
	libqt4-4.5.0-43.1

which, as mentioned above, doesn't look 'fixed' :-/
Comment 17 reflection 2009-05-23 19:38:27 UTC
Still experiencing this bug on a fully updated Jaunty Jackal.  It would be nice if someone besides Pino Toscano could look at this bug as he was clearly not willing to take it seriously.
Comment 18 Pino Toscano 2009-05-23 19:44:41 UTC
(In reply to comment #17)
> It would be nice if someone besides Pino Toscano could look at this bug as he
> was clearly not willing to take it seriously.

It would be nice if you would avoid this kind of sarcasm, totally out of the place here.
I _am_ trying few solutions, but the actual testing is not totally depending on me.

(and no need to CC me, I am reading Okular's bug reports.)
Comment 19 pgnet 2009-05-23 19:54:25 UTC
fwiw, on openSUSE 11.1, with

 okular -version
  Qt: 4.5.1
  KDE: 4.2.86 (KDE 4.2.86 (KDE 4.3 >= 20090514)) "release 126"
  Okular: 0.8.80

 kde4-okular-4.2.85-96.1
 libqt4-4.5.1-44.1

it seems to be 'behaving itself' ... last several printouts did NOT require A4, correctly using specififed 'Letter' size paper.
Comment 20 Brad Hards 2009-05-24 04:06:48 UTC
> It would be nice if someone besides Pino Toscano could look at this bug as he
> was clearly not willing to take it seriously.

I might, but I don't care to volunteer my time for problems where the user is offensive to developers.

Brad
Comment 21 reflection 2009-05-24 04:12:52 UTC
I've uninstalled Okular from our entire department and I suggest that others who experience this bug do the same. The Okular devs are clearly in this game for the wrong reasons. Anyone who experiences the bug recognizes instantly that the first bug report, or any of the other bug reports that I pasted here, were totally sufficient in order to reproduce and needed no further explanation. The only possible motivation for getting uptight is that the devs needed a scapegoat for unrelated issues and decided that their semi-anonymous users, who they can't possibly conceive of as FOSS developers themselves, would be too naive to notice.

An excellent replacement for Okular is the acroread package from medibuntu. It's proprietary but interfaces well with lp. You can also use lp directly of course.
Comment 22 Albert Astals Cid 2009-05-24 21:03:26 UTC
Do you think that you punish okular developers by not using okular?
Do you think that writing agressive/offensive statements against fellow developers will make some other developer more willing to work on your bug?
Do you think your bug must be where we should focus because are other bugs are clearly less important?
Do you think that free and non free are the same?

No need for any answer, these are just rethorical questions.
Comment 23 Hannes Schniepp 2009-06-03 17:00:39 UTC
I think I have an interesting detail to add to the existing reports (including a workaround): 

I have set "Letter" in the KDE systemsettings. When I open the print dialog in Okular and click on "Properties", it shows correctly "Letter". However it does send something in A4 to the printer. This part is probably known. 

Here comes my new detail/workaround: Step1) I select "A5" (or any other paper size) in the properties dialog and close it. Step2) I reopen the properties dialog (it remembers correctly my "A5" setting). Now, I set it back to "Letter" and close the properties dialog. If I print now, pages are sent correctly to the printer in "Letter" format. 

Hope this helps the issue.
Comment 24 Pino Toscano 2009-06-03 17:16:31 UTC
SVN commit 977210 by pino:

try to skip one level of printing redirection madness, let's see how it behaves in 4.3beta2
CCBUG: 185296


 M  +5 -0      generator_pdf.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=977210
Comment 25 Pino Toscano 2009-06-03 17:19:08 UTC
First, let's give this bug a better title, provided the problem is clear.
KDe 4.3 beta2 will be out next week, so who has this problem and can test this new beta, any new feedback is appreciated (even because I was not able to reproduce, and my testers gave no feedback....). Thanks.
Comment 26 Hannes Schniepp 2009-08-10 15:49:38 UTC
I am not an expert in KDE bug reporting. 
Why is this bug "unconfirmed"? What does it take to confirm? 
I am suffering from this problem every day, all the way from KDE 4.2 to KDE 4.3 beta1/beta2/rc1/rc2/rc3/final. 
What can I do to work towards a solution?
Comment 27 Rex Dieter 2009-08-10 16:04:20 UTC
confirmed, tested qt-4.5.2/kde-4.3.0 stack here.
Comment 28 Garry Williams 2009-10-21 20:42:37 UTC
okular sends A4 to my printer if I enter <ctrl>p<enter>

okular sends Letter to my printer if I enter <ctrl>p then click Properties then click OK then click Print.  (When the Properties dialog box displays, it shows my System Settings of paper size 8.5 x 11.)

I have confirmed this bug in Kmail, too.

Fedora 11
KDE 4.3.2
Kmail 1.12.2
okular 0.9.2
qt 4.5.2


qt-4.5.2-3.fc11.i586
kdepim-4.3.2-1.fc11.i586
kdepim-libs-4.3.2-1.fc11.i586
kdepim-runtime-4.3.2-1.fc11.i586
kdepim-runtime-libs-4.3.2-1.fc11.i586
kdegraphics-4.3.2-3.fc11.i586
Comment 29 F Bourbonnais 2009-10-21 21:03:37 UTC
(In reply to comment #23)
> I think I have an interesting detail to add to the existing reports (including
> a workaround): 

The bug is still present with Ubuntu 9.04 and KDE 4.3.2. This workaround is also working for me but is annoying.

So the bug seems to be with the initial/default value for the paper size used by the printing assistant. It shows "Letter US" but in fact A4 is used. But if we changed the configuration back to "Letter US" using printing properties dialog, the paper size seems to be correctly reset in that case.

I found that bug also in at least one other KDE application. So maybe it's not a bug specific to Okular but I don't know where to report it: kdeprint (it doesn't seem to exist anymore ?), QT, ... ?
Comment 30 Paul Cullum 2009-10-23 21:22:08 UTC
I just upgraded to 9.10 RC and this bug is still present.  

KDE 4.3.2
Okular 0.9.2
Comment 31 Dmitriy 2009-11-27 06:39:01 UTC
Same story here with my Mandriva 2010:
Qt: 4.5.3
KDE: 4.3.2

I don't think it is a problem of Okular, as KWrite has the same problem (and uses the same printing dialog). Printer asks for A4 paper, while page size is set to Letter in print properties.
No problem with printing from OpenOffice or printing a test page.
Comment 32 Dmitriy 2009-11-27 07:06:32 UTC
I think this bug is closely related to "Duplex printing not working" bug here:
https://bugs.kde.org/show_bug.cgi?id=175276

and it sounds more like a QT problem I've seen mentioned here: "the printing dialog does not query CUPS":
http://bugreports.qt.nokia.com/browse/QTBUG-6239

the workaround so far is to change the property to something else, then to change it back to what you want.
Comment 33 Albert Astals Cid 2009-12-02 18:42:31 UTC
I'm closing the bug as upstream, as Dmitriy says it is either

http://bugreports.qt.nokia.com/browse/QTBUG-6239
or
http://bugreports.qt.nokia.com/browse/QTBUG-6468
Comment 34 Albert Astals Cid 2009-12-02 18:56:15 UTC
http://bugreports.qt.nokia.com/browse/QTBUG-6471 is another possibility
Comment 35 Garry Williams 2010-04-14 17:32:56 UTC
(In reply to comment #28)
> okular sends A4 to my printer if I enter <ctrl>p<enter>

> okular sends Letter to my printer if I enter <ctrl>p then click
> Properties then click OK then click Print.  (When the Properties
> dialog box displays, it shows my System Settings of paper size
> 8.5 x 11.)

> I have confirmed this bug in Kmail, too.

This problem still persists.  I now reproduce the problem with:

kdelibs-4.4.2-1.fc12.x86_64
kdepim-4.4.2-1.fc12.x86_64
qt-4.6.2-8.fc12.x86_64
kdegraphics-4.4.2-3.fc12.x86_64
Comment 36 Paul Cullum 2010-04-14 18:23:03 UTC
Look at http://bugreports.qt.nokia.com/browse/QTBUG-6471

It should be fixed in QT as of 4.6.3 which you probably aren't using since it hasn't been released yet.

My hope was that 4.6.3 would be out in time to make it into Lucid but it doesn't look like that will happen.

It is amazing that it took so many bug reports across so many bug trackers before it was really acknowledged that there a real problem and that problem was actually identified and found... not to mention fixed.

Printing print jobs with Letter as a default from KDE applications has never worked properly since the KDE4 changes.  That was more than 2 years ago.

With respect to this issue being marked resolved, it would seem prudent to only mark a bug as resolved after the bug has been verified to not exist any more.

Has anyone actually tested KDE with the fixes from QT 4.6.3 to make sure that it does work as expected?
Comment 37 pgnet 2010-04-15 16:21:53 UTC
(In reply to comment #36)
> Has anyone actually tested KDE with the fixes from QT 4.6.3 to make sure that
> it does work as expected?

not sure what you mean by "tested KDE", but, it works as expected with printing from-distro packages for any/all I've tried.  e.g. with okular,

lsb_release -a
 LSB Version:    core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch
 Distributor ID: SUSE LINUX
 Description:    openSUSE 11.2 (x86_64)
 Release:        11.2
 Codename:       n/a

rpm -qa | egrep -i "okular|libqt4-4|kdebase4-runtime-4"
 kdebase4-runtime-4.4.2-198.7.x86_64
 libqt4-4.6.3+4.6.20100413-1.1.x86_64
 okular-4.4.2-156.11.x86_64

okular --version
 Qt: 4.6.3
 KDE Development Platform: 4.4.2 (KDE 4.4.2) "release 240"
 Okular: 0.10.2


all's well.
Comment 38 Hannes Schniepp 2010-04-15 18:51:23 UTC
pgnet: 

Probably what Paul means is if anybody has KDE that is compiled with Qt 4.6.3. For you, that seems to be the case, which is good for you. It's also good to hear that the problem is now fixed. 
I, on the other hand, am using kubuntu lucid beta2, and there it's still 4.6.2, and the bug still present :(
Comment 39 Garry Williams 2010-04-19 14:21:18 UTC
qt-4.6.2-14.fc12.x86_64 (Fedora's version of Qt 4.6.3) fixes this problem for me.
Comment 40 Charlie Figura 2010-05-10 16:59:12 UTC
Does the 'resolved' status mean that this will NOT be fixed for those of us (which is pretty much everyone) using Qt 4.6.2?
Comment 41 Albert Astals Cid 2010-05-10 17:05:08 UTC
This bug is resolved because it is not okular fault. It is upstream (Qt) fault. And obviously you have to update Qt to get Qt bug fixes.
Comment 42 Charlie Figura 2010-05-10 23:00:14 UTC
@Albert - thanks, I understand.  And while I have no problem upgrading for bug fixes, I'm wondering if there's going to be a 4.6.2 bug fix update, or if I just have to wait until Ubuntu decides to upgrade to 4.6.3.

In any case, as you say, it's not okular's problem, it's Qt's.
Comment 43 Russell W. Howell 2010-06-16 22:57:29 UTC
I don't think the problem is resolved in Qt 4.6.3.  My office and home machines both run on Kubuntu 10.04 with Qt 4.6.3.  Both have identical software installed in other respects.  My home machine prints (usb) a dvi file from Okular to a Canon Pixma 4200 just fine.  My office machine prints (network) to an HP 4200, but the same dvi file prints from Okular as A4.  Both printers are set up for letter.
Comment 44 Filipe 2014-11-19 08:33:24 UTC
I have similar problem. On one of my computers (the new one)  okular prints only in letter size, on the other (the old one) it prints only in A4 size.  I found no way to change it manually. Both computers are with opensuse 13.1, KDE 4.11.5 and Okular 0.17.5.
Comment 45 nyanpasu64 2018-10-16 00:38:13 UTC
Still broken on Okular 1.3.3 on Kubuntu 18.04, KDE Plasma 5.12.6, Qt 5.9.5.

Clicking Properties, switching to Letter, and printing does not get saved as defaults (next Ctrl+P is again A4).

Cannot test Flatpak Okular, it does not see my printers.
Comment 46 Luigi Toscano 2018-10-16 08:25:11 UTC
(In reply to jimbo1qaz from comment #45)
> Still broken on Okular 1.3.3 on Kubuntu 18.04, KDE Plasma 5.12.6, Qt 5.9.5.
> 
> Clicking Properties, switching to Letter, and printing does not get saved as
> defaults (next Ctrl+P is again A4).
> 
> Cannot test Flatpak Okular, it does not see my printers.

This bug was mostly focused on the version of Okular based on Qt 4. Things changed since then, there have been other issues which were tracked on other bugs. Also, please note that the printing support depends on Qt and various issues has been solved starting from Qt 5.11, and others in the yet-to-be released Qt 5.12.
I'm thus going to keep this specific bug closed. Please retest with a newer Qt has soon as you can, and in any case please refer to newer bugs for this kind of issues.
Comment 47 Merrill Holt 2020-04-19 00:07:05 UTC
This is still a problem in Kubuntu 19.10
Operating System: Kubuntu 19.10
KDE Plasma Version: 5.18.3
KDE Frameworks Version: 5.67.0
Qt Version: 5.12.4
Kernel Version: 5.3.0-46-generic
OS Type: 64-bit

Printer paper size set to letter. Size sent to printer is A4. It is unbelievable to me that this problem has been going on for years with no fix.
Comment 48 Luigi Toscano 2020-04-19 10:11:50 UTC
The problem originally reported in this bug was fixed. Please check my previous comment (#c46) which still applies. The printing technology used in Qt5 is completely different and in fact other issues have been found, but they are unrelated to this specific bug which shall stay closed.

For an example of newer issues, you can see for example:
https://bugs.kde.org/show_bug.cgi?id=389953
Please note that many of them are solved. In some cases they are not Okular-specific.
Does the issue apply to other Qt5 programs (i.e. kate or others)? If it does, the issue is not in Okular. It may be in Qt or in the cups/PPD configuration.