Red Hat Bugzilla – Bug 204621
"GtkPrint" asks for "Letter" size paper when "A4" size was chosen
Last modified: 2008-06-16 23:27:13 EDT
Description of problem:
For current "evince-0.5.5-2.fc6", the attached "HP LaserJet 4100"
does not print "PDF" documents. Instead, a red warning light is
flashing, and the printer asks to "load plain letter". However,
default paper size is "A4".
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Open document with "evince" document viewer.
2. Print document.
No document is printed. The printer asks to load plain letter paper.
The document is printed without prompting the user.
Printing from "gedit" which uses the standard "GNOME" printing dialog
works flawlessly. This rules out a "CUPS" problem such as the one
reported in bug 191601. The "evince" document viewer has adopted a
different printing dialog, apparently the "GtKPrint" one as the
application changelog indicates. As matter of fact, in this dialog
neither the current paper size is displayed nor can it be modified.
I have rebuilt "evince-0.5.5-2.fc6" with option "--with-print=gnome".
Now, the standard "GNOME" printing dialog is used, and documents
get printed instantaneously without prompting the user for letter
size paper as in my initial report. It seems that the issue definitely
stems from the stock "GTK" printing interface.
There is no option in the spec file which sets the printer interface
type explicitly to one of "no/gtk/gnome", and thus "evince" seems to
somehow pick up the "gtk" one.
A quick fix would be to add "--with-print=gnome" to the build options.
After a fresh install from the "rawhide" tree including new upstream
"evince-0.6.0-1.fc6", printing works again correctly.
(In reply to comment #2)
Sorry for the "bad news" but although my first observation was for
real although based on a modest single printout, it has turned out
in the meantime that "evince-0.6.0-1.fc6" is actually still afflicted
by the issue described above. :(
Btw, it appears that "epiphany-2.16.0-1.fc6" also uses the "GtkPrint"
backend and as such gives me the same headache. Unlike the "evince"
case, here at least, one as an additional "Print Setup..." dialog
which allows to set the actually employed paper size.
However, regardless of all installed printers having paper size set
to "A4", the initial paper size displayed in the setup window is
"letter" which seems to indicate that "GtkPrint" does not actually
look up the paper size settings correctly.
Created attachment 137325 [details]
I dunno about that patch. I'm slighly worried that a GtkPageSetup object will be
returned from the page setup dialog, and the app scales its output to the size
the page setup object lists, but then the printer picks a different print size
at the end.
Can we not store this state on a later object in the print operation. Like if
you don't set a page setup object on the print operation or something like that.
I haven't tried out the patch yet, but what about telling the "configure"
script to use the "GNOME" printing backend instead? As far as I can see
from the spec file, the "GTK" printing backend hadn't been chosen
deliberately but rather picked up by "configure" since no other had been
chosen explicitly. In the past it seems to have defaulted to the "GNOME"
I have discussed this with alex a bit more, and these were the outcomes:
- we should have gtk_printer_get_default_paper_size() or similar to
obtain the ppd default
- the cups function which my patch touched needs to at least check that
the default it sets is actually an allowed value
- the page setup dialog should select the default paper size for a printer
when selecting a different printer from the list, only the generic entry
should use the locale-derived default
- if no explicit page setup has been set on a print dialog, selecting
a different printer should change the paper size to the default paper
size of the printer
Created attachment 137426 [details]
Here is a patch which tries to implement most of these things.
Created attachment 137471 [details]
Fedoradized version of patch from comment #8
Hm, unless I have committed some stupid mistake myself, it seems that
the patch from comment #8 does not really do the job as expected.
After rebuilding "gtk2-2.10.4-2.fc6" with the attached patch, "evince"
and "epiphany" still request letter size paper. I had removed all dot
directories before to get rid of previous settings. The "epiphany"
printing settings show paper size "letter" by default which can be set
to "A4" by the user, and indeed after that, it prints correctly.
I also have to add that "evince" behaves differently depending on the
"PDF" file actually in use. It seems that the paper size extracted
from the "PDF" file overrules the default paper size set for the
printer. I have both "PDF" files which either print out directly or
trigger the request for letter size paper although the printer device
is the same in both cases. Shouldn't the paper size associated with
the printer have priority in this case?
Created attachment 156995 [details]
Default print settings in "evince" using the "GtkPrint" dialog
This is what one sees when opening a "PDF" file. The paper
setting is "US Letter", even upon repeated launches of "evince".
The paper size preference thus is not stored somewhere.
Unless one sets the size to "A4" manually and everytime, the
printer whose default paper size is "A4" will refuse to print
and prompt the user to load "US Letter" size paper.
(In reply to comment #11)
This applies to current "F7" featuring:
Setting "LC_PAPER" to "de_DE.UTF-8" in my shell configuration file actually
allows to obtain the desired behaviour of "GNOME" applications defaulting
to the correct default paper size "A4".
Otherwise, still no improvement for the current "rawhide" selection:
"GtkPrint" needs to check the paper size of the chosen printer and adopt
it in the "Print Settings..." panel. Ideally, it would further modify it
according to the print device chosen by means of the "Format for:"
drop-menu button. One would also expect that the value of the latter is
somehow memorized after being initially set to the system default printer
instead of "Any Printer" and modified by the user.
Btw, why is the "Print Settings..." subwindow titled "Page Setup"? This
seems to be a bug, too ..
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
Patch has been committed upstream
I committed fix to F9 CVS. Its release is gtk2-2.12.10-4.
Thank you for reporting this bug
It would be much better to have "Page Setup" display the default
printer. Currently, it shows "Any Printer". Otherwise, e.g. when
altering the orientation, one has to choose the default printer
first which is more awkward. Should this be filed as an RFE?
fill this as feature request in upstream bugzilla please.
gtk2-2.12.10-5.fc9 has been submitted as an update for Fedora 9