GNOME Bugzilla – Bug 541168
Printing Scales Incorrectly?
Last modified: 2008-07-04 19:12:02 UTC
I ran across the bug: https://bugs.launchpad.net/ubuntu/+source/epiphany-browser/+bug/217151/ and did a little bit of digging, and I think there's an issue with the way gtk_print_settings_set_scale works in embed/mozilla/GeckoPrintService.cpp Line 737-739 states: /* FIXME: only if GTK_PRINT_CAPABILITY_SCALE is not set? */ aSettings->SetScaling (gtk_print_settings_get_scale (aGtkSettings) / 100.0); gtk_print_settings_set_scale (aGtkSettings, 1.0); But, http://library.gnome.org/devel/gtk/unstable/GtkPrintSettings.html#gtk-print-settings-set-scale states: " scale : the scale in percent " So, doesn't that mean: gtk_print_settings_set_scale (aGtkSettings, 1.0); should be: gtk_print_settings_set_scale (aGtkSettings, 100.0); Which fixes the bug for me, and makes pages in Epiphany print the same as they would in Firefox.
Created attachment 113829 [details] [review] Patch fixing the bug Changes 1.0 to 100.0, which makes Scale read 100% (and work) in the Print Preview Dialogue.
This looks fine to me, except that I don't think the change is worth a comment in the source code. Anyway, let's wait for Christian's ACK on the patch :)
Right, no need for the comment. Please commit to the gnome-2-22 branch.
Paul, thanks for the patch. I committed it, closing as FIXED. ------------------------------------------------------------------------ r8330 | cosimoc | 2008-07-02 18:08:55 +0200 (Wed, 02 Jul 2008) | 3 lines Use percentage instead of value when calling gtk_print_settings_set_scale. Patch by Paul Drain. (#541168).
*** Bug 541580 has been marked as a duplicate of this bug. ***