Default page size for printing is letter

Bug #10910 reported by Tollef Fog Heen
454
This bug affects 74 people
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Fix Released
Medium
firefox (Baltix)
Confirmed
Undecided
Unassigned
firefox (Ubuntu)
Triaged
Medium
Unassigned
Declined for Intrepid by Steve Langasek
Declined for Jaunty by Steve Langasek
thunderbird (Ubuntu)
Triaged
Medium
Unassigned
Declined for Intrepid by Steve Langasek
Declined for Jaunty by Steve Langasek

Bug Description

(Default warty install, dist-upgraded to hoary, language chosen is Norwegian)

about:config reports that print.postscript.paper_size is letter, which is wrong
for Norway, it should be A4. It should probably look at LC_PAPER or /etc/papersize

Revision history for this message
In , Bstell (bstell) wrote :

changed title from:

  Default printer settings set to US Letter and inches

to:

  Printer settings should default to appropiate values for the user

So what works these days?

  /etc/papersize

  LC_PAPER

  nl_langinfo(PAPER_HEIGHT) / nl_langinfo(PAPER_WIDTH)

  others?

Revision history for this message
In , Tetsuroy (tetsuroy) wrote :

assign to katakai-san.
please have a look. Thanks

Revision history for this message
In , Bugzilla-kl (bugzilla-kl) wrote :

what's the status of this?

Revision history for this message
In , Masaki (masaki-katakai) wrote :

I've started working on this.

Revision history for this message
Tollef Fog Heen (tfheen) wrote :

(Default warty install, dist-upgraded to hoary, language chosen is Norwegian)

about:config reports that print.postscript.paper_size is letter, which is wrong
for Norway, it should be A4. It should probably look at LC_PAPER or /etc/papersize

Revision history for this message
Thom May (thombot) wrote :
Revision history for this message
David Farning (dfarning) wrote :

still open upstream as an enhancement request.

Revision history for this message
Matthew Wright (matthew-wright2) wrote :

This effects all users outside of the United States. (The other

This has been open upstream for Years.. This is the #4 usability issue with Desktop linux in our organisation. (Which has 30 terminals, 10 permanents and 50 or so rotating people who use our system. For end users setting the paper size is a pain in the arse.

I emphasise it is very important to get this bug,, it is also

Revision history for this message
Matthew Wright (matthew-wright2) wrote :

Redhat bugs are
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=186735 FC5
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=133658 Devel

This is confirmed and really easy to confirm / reproduce, just set your locale to the UK and AU, then goto File Print in Firefox, also after you have set your print setting to A4 repeat process, it is back on Letter

The Firefox dialogue will never keep the A4 setting.

Revision history for this message
Alexandre Otto Strube (surak) wrote :

This is really a problem outside US. Perhaps the severity/priority should be changed.

Changed in firefox:
status: Unconfirmed → Confirmed
Changed in firefox:
status: Unconfirmed → Confirmed
Ian Jackson (ijackson)
Changed in firefox:
assignee: ijackson → nobody
Revision history for this message
In , Etienne Goyer (etienne-goyer-outlands) wrote :

This issue also affect Thunderbird 1.5.0.7 (tested on Ubuntu 6.10).

Revision history for this message
Etienne Goyer (etienne-goyer-outlands) wrote :

Changed upstream bug # to one that have been assigned and is being worked on.

Changed in firefox:
status: Unknown → In Progress
David Farning (dfarning)
Changed in firefox:
assignee: nobody → mozillabugs
Revision history for this message
In , Fabián Rodríguez (magicfab) wrote :

This bug seems to be the same as https://bugzilla.mozilla.org/show_bug.cgi?id=144625 .

Will be marking that one as duplicate.

Revision history for this message
Fabián Rodríguez (magicfab) wrote :

Upstream is considered an "enhancement", and open since 2002.

Revision history for this message
Fabián Rodríguez (magicfab) wrote :

I've asked #144625 upstream to be marked as duplicate of #147419 upstream. This bug is also affecting Thunderbird 1.5.0.7 in Ubuntu 6.10 (Edgy)

David Farning (dfarning)
Changed in firefox:
assignee: mozillateam → mozilla-bugs
Revision history for this message
Fabián Rodríguez (magicfab) wrote :

This has also been escalated to our distro team (Canonical Support).

Revision history for this message
In , antgel (antgel) wrote :

Masaki, are you still working on this?

Revision history for this message
In , Fabián Rodríguez (magicfab) wrote :

Masaki, can you provide any feedback on this ? A month has gone by. Thank you.

Revision history for this message
In , Masaki (masaki-katakai) wrote :

I'm very sorry for the late response. I will not be able to work on this area. Anyone can take this?

Changed in firefox:
status: Confirmed → In Progress
Alexander Sack (asac)
Changed in firefox:
status: Unconfirmed → Rejected
Revision history for this message
In , Anthony DeRobertis (derobert) wrote :

*** Bug 144625 has been marked as a duplicate of this bug. ***

Revision history for this message
In , gmud (gmud) wrote :

Since Masaki can't work on this, shouldn't the bug be marked as NEW then?

Revision history for this message
In , Chl (chl) wrote :

This bug is really annoying. Is anyone interested in solving it? Is there a usual way to support (financially) someone?

Changed in firefox:
status: In Progress → Confirmed
Revision history for this message
goto (gotolaunchpad) wrote :

This seems to affect Firefox on Windows Vista also. A fix seems to be to manually edit the about:config, which for me required changing the print.*.print_paper_size value from 3539049 to 3276858.

Revision history for this message
Paul Russell (paul-russell) wrote :

Actually I found the same problem. However I tried the about:config, print.*.print_paper_size change to 3276858 but it didn't seem to work for me. What I did change that worked was changing the value of print.*.print_paper_data from 1 to 9.

Revision history for this message
Fabián Rodríguez (magicfab) wrote :

Papersize settings are at least remembered in 2.0.0.6/gutsy. Do you see that as well?

Revision history for this message
In , Pacho Ramos (pacho) wrote :

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; es-ES; rv:1.8.1.11) Gecko/20071205 Firefox/2.0.0.11
Build Identifier:

Seems that Firefox/Seamonkey printing dialog doesn't take care of /etc/papersize setting and always defaults to letter instead of "a4" (/etc/papersize is provided by libpaper)

Thanks a lot for fixing this

Reproducible: Always

Steps to Reproduce:
1.
2.
3.

Revision history for this message
viktara (vik-propco) wrote :

I can confirm paper size setting are remembered in 2.0.0.6/gutsy provided you do actually print a document.

If you click cancel on the print dialog box it will NOT remember the setting.

Revision history for this message
Fabián Rodríguez (magicfab) wrote :

viktara, right, one needs to print something for this workaround to be effective. Thank you.

Revision history for this message
Fabián Rodríguez (magicfab) wrote :

Forgot to mention this also works in 6.06.2 LTS.

Revision history for this message
Alexander Sack (asac) wrote : Re: [Bug 10910] Re: Default page size for printing is letter

On Fri, Feb 22, 2008 at 05:12:32AM -0000, Fabián Rodríguez wrote:
> Forgot to mention this also works in 6.06.2 LTS.
>

 affects ubuntu/firefox
 status fixreleased

thanks for the info. closing this issue.

 - Alexander

Changed in firefox:
status: In Progress → Fix Released
Revision history for this message
In , Matti-mversen (matti-mversen) wrote :

*** Bug 430064 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Matti-mversen (matti-mversen) wrote :

confirming based on the dupe

Revision history for this message
In , Fernand Pajot (fernandp) wrote :

Mandriva's 2008.1 firefox 2.0.0.13 doesn't has this bug though and I don't remember having it on other distributions using firefox 2.x.

Revision history for this message
In , Pacho Ramos (pacho) wrote :

It is still valid with 2.0.0.14, hopefully fixed in firefox3 because of gnome-printing usage

(Mandriva applies a lot of patches to their firefox, maybe one of them fixes this)

Revision history for this message
In , Fernand Pajot (fernandp) wrote :

No it's not fixed in Firefox 3, that's why I reported the bug ;). See the duplicate.

Revision history for this message
Matthias Andree (matthias-andree) wrote :

Print failures persist in Hardy Heron :-(

Please fix ASAP, this is a LTS distro with Long-Term PITA for printing

Revision history for this message
Alexander Sack (asac) wrote : Re: [Bug 10910] Re: Default page size for printing is letter

On Fri, May 02, 2008 at 11:13:10AM -0000, Matthias Andree wrote:
> Print failures persist in Hardy Heron :-(
>
> Please fix ASAP, this is a LTS distro with Long-Term PITA for printing
>

this bug is rather old and probably tracks and issue already resolved
at some point. Please open a new bug or search for other existing
duplicates in launchpad first.

 - Alexander

Revision history for this message
Matthias Andree (matthias-andree) wrote :

What kind of support nonsense is this? The problem is that firefox again defaults to US Letter, which is exactly what this bug is about, the upstream wasn't fixed <https://bugzilla.mozilla.org/show_bug.cgi?id=147419> so why file new bugs for old stories? Polluting bugs.launchpad is certainly not helping developers.

Revision history for this message
Tero Karvinen (karvinen+launchpad) wrote :

Changed status to fix released->confirmed, because Matthias Andree reports it's still broken in Hardy. If you can test that it's fixed in Hardy, please change back.

This is a serious bug: not only that it prevents printing, but in many cases it jams the printer and requires someone to physically go to the printer or log in with administrative priviledges.

Changed in firefox:
status: Fix Released → Confirmed
Revision history for this message
era (era) wrote :

Alexander: I get the impression that you misunderstood comment #15, which I interpret to mean that the *workaround* works in 6.06. Can you confirm this, just to set the record straight?

Revision history for this message
Alexander Sack (asac) wrote :

On Sat, May 17, 2008 at 10:21:35AM -0000, era wrote:
> Alexander: I get the impression that you misunderstood comment #15,
> which I interpret to mean that the *workaround* works in 6.06. Can you
> confirm this, just to set the record straight?
>

No, I though the comment was about firefox 3 printing.

 - Alexander

Revision history for this message
Tollef Fog Heen (tfheen) wrote :

It was filed when FF2 wasn't even in the archive yet, but it affects firefox 3 as well as 2.

Revision history for this message
In , YuGiOhJCJ (yugiohjcj) wrote :

I have exactly the same problem on Firefox3.
Opera and Konqueror browser can print in A4 with no problem.
This is a Firefox 3 bug.
Please to resolve it quickly.
Thank you.

Revision history for this message
In , Leon Alvarez (locoxella) wrote :

I confirm this bug, its being happening since a while and its always get marked as dupe and resolved. But its never resolved, neither on Firefox 3.

Once you close firefox and open it again, default paper size is, again, us letter :(

People jams shared printers (waiting for confirmation) because of the paper size, and the more users trying to print to a networked printer, the more annoying it gets ;)

Revision history for this message
In , Andreas Krüger (andreas-krueger) wrote :

Known workaround (for the "highly computer literate"):

Print into some "virtual printer"
that accepts letter page size and generates PDF,
start some PDF viewer on the output,
set the page size to A4 in the PDF viewer, and "shrink page to fit paper",
print.

There must be a better workaround.
How can I set the page size for one single print job?

Revision history for this message
In , Nicku (nicku) wrote :

This problem has returned with a vengeance with Firefox 3. 3.0.5 implements
this Letter size default in a most annoying way that is really a challenge to override.

I am attempting now to determine what action I can take through the 'about:config" page.
What is the meaning of the '666' value in print.printer_CUPS/hp4l.print_paper_size?

Revision history for this message
In , Nicku (nicku) wrote :

On this (continuously upgraded from previous versions) Fedora 10 system,
$ cat /etc/papersize
A4
$ echo $LC_PAPER

So will try to set LC_PAPER (which should really be deduced
from my setting of LANG).
$ env | grep -i en_au
LANG=en_AU.UTF-8

Revision history for this message
In , Nicku (nicku) wrote :

With LC_PAPER set to a4, I get:
(process:22371): Gtk-WARNING **: Locale not supported by C library.
 Using the fallback 'C' locale.

(firefox:22371): Gdk-WARNING **: locale not supported by C library
With this unset, firefox starts without complaint.
I have changed the content of /etc/papersize to
a4
in case that helps.

Revision history for this message
Ingmar (ubuntu-ingmars-bastelecke) wrote :

I have the same problem since months or years and I'm thinking, such a bug should be solved after more than 4 years! I'm happy with ubuntu but this bug often stops my happyness.

When this was fixed some time ago in FF2, why arived this bug in FF3 again?

Revision history for this message
In , Era+mozilla (era+mozilla) wrote :

smontagu: are you actually working on this? What's the status, please?

Revision history for this message
era (era) wrote :

To the best of my knowledge, it was never fixed in FF2 (but feel free to correct me on that).

Revision history for this message
In , Sebastian J. Bronner (waschtl) wrote :

I have volunteered to take on this issue (note: I am not smontagu) with the aim of writing a patch. Since I am not a regular mozilla code contributor, the bug is still assigned to smontagu (perhaps I can be made a co-assignee?)

I have started looking into the mozilla code base in November, and the current status is still familiarization with the code base. I have 16 hours per month to spend on this issue, so it should be possible to make progress, albeit somewhat slowly.

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

Sebastian: assigning to you
smontagu is default assignee for this component, so I would expect he won't object;)

Revision history for this message
Alexander Sack (asac) wrote :

yes. wont be fixed on 1.8 branch. moving to ffox 3.0

Changed in firefox:
assignee: mozilla-bugs → nobody
status: Confirmed → Triaged
Revision history for this message
era (era) wrote :

As a crude workaround, could the install script put a value derived from the system locale into the global prefs.js file when you install Firefox on Ubuntu? (Not sure what it's called; in LXR it's http://mxr.mozilla.org/mozilla-central/source/modules/libpref/src/init/all.js#2513 but there may be other places too.)

Revision history for this message
era (era) wrote :

Actually I suppose that would belong in ubufox:
/<email address hidden>/defaults/preferences/ubuntu-mods.js

Alexander Sack: comments?

Revision history for this message
In , Pacho Ramos (pacho) wrote :

*** Bug 407418 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Pacho Ramos (pacho) wrote :

*** Bug 407406 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Pacho Ramos (pacho) wrote :

*** This bug has been marked as a duplicate of bug 147419 ***

Revision history for this message
In , Era+mozilla (era+mozilla) wrote :

Comment in duplicate https://bugzilla.mozilla.org/show_bug.cgi?id=407406#c3 alleges that Mandriva has solved this problem. I tried to find a public repository of their patches, but gave up. Perhaps somebody more knowledgeable about their processes and infrastructure could look into this.

Revision history for this message
Thomas Novin (thomasn80) wrote :

This is still an issue in Jaunty! WTF, how hard can it be to respect the systems printing settings? This drives me crazy..

Revision history for this message
John Vivirito (gnomefreak) wrote :

ThomasNovin, Please feel free to offer a patch to upstream devs if you think its that easy to fix. I can tell you now its not as simple as you might think. Firefox code is massive so it may be a while. They also need someone to find time to do it. We wont fix this on Ubuntu's end until upstream fixes it.

Revision history for this message
John Vivirito (gnomefreak) wrote :

Alexander what does this have to do with ubufox?

Revision history for this message
In , Era+mozilla (era+mozilla) wrote :

Just for the record, I don't think "a4" is a valid value for $LC_PAPER. It is not part of the standard locale settings (yet?) so it's not very well documented. My impression is that you can set LC_PAPER to the name of a valid locale, and then have the paper size from that locale override any other locale settings of yours. Thus, try e.g. LC_PAPER=en_DK (depending also on what locales are supported on your installation). But at this time, of course, Mozilla doesn't care at all about the value of this setting (other than including it in crash reports). [1]

[1] http://mxr.mozilla.org/mozilla-central/search?find=%2F&string=LC_PAPER

@Sebastian J Bronner: have you been making any progress?

Revision history for this message
In , Timeless-bemail (timeless-bemail) wrote :

fwiw, the crash reporter is actively ignoring the lc_ stuff, not honoring it ;-)

Revision history for this message
In , Markus Kuhn (markus-kuhn) wrote :

My original proposal above, from 2002-05-27, namely to decide on preferred units of measurement and standard paper size by searching for country codes in the LC_* environment variables (exactly as suggested in the above piece of code) is IMHO still the most advisable solution today! Please just try it, before thinking up alternatives.

The alternatives simply don't wash: The /etc/papersize mechanism is a complete non-starter, as it is a global setting that you cannot easily override for individual users or processes. The nl_langinfo(PAPER_HEIGHT) / nl_langinfo(PAPER_WIDTH) was a draft proposal (ISO technical report 14652) that only glibc implemented but that never made it into the POSIX standard or any other ISO standard. It won't work on other platforms and just leads to ugly platform-specific #ifdef massacres.

The above code will do the right thing by default on all POSIX platforms (not just Linux) and provides easy and obvious ways for users to override the defaults. It is the most pragmatic and workable solution you are going to find, given the rather messy standardization in this area.

What it does is very simple: The defaults are millimetres and A4 (because that's what ~95% of the world population use), and only if your environment suggests that you are in Canada or the U.S. will the default paper size become U.S.-Letter, and only if you are in the U.S. will the default unit of measurements become inches. This will be determined by the first of the variables LC_ALL, LC_{PAPER,MEASUREMENT}, LANG that is defined and non-empty, exactly the same priority order that setlocale() applies, but implemented in a strictly portable way without requiring the setlocale() implementation to even know of LC_{PAPER,MEASUREMENT}.

The inclusion of LC_{PAPER,MEASUREMENT} makes sure that users can override their countries' default for paper and measurement without affecting anything else. On the day when the U.S. finally goes metric, simply set LC_MEASUREMENT=POSIX and its done.

Revision history for this message
era (era) wrote :

@John Vivirito: I added Ubufox at comment #28 asking for comment on the suggestion that perhaps this could be fixed in Ubufox, as initially outlined in my comment #27. I haven't received any reply, so I'm asking again. Thanks for noticing, though.

I'll be the first to admit that fiixing it in Ubufox smacks of a workaround, but then upstream has a much more varied collection of deployment scenarios to cater to, whereas Ubuntu 9.04 and up is a reasonably well-defined and standard platform to code against; and so the fix could be a lot simpler than what upstream will ultimately need to come up with. In particular, you can handle just the Linux subset of possible scenarios, and count on basic locale support etc to be properly set up.

My somewhat brittle proposal would be for the postinst script to hack the default value in the .js file based on information in /etc/papersize; (I wish I would not be saying this, but) with security upgrades coming down the pipe with some reliability, this script would realistically run every couple of months, at least. Yes, this is ugly, but it could fix "the easy 80%".

Revision history for this message
In , Era+mozilla (era+mozilla) wrote :

Shouldn't the more-specific LC_PAPER and LC_MEASUREMENT be allowed to override LC_ALL if they are present, though? (Pardon my ignorance.)

Revision history for this message
In , Markus Kuhn (markus-kuhn) wrote :

No, the whole purpose of LC_ALL is to allow you to override everything else, whereas the purpose of LANG is to provide the lowest-priority default. The more specific LC_* environment variables are placed between those two extremes in the priority order. (I regularly write LC_ALL=C to force all locale mechanics off in tests.)

Reference: POSIX, section 8.2 (Internationalization Variables): "The value of the LC_ALL environment variable has precedence over any of the other environment variables starting with LC_"

To understand the definition of these environment variables, read
http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html#tag_08_02

Revision history for this message
In , Era+mozilla (era+mozilla) wrote :

Thanks for the solid clarification. It's odd how sparsely documented this is, at least on Linux.

Revision history for this message
In , Era+mozilla (era+mozilla) wrote :

(In reply to comment #22)
> Comment in duplicate https://bugzilla.mozilla.org/show_bug.cgi?id=407406#c3
> alleges that Mandriva has solved this problem. I tried to find a public
> repository of their patches, but gave up.

I installed Mandriva Linux Free 2009.0 in Virtualbox. It's got Firefox 3.0.5. Even though I set up my regional settings to prefer A4 paper, Page Setup in Firefox defaults to letter. So there doesn't seem to be any basis for the claim that Mandriva has fixed this.

Revision history for this message
In , Coren (coren+) wrote :

This problem is the same on Ubuntu Hardy LTS.
Does someone know how to make Firefox 3 understand that I want A4 paper by default? Without using GUI, of course, since it's for a Firefox Linux deployment, not for a personal Desktop.
I have tried without success to play with prefs.js, with *.rdf files, with gnome-printer-settings, with gtk-printer-settings, with gconf-editor and no success with all of these approaches.

Revision history for this message
In , James Henstridge (jamesh) wrote :

Given the ubiquity of Linux compared to other unix systems (ignoring MacOS, which has its own port), is it really such a problem to include platform specific code, provided there is a reasonable fallback for other systems?

There is an API that will provide the locale default paper size, so it seems silly to rely on heuristics instead.

Revision history for this message
In , Sebastian J. Bronner (waschtl) wrote :

(In reply to comment #23)
> @Sebastian J Bronner: have you been making any progress?

No progress to report yet, but I am continuing to work on the issue as time permits.

Revision history for this message
In , Sebastian J. Bronner (waschtl) wrote :

(In reply to comment #25)
> My original proposal above, from 2002-05-27, namely to decide on preferred
> units of measurement and standard paper size by searching for country codes in
> the LC_* environment variables (exactly as suggested in the above piece of
> code) is IMHO still the most advisable solution today! Please just try it,
> before thinking up alternatives.

My proposol for implementation is to check for the proper paper size setting by stepping through the following items. The first successfully determined value would be used:

1 - if it exists, use a firefox-specific setting
    stored in the user's firefox profile
2 - infer paper size from LC_ALL
3 - infer paper size from LC_PAPER
4 - infer paper size from LANG
5 - if it exists, read paper size from /etc/papersize
6 - retrieve paper size from cups (if that is possible)
7 - default to a4

Comments?

I have left LC_MEASUREMENT out of this list purposely because it really has no direct bearing on paper. A user may wish to specify different measurement units, but wouldn't expect his locale's paper size to change because of that.

Step 1 - the firefox-specific setting is for users who don't care about user profiles. The user would be able to make a choice in a dialog between a specific paper size and "locale default" (or similar). This would be set to "locale default" unless the user specifically changes it.

Revision history for this message
In , Markus Kuhn (markus-kuhn) wrote :

Just for the record: only on glibc systems, an API for interpreting the LC_PAPER aspect of the locale setting is

#include <stdio.h>
#include <langinfo.h>
#include <locale.h>

int main()
{
  if (!setlocale(LC_PAPER, "")) {
    fprintf(stderr, "Can't set the specified locale! "
            "Check LANG, LC_PAPER, LC_ALL.\n");
    return 1;
  }
  printf("paper height = %d mm\n", (int) nl_langinfo(_NL_PAPER_HEIGHT));
  printf("paper width = %d mm\n", (int) nl_langinfo(_NL_PAPER_WIDTH));
  return 0;
}

which results in

$ LC_ALL=en_GB.UTF-8 ./lc_paper
paper height = 297 mm
paper width = 210 mm
$ LC_ALL=en_US.UTF-8 ./lc_paper
paper height = 279 mm
paper width = 216 mm
$ LC_ALL=en_CA.UTF-8 ./lc_paper
paper height = 279 mm
paper width = 216 mm

I just checked with

  for l in `locale -a` ; do echo $l: ; LC_ALL=$l ./lc_paper ; done

all glibc locales on openSUSE 10.3 and found in addition to US and CA only one other country code whose locales specify the U.S. Letter format: PR = Puerto Rico.

So please change in my original test code the term

  strstr(s, "_US") || strstr(s, "_CA")

into

  strstr(s, "_US") || strstr(s, "_CA") || strstr(s, "_PR")

to make its results compatible with glibc.

Revision history for this message
In , Markus Kuhn (markus-kuhn) wrote :

The file /etc/papersize is a configuration file of the groff text formatting package. It is not mentioned in any API standard. I strongly recommend that Firefox ignores groff configuration files.

This file really should have been called something like /etc/groff/papersize or, even better, groff should have used LC_PAPER instead, as proposed here for Firefox. Let's not perpetuate a mistake made in the design of groff by carrying it over into a web browser. One locale mechanism is enough. Forget about /etc/papersize.

Changed in firefox:
status: Confirmed → In Progress
Revision history for this message
In , Matthias Andree (matthias-andree) wrote :

If nobody else has the time, perhaps the fix could be made a Google summer of code project?

Revision history for this message
In , Gerwin-digitalus (gerwin-digitalus) wrote :

This is one of the most annoying bugs if your using FF in a business deployment.
It's really annoying that the printers stops working after it receives a Letter print job.

Also Mozilla Prism is facing the same problems (same code base I guess). Is there a way we can vote for this bug or something?

Revision history for this message
In , Era+mozilla (era+mozilla) wrote :

@Gerwin: there is a "vote" link next to the Importance field at the top of the Bugzilla web page for this bug report (which you will find a link to if you read this over email; I believe you will need to be logged in to your Bugzilla account in order to be able to vote, and possibly even see the "vote" link).

Revision history for this message
In , Bugzilla77 (bugzilla77) wrote :

With FF3, printing a small sized page (popup format) forces printer into "Letter" while it's configured to "A4", making it unprintable.

Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.7) Gecko/2009031120 Mandriva/1.9.0.7-0.1mdv2008.1 (2008.1) Firefox/3.0.7

Can't reproduce it with Seamonkey
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.19) Gecko/20081216 SeaMonkey/1.1.14

related to bug 379074
related to Bug 414041 ?

Revision history for this message
Charles Forsyth (charles-forsyth) wrote :

the problem (as I experience it, years from its first report), is that I set "Paper size" in Firefox "Page Settings"
and this setting is lost every time Firefox is updated (as far as I can tell). I think it should retain the settings made by the user after each update. Those are the settings the user has made. That is what the user wants. How hard can that be? The suggestions about setting it based on the locale are poor ones,
because the printer page size might not be determined by locale. (For instance, it is not unusual these days in large companies in the United States to have A4 printers set up.) An "upgrade" and especially a plain "update" should not change user settings, unless those conflict in some deep way with something in the upgrade or update, and I'd take some convincing that could ever be the case here.

Revision history for this message
In , Timeless-bemail (timeless-bemail) wrote :

*** Bug 414041 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Timeless-bemail (timeless-bemail) wrote :

*** Bug 379074 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Timeless-bemail (timeless-bemail) wrote :

does it really make sense to favor LC_anything over CUPS settings?

if i have two printers and one is using metric and one is using letter, surely i can't possibly want an env var to break one or the other.

note that using setlocale() is not something I'd want to see. We do not need to have our fragile code confused by something which will almost certainly confuse it on random systems and in random places. Yes that means someone might be forced to parse a couple of env vars manually, however, that's life and it's better than breaking the rest of our code.

1 - if it exists, use a firefox-specific setting
    stored in the user's firefox profile
2 - retrieve paper size from gtk
    (and hence cups)
---------------questionable---------------
3 - infer paper size from LC_ALL
4 - infer paper size from LC_PAPER
5 - infer paper size from LANG
---------------questionable---------------
6 - if the system is using something that hints it isn't en-US default to a4

There are lots of people in the US, and just because I'm one of the stupid ones who isn't there doesn't mean we should magically do something strange to their systems.

http://mxr.mozilla.org/mozilla-central/source/widget/src/gtk2/nsPrintSettingsGTK.cpp

afaict, we use something called gtk_paper_size_get_name today and have since bug 193001 was fixed in 2008.

it's documented here:
http://library.gnome.org/devel/gtk/unstable/gtk-GtkPaperSize.html

Perhaps someone could figure out why it isn't doing the right thing instead of complaining about our behavior?

reporter: since you're able to use a compiler, could you please investigate?

someone who doesn't have a compiler is free to find a typical gnome app and (something like gedit) and indicate whether it gets this stuff right. if it does, then you could perhaps try to find someone who can compare our code (it's in the one file i listed above) with the gtk app's code.

Revision history for this message
In , Gyhujikolp (gyhujikolp) wrote :

@timeless: gedit gets it right, at least on my system. So do leafpad, evince, dictionary, eog, and in fact every other app except Firefox.

Revision history for this message
In , Bugzilla77 (bugzilla77) wrote :

Should change this bug to something more important than a simple "enhancement".
For me, Firefox isn't able anymore to do a direct print to a laser printer.

Revision history for this message
Richard de Rivaz (richard-mdr) wrote :

I am experiencing this problem when opening a new window on FF 3.0.9 Ubuntu 8.10. The page setup of the main window is correctly set to 'A4' but a new window opens configured for 'US letter'. Where is the new window obtaining this incorrect property?

Revision history for this message
In , Timeless-bemail (timeless-bemail) wrote :

roderick: cool, so please pick one and figure out what they're doing.

because i'd expect an app like gedit to use the gtk api and get data from cups.

or do you people really not have cups installed?

Revision history for this message
Ingmar (ubuntu-ingmars-bastelecke) wrote :

I saw something similar happening. After one of the FF-Updates I had 'A4' as the default, but sometimes I printed it was again 'US letter'. I didn't related this to the pop-ups, but i think it was on a page with pop-up. I'm curious if this changed in Jaunty. We'll see ...

Revision history for this message
In , Dev-oskar (dev-oskar) wrote :

I have some more infos in Bug 478733

Actually I do think printing resets always to A4 currently if the paper size doesn't match the internals. I do think LC* is the wrong way.

Actually any hard paper setting is very wrong because I need to switch between A4 and POS Printing.

I tested on the same CUPS Setup:
Firefox 3.0.6 => Tries to always Print A4 on the pos printer, grrr!
Epiphany (Gecko) => Result was a bit better, but not perfect.
Margins couldn't be disabled, so not usable at all.

Midori Browser (Webkit+GTK) => This was the best experience, no margin problems, printing works on the POS Printer, yay!

Revision history for this message
Micah Gersten (micahg) wrote :

No more enhancements will be made to Firefox 2.

Changed in firefox (Ubuntu):
status: New → Invalid
Revision history for this message
Veteran (krautzn) wrote :

The problem could be deeper than forgetting the settings. This may be a clue. Even when the setting is changed to A4, it prints on A4 paper, but the format is still letter. (Is this another bug, or part of this bug?) Look closely and you will see that Firefox doesn't print to the bottom of A4 paper. It looks like it simply prints letter layout on A4 paper.

Is it possible that some coder years ago thought the whole world was letter and hard-coded it deep in a line somewhere, such that all subsequent attempts to do otherwise are defeated? (BTW, there are only three countries in the world still sticking to the old imperial units, Myanmar (Burma), Liberia and one other country between Mexico and Canada. The rest are already metric or changing.)

Revision history for this message
In , Bugzilla77 (bugzilla77) wrote :

My LC_PAPER=fr_FR and it stills try to print in US Letter format, which printer rejects. (no suitable tray).

Besides, for similar documents, the first print goes OK and prints to A4. The next ones goes to US Letter.

Something is really messed up. What are the differences with current Seamonkey (which works) ?

Revision history for this message
In , 12345667890gregfdbdfsdbd (12345667890gregfdbdfsdbd-deactivatedaccount-deactivatedaccount) wrote :

This bug has been reported back in 2002, it's 7 years now and it's still not resolved. I just spent an hour trying to force cups-pdf to produce A4 pdf instead of US Letter.

Why firefox ignores printer settings at takes a value from system's default? even though my LC_PAPER=en_GB suggests it should print on A4, it still prints on US Letter.

I had to set values (paper name, paper sizes) manually in order to get my cups-pdf working.

Revision history for this message
In , Sebastian J. Bronner (waschtl) wrote :

I've been scouring the firefox code-base repeatedly with all sorts of search terms, and I can't seem to find the code that makes the decision about what paper size to use when printing.

I'm still looking, but if anybody knows something, I'd be grateful for a pointer.

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :
Revision history for this message
John Vivirito (gnomefreak) wrote :

Closed Firefox-3.0 since it has reached EOL and is no longer receiving updates.
Please confirm if this still happens in latest stable version of Firefox-3.5 in our repos.
If so please reopen bug as triaged

affects: firefox-3.0 (Ubuntu) → firefox-3.5 (Ubuntu)
Changed in firefox-3.5 (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
John Vivirito (gnomefreak) wrote :

I stand corrected as of yesterdays meeting notes from upstream they have decided to release 3.0.18

affects: firefox-3.5 (Ubuntu) → firefox-3.0 (Ubuntu)
Changed in firefox-3.0 (Ubuntu):
status: Incomplete → Triaged
Changed in firefox-3.5 (Ubuntu):
status: New → Triaged
Revision history for this message
ebrjvd (jos-van-dyck) wrote :

LC_PAPER or /etc/papersize seems to depend on language, rather than location.

When I install Ubuntu with English language and Belgium as location, I get Letter as default in /etc/papersize,
whereas it should be A4 in Europe, independent of the selected language.

Revision history for this message
ebrjvd (jos-van-dyck) wrote :

When I select Dutch language, /etc/papersize is set to A4.

Revision history for this message
era (era) wrote :

erbjvd: your comments seem unrelated to the specifics of this bug. If you consider it a problem that /etc/papersize is not what you expect, please submit a separate bug report. Thanks.

Revision history for this message
ebrjvd (jos-van-dyck) wrote :

Is this bug related to Bug #494952 ?
or does Firefox have its own papersize setting?

Revision history for this message
In , ebrjvd (jos-van-dyck) wrote :

Paper size should NOT be linked to language, but to location.
One can use any language in any country, but in most cases, you can only buy one type of paper size in a particular country or continent, e.g. A4 in Europe, Letter in US (for any language).

Revision history for this message
neuromancer (neuromancer) wrote :

@ebrjvd
I think that this problem isn't related to #494952 because my /etc/papersize report A4 but firefox still set default paper size to US Letter :(

@all
vote the bug also on upstream bugzilla site: https://bugzilla.mozilla.org/show_bug.cgi?id=147419
At the moment there are 33 votes. More votes, more visibility.
It's time to fix this bug... it's alive and kicking from 2002...

Revision history for this message
In , Bugzilla77 (bugzilla77) wrote :

Here's an update:

Printing 2 pages document gives 1 correct A4, and the 2nd as US.

When you try to print, you can't select paper tray and the menu is grayed/stuck to "US Letter".

** workaround **
Now, if you "Print Preview", and you can change the document layout to A4 from the menu (footers options/ ...) and it's no longer US Letter. It Prints.

Pls some ppl confirm this.

Revision history for this message
In , Avj-home (avj-home) wrote :

Hi Francois,

I can confirm this behaviour! If you then go back to Print->Page Setup, you then find that Paper Size is now set to A4.

This is in FF 3.5.9

Revision history for this message
In , Avj-home (avj-home) wrote :

Also, settings are changeable in Page Setup.

Revision history for this message
bigge (birger-pckart) wrote :

If you have problem to get A4 as default paper size instead of US Letter:
1) Close firefox!
2) Edit the pref file in your profile (my profile is named tnju3mjg.default)
Eg.
gedit /home/username/.mozilla/firefox/tnju3mjg.default/prefs.js

Search for user_pref("print.print_paper_
Change "na_letter" to "iso_a4" and the height and width as this:

user_pref("print.print_paper_height", "297,00");
user_pref("print.print_paper_name", "iso_a4");
user_pref("print.print_paper_size", 3);
user_pref("print.print_paper_size_type", 1);
user_pref("print.print_paper_size_unit", 1);
user_pref("print.print_paper_width", "210,00");

further down, for your default printer (my printer is Arbetsrum101):
user_pref("print.printer_Arbetsrum101.print_paper_height", "297,00");
user_pref("print.printer_Arbetsrum101.print_paper_name", "iso_a4");
user_pref("print.printer_Arbetsrum101.print_paper_size_type", 1);
user_pref("print.printer_Arbetsrum101.print_paper_size_unit", 1);
user_pref("print.printer_Arbetsrum101.print_paper_width", "210,00");

I did the same for all my printers

3) Save the file
This solved my problem.

Revision history for this message
Richard de Rivaz (richard-mdr) wrote : Re: [Bug 10910] Re: Default page size for printing is letter

Hi

This does appear to fix the problem on my system. The default printer settings were already set correctly on my computer and the fault was still present so the problem may be localised to the print_paper settings.

Regards Richard

bigge wrote:
> If you have problem to get A4 as default paper size instead of US Letter:
> 1) Close firefox!
> 2) Edit the pref file in your profile (my profile is named tnju3mjg.default)
> Eg.
> gedit /home/username/.mozilla/firefox/tnju3mjg.default/prefs.js
>
> Search for user_pref("print.print_paper_
> Change "na_letter" to "iso_a4" and the height and width as this:
>
> user_pref("print.print_paper_height", "297,00");
> user_pref("print.print_paper_name", "iso_a4");
> user_pref("print.print_paper_size", 3);
> user_pref("print.print_paper_size_type", 1);
> user_pref("print.print_paper_size_unit", 1);
> user_pref("print.print_paper_width", "210,00");
>
> further down, for your default printer (my printer is Arbetsrum101):
> user_pref("print.printer_Arbetsrum101.print_paper_height", "297,00");
> user_pref("print.printer_Arbetsrum101.print_paper_name", "iso_a4");
> user_pref("print.printer_Arbetsrum101.print_paper_size_type", 1);
> user_pref("print.printer_Arbetsrum101.print_paper_size_unit", 1);
> user_pref("print.printer_Arbetsrum101.print_paper_width", "210,00");
>
> I did the same for all my printers
>
> 3) Save the file
> This solved my problem.
>
> --
> Default page size for printing is letter
> https://bugs.launchpad.net/bugs/10910
> You received this bug notification because you are a direct subscriber
> of the bug.
>
--

Richard de Rivaz
MDR Interfaces Ltd
Network Security, Email, Web Services, LiveSign® Digital Signage and Computer Control Specialists

Tel: +44(0)1825 790294 Fax: +44(0)1825 790119
Reg in England No. 1577056 Directors: R de Rivaz Z de Rivaz
Reg Address: Little Bridge House, Danehill, Sussex RH17 7JD

http://www.mdr.co.uk

Changed in firefox (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Dave Martin (dave-martin-arm) wrote :

This bug appears to be in the lucid release.

My location set during installation of lucid is United Kingdom.
$ cat /etc/papersize
a4
$ apt-cache policy firefox
firefox:
  Installed: 3.6.3+nobinonly-0ubuntu4
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04 LTS
Release: 10.04
Codename: lucid

(The installed release is UNE, on armel imx51)

When printing from firefox the "Paper size" field is set to letter, ignoring the system default in /etc/papersize, is greyed out and can't be changed.

I'm printing to an HP LaserJet family printer using the JetDirecy CUPS backend --- because the printer has no letter paper in it, attempting to print from firefox causes the printer to stall while it waits for someone to load some letter paper.

If I quit Firefox and prune out all the print.* properties from prefs.js, then set print.postscript.paper_size to "a4", then I can print successfully: in the print dialog, the paper size is now "A4", but it's still greyed out and unconfigurable. When the job is sent to the printer, the printer chooses the correct tray and the output appears properly scaled. However, I get some weird diagnostics on the console in this case:

(firefox-bin:2054): Gtk-WARNING **: Unknown paper size A4

(firefox-bin:2054): Gtk-WARNING **: Unknown paper size A4

If there's no easier workaround, a normal user isn't going to figure it out...

Revision history for this message
Dave Martin (dave-martin-arm) wrote :

Fabián Rodríguez wrote on 2007-01-17: #14

"Upstream is considered an "enhancement", and open since 2002."

Wow, 8 years. Do upstream still take this view? Any chance we can raise their priority on this?

Unless I've misunderstood something, it looks like users in much of Europe and other parts of the world who have certain not-uncommon printer configurations won't be able to print from firefox unless they hack the config... or buy special for the purpose.

Revision history for this message
Dave Martin (dave-martin-arm) wrote :

Oops, that should be
"... or buy special ^paper^ for the purpose"

Revision history for this message
Tero Karvinen (karvinen+launchpad) wrote :

Dave Martin, it's much worse than that. In not-uncommon printer configuration, sending a US-letter job to printer requires physically going to the printer and pressing buttons. Until that, the printer is in error state and the whole print queue is waiting.

Revision history for this message
Charles Forsyth (charles-forsyth) wrote :

On 1 May 2010 07:32, Tero Karvinen <email address hidden> wrote:
> Dave Martin, it's much worse than that. In not-uncommon printer
> configuration, sending a US-letter job to printer requires physically
> going to the printer and pressing buttons. Until that, the printer is in
> error state and the whole print queue is waiting.

i've got a Konica-Minolta printer that gives "paper jam - media size error"
when duplexing if the page size transmitted differs from the physical page size.
thanks to a bug in the printer software, the only way out is to switch
the printer off and on again.
(shades of the IT crowd.)

Revision history for this message
In , Dwayne Bailey (dwayne-translate) wrote :

*** Bug 545937 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Masykora (masykora) wrote :

I can confirm this behavior with Firefox 3.5 on Ubuntu 9.10

Revision history for this message
In , Berend De Schouwer (berend-de-schouwer) wrote :

I can confirm the print preview from #52, and #53.

I've got a printer here with multiple types of stationary (A3, A4, ...) -- except I can't actually buy US Letter.

I suggest you don't ask the printer for paper size, since it actually accepts print jobs for US Letter, but expects me to go buy stationary before it's willing to print.

It should default to something sane (locale and /etc/papersize have settings) and allow the user to change per printjob.

Revision history for this message
In , Berend De Schouwer (berend-de-schouwer) wrote :

It's possible to select stationary in Firefox 4 Beta 1

Revision history for this message
In , Smontagu (smontagu) wrote :

I've been debugging this a bit. The default "US Letter" setting comes from the following lines in nsPrinterEnumeratorGTK::InitPrintSettingsFromPrinter

  nsXPIDLCString papername;
  if (NS_SUCCEEDED(CopyPrinterCharPref(pPrefs, "postscript", printerName, "paper_size", papername))) {
  nsPaperSizePS paper;

  if (paper.Find(papername)) {
    DO_PR_DEBUG_LOG(("setting default paper size to '%s' (%g mm/%g mm)\n",
                     paper.Name(), paper.Width_mm(), paper.Height_mm()));
    aPrintSettings->SetPaperSizeUnit(nsIPrintSettings::kPaperSizeMillimeters);
    aPrintSettings->SetPaperWidth(paper.Width_mm());
    aPrintSettings->SetPaperHeight(paper.Height_mm());
    aPrintSettings->SetPaperName(NS_ConvertASCIItoUTF16(paper.Name()).get());
  }

It would be better to just call SetPaperName with null and let gtk_paper_size_new set it to the locale default. Better still would be to pull in the system settings for the printer, but I'm not sure how to do that.

Revision history for this message
In , 12345667890gregfdbdfsdbd (12345667890gregfdbdfsdbd-deactivatedaccount-deactivatedaccount) wrote :

This is still not solved for me - I've got an A4 printer paper selected in Firefox, I've got A4 selected in CUPS-PDF and I get US Letter print-out.

Revision history for this message
lith (minilith) wrote :

While the paper size is correctly set for my physical printer, the default paper size for the pdf printer, which doesn't show up in ubuntu's printer system control panel, is set to letter, therewith ignoring /etc/papersize which is set to a4. And there seems to be no way to change the default values for the internal pdf printer via the gui, doesn't it? (Ubuntu 10.04, firefox 3.6.8).

Changed in firefox:
importance: Unknown → Medium
Revision history for this message
In , Adrian Johnson (ajohnson-redneon) wrote :

Created attachment 500694
don't use PS prefs in gtk

The attached patch fixes this problem for me.

In widget/src/xpwidgets/nsPrintOptionsImpl.cpp the page size is read and written to the prefs of the form:

print.printer_NAME.print_paper_name
print.printer_NAME.print_paper_size_width
print.printer_NAME.print_paper_size_height
print.printer_NAME.print_paper_size_type
print.printer_NAME.print_paper_size_unit

where NAME is the printer name.

In widget/src/gtk2/nsDeviceContextSpecG.cpp the page size is read but not written from the following prefs:

print.postscript.printer_NAME.paper_size
print.printer_NAME.paper_size
print.postscript.paper_size
print.paper_size

The problem is the prefs read in nsDeviceContextSpecG.cpp are not the same as the prefs written in nsPrintOptionsImpl.cpp. If these prefs do not exist there is no problem as the prefs read in nsPrintOptionsImpl.cpp are used. However I have found that in a newly created profile the pref "print.postscript.paper_size = letter" always exists. This will always be read and override the saved paper size. As it is not written, the "letter" default will not go away.

The attached patch changes the module name used when reading prefs in nsDeviceContextSpecG.cpp from "postscript" to null so the "print.postscript.paper_size" pref is never read. I am assuming the "postscript" module name is leftover from before gtkprint was used.

With the patch applied and using a newly created profile the default paper size will be the gtk_paper_size_get_default() paper size which is based on the current locale. After printing for the first time the selected page size is correctly saved and restored the next time the print dialog is opened.

Revision history for this message
In , Coren (coren+) wrote :

Adrian : It seems really great. I hope that it could be commited into trunk for both Thunderbird & Firefox.

Revision history for this message
In , Paolo S (paolo-se) wrote :

Hello. I'am italian. I have the same problem.. System default paper=A4. All other program work fine. I want to print in firefox 3.6.13, but the default in firefox is always letter. I set to A4 but firefox always forget that. It always start with letter size.
Please help me. Thanks in advance

Revision history for this message
In , Karlt (karlt) wrote :

The evil print.postscript.paper_size letter default comes from bug 125078 and
I don't see any means provided for changing the default.

initPrintSettingsFromPrinter was meant to get setting from the printer and the
xprint backend implementation appropriately asked the system for available
paper sizes. It seems print.postscript.paper_size pref was just a space
filler for lack of a postscript implementation.

savePrintSettingsToPrefs and printer-specific prefs in
initPrintSettingsFromPrefs weren't added until bug 128142 and they now seem
the appropriate place for managing preferences.

So I agree that it is better to leave the paper settings at their default than
to pull in this arbitrary default.

Revision history for this message
In , Karlt (karlt) wrote :

Comment on attachment 500694
don't use PS prefs in gtk

However, the way that this patch avoids the arbitrary default adds to the
existing confusion. It works because the pref lookup no longer matches the
pref setting. It would be better to remove the pref and the lookup code.
http://hg.mozilla.org/mozilla-central/annotate/a66254dfa588/modules/libpref/src/init/all.js#l3065

One of the (many) strange things about the print setup code, is that the list
of (basic standard) paper sizes is only added to
print.tmp.printerfeatures.paper.* if a paper_size pref is found, and that will
rarely be anything but "print.postscript.paper_size".
http://hg.mozilla.org/mozilla-central/annotate/7a3469118cf3/widget/src/gtk2/nsDeviceContextSpecG.cpp#l898
(The initial implementation was added in bug 132563.)

print.tmp.printerfeatures.paper.* is only used from
toolkit/components/printing/content/printjoboptions.js, as a set of available
paper sizes. AFAICS however, that is only used if
nsPrintingPromptService::ShowPrintDialog cannot find nsIPrintDialogService.
Now that the GTK port provides a nsIPrintDialogService, there is no need to
set up print.tmp.printerfeatures.paper.*

So it safe to remove the whole paper_size block
http://hg.mozilla.org/mozilla-central/annotate/7a3469118cf3/widget/src/gtk2/nsDeviceContextSpecG.cpp#l883

Revision history for this message
In , Paolo S (paolo-se) wrote :

I found solution to my problem by doing this:
1-assured that in /etc/papersize there is written only a4.
2-open /usr/share/ghostscript/8.71/lib/ghostpdf.ppd and erase every line with inside the word "letter".
3-open /etc/cups/ppd/KM-1635.ppd (instead of KM-1635 use the name of the printer that doesn't print to a4) and delete the line where there's write letter/letter like this

*PageSize Letter/Letter: "%% FoomaticRIPOptionSetting: PageSize=Letter"
*FoomaticRIPOptionSetting PageSize=Letter: "-p1 "

*PageRegion Letter/Letter: "%% FoomaticRIPOptionSetting: PageSize=Letter"

*ImageableArea Letter/Letter: "12.00 12.00 600.00 780.00"

*PaperDimension Letter/Letter: "612 792"

4)changed in firefox at about:config every line where there's letter on na_letter or letter to a4 and the dimension of that format forced to height 297 and width 210. when i restart firefox the values of print.postscript.paper_size was returned to letter for example but the printer print correctly to a4.

Sorry for my english... Bye

Revision history for this message
In , Paolo S (paolo-se) wrote :

i add to /etc/environment a line, too

LC_PAPER=it_IT.UTF-8

i'm not sure but i think this don't do nothig....

Bye

Revision history for this message
In , JunyaKeller (jun-h2o) wrote :

I prefer changing /etc/default/locale from en_US to en_GB in which changes the printing defaults from letter to A4:
LANG=en_GB.UTF-8

Debian/Ubuntu:
sudo /usr/sbin/update-locale LANG="en_GB.UTF-8"

Revision history for this message
In , Nick Moffitt (nick-moffitt) wrote :

JunyaKeller: That may work fine for you, but I am an American living in England. I have US keyboard layout, spell "color" without a 'u', and otherwise prefer an en_US locale. The only thing that changes for me is the default paper geometry in printers I use.

If LC_PAPER were honored more widely as an override, I think that would be the correct solution.

Revision history for this message
Indie (alanlitster) wrote :

I've just come across this bug myself and can't believe it's been going on years.

Even though my system is setup to use en_GB and /etc/papersize contains 'a4' firefox still defaults to the non-standard 'letter' paper size.

I found that by sym-linking /etc/paper to /etc/papersize firefox will then use the correct A4 size when printing. Is the firefox binary configured to look at the wrong file to determine the default paper size? Can't this be fixed once and for all in the firefox source so it instead references /etc/papersize or have the sym-link automatically created. As for someone that doesn't want these US settings, having to manually apply these fixes for the quirks is quite irritating not to mention the time wasted.

Revision history for this message
SteveLoughran (steve-loughran) wrote :

Maybe people in the US don't see this as a serious issue, but in the rest of the world it is, even though most of Ubuntu now has good localisation at install time, Firefox is completely out the loop.

There are more people in the world for whom A4 is the default size. It's the ISO standard. And regardless of that, FF should be picking up defaults from the system -or asking the printers themselves- rather than assuming US letter. The fact that this issue has been going on for so long is just painful.

Revision history for this message
François Perruchas (francoisperruchas) wrote :

Still occurs in Ubuntu 11.04 with firefox 4.0.1.
I just did a fresh install of ubuntu 11.04, install my printer, set it to print in A4 paper, but it still prints on Letter format...

Revision history for this message
Alan Haigh (alan-k) wrote :

Indie on comment #132 seems to have an easy solution for this bug. This works for me on Natty 11.04. Perhaps a simlink should be added in the install until the Mozilla code is sorted.

Revision history for this message
In , 5-mozilla (5-mozilla) wrote :

In Firefox 5, this problem seems to be worse than before.

1. I support a small architecture practice with 40 workstations on Windows (XP SP3).
- Due to their CAD package requirements, the OS cannot be changed (at least not in the near term).

2. The Firefox printer preferences dialog under Windows does *not* allow the paper size to be set at all.

3. The "native" printer preferences dialog under Windows *does* allow the paper size to be set, but the values are ignored by Firefox.

**Note: When the native printer setup dialog is called up from Firefox, it (wrongly) shows the printer page size to be Letter (it is actually set to A4). If I change it to A4, then the setting is actually shown as "A4 (97%)" indicating that the page will be reduced to fit. If I print with this setting, the output is the same (wrong).
--If, in the native print setup dialog, I go to the "printer settings", the page size there is also set to Letter; if I change that to A4, and then return to the print settings, then A4 becomes "A4 (100%)". If I print with these settings, the outputut is the same (and still wrong).

4. Under Firefox 2.0 (2.0.0.1) (on Windows), I successfully worked around the problem using "about:config" and manually editing all the printer page_size settings by hand.
- This worked.

5. Under Firefox 3.6 (3.6.12) (on Windows), the about:config workaround does *not* work - Firefox ignores any changes I make to the page_size_* settings, and in fact changes them back whenever I print to that printer.

6. Under Firefox 5 (5.0) (on Windows), the print_paper_* settings no longer exist in about:config.
- I have tried using "native" print setup window, and the values are always ignored.

I have a generated HTML page (timesheet report) that fits almost exactly on 2 A4 pages, but Firefox *always* renders it using Letter size, causing the bottom of the first page to be printed at the top of the second page; the content of the second page to start half-way down the second page; and the bottom of the second page to be truncated and not printed at all.

7. Google Chrome can print the same report perfectly.
- Sadly, this is my current workaround.

8. Interestingly - if I render the report in Firefox using IETab, then the pages print correctly as well.
--When I do this, the "Print Preview" window is different (it comes from IE); the printer preferences dialog is the same native dialog, but it shows the (correct) value of A4 by default, rather than Letter as it does when that same dialog is called up by Firefox.

This problem has been around, in some form, since Firefox 0.9.something, and it still exists. The indications are that there is no simple fix or patch that will correct it.
Perhaps the solution would be to take an existing open-source printing sub-system that works, and integrate it into both Firefox and Thunderbird?
The printing system from OpenOffice seems to work correctly on all platforms...

Cheers!
Nik

Revision history for this message
In , Karlt (karlt) wrote :

Best file a separate bug, thanks Nik.
This bug is about the Linux implementation while you are seeing a problem on MS Windows. Fixing this bug will not fix your issue.

Revision history for this message
In , 5-mozilla (5-mozilla) wrote :

(In reply to comment #71)
> Best file a separate bug, thanks Nik.
> This bug is about the Linux implementation while you are seeing a problem on
> MS Windows. Fixing this bug will not fix your issue.

Ah, ok. I was trying to avoid bug duplication...

Cheers!
Nik

Revision history for this message
exactt (giesbert) wrote :

Same problem with Thunderbird 5.0 stable on Natty.

Changed in ubufox (Ubuntu):
status: New → Confirmed
Revision history for this message
Stéphane (stephane-treboux) wrote :

Hi,

I have the same bug in Firefox 7.0.1 on a french installation of Kubuntu 11.10.
The standard paper format in France is A4.

I always use the last stable version of Firefox distributed by Canonical.
I print each month a PDF receipt of the payment of my rent (I pay at the end of the month).
I never cared about setting the paper format.

So it is interesting to see what happened in the last years, the format of my receipts has been continuously changing over the time:
August 2008 to February 2009: A4 (intrepid)
March 2009 to March 2011: US letter (jaunty, karmic, lucid, maverick)
April 2011 to August 2011: A4 (natty)
August 2011 to now: US letter (natty, oneiric)

The change from US letter to A4 end of April 2011 can be related with the update to Firefox 4.0.
The last change back to US letter can be related with the update to Firefox 7.0.

The workaround proposed in https://bugs.launchpad.net/firefox/+bug/10910/comments/109 worked for me.
A fix should change the FF setting according to the locale.

Revision history for this message
In , Teemu Leisti (teemu-leisti) wrote :

I just did a new installation of Xubuntu 11.10, and then upgraded all the packages. The resulting Firefox version is 11.0.

I changed the contents of my /etc/defaults/locale file to

LANG="en_GB.UTF-8"
LC_TIME="en_DK.UTF-8"

then logged out and back in again. Now, when I print a page from Firefox, A4 is the paper size used, which is correct, but when I do a print-to-file, the default paper size is still letter. So this bug has not yet been completely fixed.

By the way, it's coming up on the bug's tenth birthday. Should we get together to buy something nice for it, what do you say?

Revision history for this message
Teemu Leisti (teemu-leisti) wrote :

As I just commented in the sister bug on the Mozilla bugzilla (https://bugzilla.mozilla.org/show_bug.cgi?id=147419):

I just did a new installation of Xubuntu 11.10, and then upgraded all the packages. The resulting Firefox version is 11.0.

I changed the contents of my /etc/defaults/locale file to

LANG="en_GB.UTF-8"
LC_TIME="en_DK.UTF-8"

then logged out and back in again. Now, when I print a page from Firefox, A4 is the paper size used, which is correct, but when I do a print-to-file, the default paper size is still letter. So this bug has not yet been completely fixed.

By the way, it's coming up on the bug's tenth birthday. Should we get together to buy something nice for it, what do you say?

Revision history for this message
Joachim Schwender (jschwender) wrote :

Try to put a file in /etc/thunderbird/pref, which is used by the ubuntu thunderbird with the following content:

//
pref("print.print_landscape", false);
pref("print.print_paper_size_height", "297,00");
pref("print.print_paper_size_width", "210,00");
pref("print.print_paper_size_unit", 1);
pref("print.print_paper_size_type", 1);
pref("print.print_paper_name", "iso_a4");
//
pref("print.postscript.paper_name", "iso_a4");
pref("print.postscript.orientation", "portrait");

That should work as a default for the first use of a printer.

Revision history for this message
exactt (giesbert) wrote :

@ferro : your work-around isn't working for me. which version of ubuntu/thunderbird are you on? how did you name the file?

Revision history for this message
Joachim Schwender (jschwender) wrote :

i am on ubuntu natty, with thunderbird 12 i run it on a terminal server with 20 users on it. Before that i utilized thinderbird 3 as long as i could. I had to adjust the parameters with that change, as they were a little different in version 3. I named the file "aa_paper.js", i have others in that directory too, like aa_proxy.js and aa_cache.js for variuous global settings. Files in that directory are processed in reversed sort order (at least that waas like this in version 3), therefore mine start with aa_ . File name must end with .js
When you test this, you should completely wipe or move the ~/.thunderbird folder to make sure that user settings do not interfere, because they would have preference over global settings.
hope that helps!

Revision history for this message
In , Teemu Leisti (teemu-leisti) wrote :

Happy belated tenth birthday, dear bug!

Revision history for this message
Joachim Schwender (jschwender) wrote :
Revision history for this message
Joachim Schwender (jschwender) wrote :

Add the prefs lines from #143 to the file /etc/firefox/syspref.js instead of seperate files. I tested this on a Ubuntu 12.04 with firefox 13 and it works as defaults for user-settings that you create after that change. It does not override user-settings that exists already! In this case you can change these settings with #147. In #143 i am referring to thunderbird. I hope this is not confusing, but this works equivalently for firefox if you user /etc/firefox/pref instead of /etc/thunderbird/pref. In theory you could also use /usr/lib/firefox/defaults/pref for the settings but anything you change here will be gone with the next firefox update.

Revision history for this message
Joachim Schwender (jschwender) wrote :

I must correct: the subdirectory /etc/firefox/pref is outdated and no more used by recent versions in ubuntu. Put adjustments to /etc/firefox/syspref.js works.

Revision history for this message
Joachim Schwender (jschwender) wrote :

You can also lock down these settings, then these settings override user-settings. To do that you have to use
lockPref("print.print_paper_name", "iso_a4"); instead of pref("print.print_paper_name", "iso_a4");. This has been improved, as it did not work properly with older versions of firefox.

Revision history for this message
Paul Crawford (psc-sat) wrote :

This bug is STILL not fixed in 10.04 with Firefox 14.0.1
Is this related to bug #627648 that applies to both Firefox and Thunderbird and why, after 8 YEARS is this still an issue for the majority of the world that use A4 paper and not US Letter?
Seriously, what is happening here?

Micah Gersten (micahg)
no longer affects: firefox-3.0 (Ubuntu)
no longer affects: firefox-3.5 (Ubuntu)
Revision history for this message
Micah Gersten (micahg) wrote :

Cleaned up the bug tasks a little, we don't need 2 upstream tasks since this is in the Core. firefox-3.5 and firefox-3.0 don't exist in supported stable Desktop releases. Ubufox isn't affected either as it's doing nothing wrong.

no longer affects: ubufox (Ubuntu)
Changed in thunderbird (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Changed in firefox (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
no longer affects: thunderbird
Revision history for this message
Paul Crawford (psc-sat) wrote :

Just to add to this bug discussion my observation in bug #627648 that the about:support setting for user-modified parameters do not appear to change in any when you alter the global paper size, which may be related to why this is continually reset on version 'upgrades'. This trait makes the lack of correct system-based defaults even worse as every user's account has to be manually reset following any security fixes, etc, for Firefox and Thunderbird.

Revision history for this message
Roland Orre (roland-orre) wrote :

I noticed that when I set
print.postscript.paper.size = iso_a4
instead of A4, in about:config
I do no longer get the warning message from Gtk
(I noticed that there were a few other settings that used iso_a4)
I did work though but I don't like warning messages.

Changed in firefox (Baltix):
status: Invalid → Confirmed
Revision history for this message
John John Doe (johnjohndoe) wrote :

I cannot manage to find the right setting for Firefox 17.0.1 on Ubuntu 12.04.
Can someone please provide an advise on how to configure A4 as the default page size?

Revision history for this message
Andre (ajx) wrote :

Hello John, I'm sorry. This is not a support forum. Please head over to http://askUbuntu.com/ where you will get quickly a reply. You can login to AskUbuntu with your Launchpad/Ubuntu-Account by choosing OpenID.

Revision history for this message
Matthias Andree (matthias-andree) wrote : Re: [Bug 10910] Re: Default page size for printing is letter

Am 18.12.2012 04:55, schrieb Andre:
> Hello John, I'm sorry. This is not a support forum. Please head over to
> http://askUbuntu.com/ where you will get quickly a reply. You can login
> to AskUbuntu with your Launchpad/Ubuntu-Account by choosing OpenID.
>

"Cannot find" entails "is not listed", and may be a related bug. Do not
bluntly brush these off, but handle properly.

Revision history for this message
rpr nospam (rpr-nospam) wrote :
Revision history for this message
In , Berend De Schouwer (berend-de-schouwer) wrote :

In firefox 20.0, print to file defaults to letter. If I change this to A4, the PDF file on disk is still marked as size Letter. So various PDF readers assume it's Letter.

Revision history for this message
In , Berend De Schouwer (berend-de-schouwer) wrote :

in print-to-file I first have to select a different paper size (any different paper size), then re-select A4, then I get A4 paper size in the .pdf. Otherwise I get letter.

printer_Print_to_File.print_paper_name=iso_a4

Revision history for this message
Bruce Kingsbury (zcat-u) wrote :

I like everything else about firefox except for this one infuriating bug.

This bug was first filed in 2004. It's now 2013. I've just upgraded to Firefox 24.0 on Debian and my default paper size has, once again as it does every upgrade, reverted to the US_Letter papersize.

I live in the other 96% of the world that uses A4 paper, so every time I try to print from Firefox I get an error message on my printer.

OpenOffice and Libreoffice get the paper size right. GIMP gets the paper size right. Inkscape gets the papersize right. Abiword gets the paper size right. Gedit gets the paper size right. Tuxpaint gets the papersize right. EVERY OTHER program I use under any distro of Linux manages to correctly determine that I use A4 paper and doesn't give me any problems.

But not Firefox.

Firefox defaults to US_Letter. Even though my printer is set for A4. Even though my language is en_NZ. Even when I've manually changed ALL of the defaults back to A4 under about:config it still bloody-mindedly sets everything back to US-Letter every singe time there's some minor point-update of Firefox.

Firefox is the ONLY program that does this.

And it's been doing it far too long.

Pleas, for the love of Free Software, FIX THIS BUG.

Revision history for this message
Bruce Kingsbury (zcat-u) wrote :

So continuing my previous rant;

I have just followed the procedure of

1) Download Firefox-24.0 English(UK) version for Linux
2) Download Firefox-24.0 English(UK) version for Linux again and compare just to be sure I didn't accidentally get the wrong one
3) Check environment and observe LANG=en_NZ.UTF-8
4) Check printer settings and see that default paper size is A4
5) rm -rf ~/.mozilla so there are no previous settings.
6) As root, rm -rf /opt/firefox and extract the one I just downloaded
7) as normal user again, run firefox and get the usual first-run page
8) about:config and search for paper_size

Observe that paper size is letter.

There is nothing on my computer that suggests it should be using letter, and as mentioned earlier no other program that I ever print from has EVER decided that the paper size should be letter. Only firefox gets this wrong. It's been getting it wrong now for about ten years.

Revision history for this message
In , Bruce Kingsbury (zcat-u) wrote :

I have just followed the procedure of;

1) Download Firefox-24.0 English(UK) version for Linux
2) Download Firefox-24.0 English(UK) version for Linux again and compare just to be sure I didn't accidentally get the wrong one
3) Check environment and observe LANG=en_NZ.UTF-8
4) Check printer settings and see that default paper size is A4
5) rm -rf ~/.mozilla so there are no previous settings.
6) As root, rm -rf /opt/firefox and extract the one I just downloaded
7) as normal user again, run firefox and get the usual first-run page
8) about:config and search for paper_size

Observe that paper size is letter.

There is nothing on my computer that suggests it should be using letter, and no other program that I ever print from has EVER decided that the paper size should be letter. Only firefox gets this wrong. It's been getting it wrong now for well over ten years.

I like everything else about firefox except for this one infuriating bug.

This bug was first filed in 2002. It's now 2013. I've just upgraded to Firefox 24.0 on all my machines and my default paper size has, once again as it does every upgrade, reverted to the US_Letter papersize.

I live in the other 96% of the world that uses A4 paper, so every time I try to print from Firefox I get an error message on my printer.

OpenOffice and Libreoffice get the paper size right. GIMP gets the paper size right. Inkscape gets the papersize right. Abiword gets the paper size right. Gedit gets the paper size right. Tuxpaint gets the papersize right. EVERY OTHER program I use under any distro of Linux manages to correctly determine that I use A4 paper and doesn't give me any problems.

But not Firefox.

Firefox defaults to US_Letter. Even though my printer is set for A4. Even though my language is en_NZ. Even when I've manually changed ALL of the defaults back to A4 under about:config it still bloody-mindedly sets everything back to US-Letter every singe time there's some minor point-update of Firefox.

Firefox is the ONLY program that does this.

And it's been doing it far too long.

Pleas, for the love of Free Software, FIX THIS BUG.

Revision history for this message
In , Jaccoud (jaccoud) wrote :

I have submitted a duplicate and have been following this bug for years, saddly seeing no resolution at all. Some stuff must be made clear:

Paper size names are surely locale dependent ("Letter" in the US is "Carta" in Brazil), but the default value for the paper size is NOT. It is determined by the host operating system, i.e., the software component which is responsible for handling the printers and their queues. Any default value provided by Firefox, anywhere, is WRONG. Please find every line setting a default value and get rid of it.

I have not noticed this bug acting for quite a while in Windows and Mac OS, so this is clearly a platform independent feature which which was corrected the wrong way, probably in the platform dependent module. The linux module should get this values from cups, and that's it -- why on earth does 'letter' keeps popping up? Where does this value come from? Please get rid of it, I already abandoned Firefox for any printing in my Linux boxes, and I am on the verge of abandoning it whatsoever, just because of this stupid little bug which persists for more than a decade.

I cannot even find a place to buy letter-sixed paper if I needed to. It doesn't exist in Brazil, although some weird legal sizes are still used in some time-shifted places like notary offices and advocacy firms.

Weather websites are smart enough to tell I'm im Rio de Janeiro, but show temperatures in Fahrenheit and wind speed in miles/h. My new GPS app knows I'm im Brazil but shows distandes in miles and yards. My music editor (made in Europe!) gets the paper size right, but still defaults margins in inches, and worst: when I change them, they get rounded to the nearest inch fraction, so I keep getting 2.98 mm instead of 3.00 ! How an European software chooses to use inches inside it is beyond my understanding. This must have something to do with (very old) development frameworks.

Firefox should not be this dumb, and specially not in a internationally freely distributed OS like Linux.

Please do something. Let us get rid of all US medieval defaults, they're like a curse.

Revision history for this message
In , Teemu Leisti (teemu-leisti) wrote :

I completely agree with the last two commenters. This bug is getting beyond ridiculous. It is an embarrassment for Mozilla. Just fix it, already.

Revision history for this message
In , Dev-oskar (dev-oskar) wrote :

Well the whole situation is very complex, the other platform code is more or less broken too.
Bug 629500 sums the whole situation quite good and looks like a welcome refactor of the whole code base, maybe it will land in the next years? Feels like gecko/firefox printing is stuck in IE6 age...

Revision history for this message
In , higuita (higuita) wrote :

I'm also annoyed that every firefox i run have the letter as default page size... and of course, one only discovers this after trying to print and nothing show up on the printer.

If in the past, print was little used, with the PDFjs, people start to print a lot more from firefox, making this issue more important.

If this can not be "fixed", at very least remove the default, leave it BLANK... on first printing, ask what paper size one wants... is not as friendly as a default, but having a broken default, trying to print and getting nothing is even worst. Most people will never know that the problem is the wrong paper size and don't understand why they don't have any printout.

Revision history for this message
In , Dev-oskar (dev-oskar) wrote :

https://bugzilla.mozilla.org/show_bug.cgi?id=947125

Actually, while the windows version works better, it is screwed too, specially on unusually paper sizes and margins.

The main problem with "letter" is, that the gtk code part can't understand ps paper names, and the ps paper names doesn't understand iso_a4.

The right solution would be to drop the whole thing and query printer and paper names directly via ipp or use only gtk code and throw the old cups lib and ps based query solution.

Considering the other bug #629500 is stuck as well.
My solution will be my own private inhouse addon as can no longer wait for a solution.
The win32 version works more or less, except CSS2 Margins are still broken.
For the linux version I plan to to use a ipp based solution or directly accessing cups via js-ctypes.

Accessing CUPS via socket and ipp protocol, query paper sizes, create a postscript file and send it directly should be a more future proof technology. Technical that should work on OSX and if you have the right url with any ipp aware network printer, but that isn't my goal.

Revision history for this message
In , Karlt (karlt) wrote :

This bug is not half as bad now that the fix for bug 446041 provides that
print.print_paper_* prefs (once they exist) will override
print.postscript.paper_size.

The print.print_paper_* prefs will record the previous setting, but this will
only be different from print.postscript.paper_size if the value is been
changed in the page setup.

There is also much code here that can be removed and so make the use of
different prefs somewhat less confusing.

Revision history for this message
In , Karlt (karlt) wrote :

Created attachment 8620681
remove ununsed nsIPrintSettings::printCommand and print_command prefs

These was used only to write to and read from each other.

Revision history for this message
In , Karlt (karlt) wrote :

Created attachment 8620682
use GTK default paper size and orientation

In the nsPrintSettingsGTK constructor, gtk_paper_size_new(nullptr) gets the
system default paper size from the locale and gtk_page_setup_new() sets
default orientation to portrait.

These are subsequently overridden by prefs if any have been saved from
a previous nsPrintSettingsGTK.

Revision history for this message
In , Karlt (karlt) wrote :

Created attachment 8620683
remove print(|.<modulename>)(|.printer_<printername>).filename pref reading code

There are no default pref values, and even if some have been set, the value
is subsequently overridden by the print.print_to_filename pref, which exists
if saved from a previous nsPrintSettingsGTK.

Revision history for this message
In , Karlt (karlt) wrote :

Created attachment 8620684
remove meaningless GetPrintMethod()

Revision history for this message
In , Karlt (karlt) wrote :

Created attachment 8620685
part 5: remove ununsed plexName colorspace resolutionName and downloadFonts

This was only used to write to and read from otherwise unused preferences.

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

Comment on attachment 8620682
use GTK default paper size and orientation

Review of attachment 8620682:
-----------------------------------------------------------------

So with this patch, do we still remember the user's paper size in some way? How?

Revision history for this message
In , Karlt (karlt) wrote :

Comment on attachment 8620682
use GTK default paper size and orientation

(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #89)
> So with this patch, do we still remember the user's paper size in some way?

Yes. The code removed here was not reading user's prefs. Those prefs were never saved.

> How?

(In reply to Karl Tomlinson (ni?:karlt) from comment #85)
> These are subsequently overridden by prefs if any have been saved from
> a previous nsPrintSettingsGTK.

This happens in nsPrintOptions from InitPrintSettingsFromPrefs(), called after
InitPrintSettingsFromPrinter().

https://hg.mozilla.org/mozilla-central/annotate/9ebd530c5843/widget/nsPrintOptionsImpl.cpp#l542
https://hg.mozilla.org/mozilla-central/annotate/9ebd530c5843/dom/base/nsGlobalWindow.cpp#l7011

Revision history for this message
In , Karlt (karlt) wrote :

Created attachment 8621437
part 4: remove meaningless GetPrintMethod() v1.1

Also removed a now-unused nsresult and a repeated argument sanity check.

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

Comment on attachment 8621437
part 4: remove meaningless GetPrintMethod() v1.1

Review of attachment 8621437:
-----------------------------------------------------------------

Delicious!

Revision history for this message
In , Pulsebot (pulsebot) wrote :
Revision history for this message
In , Ryanvm (ryanvm) wrote :
Changed in firefox:
status: In Progress → Fix Released
Revision history for this message
In , Byian (byian) wrote :

This appears to have broken printer settings on Windows with e10s enabled (bug 1176141).

Revision history for this message
In , Byian (byian) wrote :

(In reply to Brian Birtles (:birtles) from comment #95)
> This appears to have broken printer settings on Windows with e10s enabled
> (bug 1176141).

My bad, this bug has nothing to do with it.

Revision history for this message
Teemu Leisti (teemu-leisti) wrote :

Fix released? Amazing! Will we see it in Ubuntu 15.10?

Revision history for this message
John Drinkwater (johndrinkwater) wrote :

Should land for Firefox 41, which will be a few weeks (22nd Sept) before 15.10 arrives.

Revision history for this message
Elias Aarnio (elias-aarnio) wrote :

The fix does not work as per now.

My suggestion is: erase all countries 1) using letter size paper and/or 2) using imperial measurements instead of metric.

I'm fed up with the "bliss" of not knowing anything about life outside one's own country.

Revision history for this message
rpr nospam (rpr-nospam) wrote :

I've tested Firefox 41 on Ubuntu 15.04 and I'd say that the issue has been fixed. Here is the test procedure:

(1) Check your Regional Formats in System Settings > Language > Language Support > Regional Formats. Let's say this option is set to "English (United Kingdom)" (if you change it, the change takes effect the next time you log in). That option will change the environment variables for various locale categories including LC_PAPER.
(2) Start Firefox with default user settings. You can do it by running "firefox -P" and creating a new user profile.
(3) Try to print (Ctrl+P). On the Page Setup tab you get "Paper size: A4".

I get this result even without step (2).

If the Regional Formats are set to "English (United States)" then you get "Paper Size: US Letter".

You can also test this without changing Regional Formats: in the Terminal Window run the following commands and check the paper size as in step (3) above:

LC_PAPER=en_GB.UTF-8 firefox

LC_PAPER=en_US.UTF-8 firefox

Revision history for this message
ebrjvd (jos-van-dyck) wrote :

Paper size shall be independent of language or locale.
It should be a parameter that can be set by the user, depending on stationery that is being used in the printer.
There may be a default size, depending on geographical region (normal paper size sold in that country), but NOT on language.

Revision history for this message
Elias Aarnio (elias-aarnio) wrote :

The bug still exists in Thunderbird (not sure about Firefox). Every time Thunderbird is updated the paper size is changed to letter even if the user uses locale for which the right size is A4.

Check out this: http://ubuntuforums.org/showthread.php?t=889088&p=12423297#post12423297

Could it be the case that when Thunderbird update is installed, update process does not check at all what is 1) in the locale or 2) what value Thunderbird config variable print.postscript.paper_size has? This would explain the nasty behaviour.

Revision history for this message
Elias Aarnio (elias-aarnio) wrote :

I tested my hypothesis above. I made a Live USB stick with space to save settings and updates. I used ubuntu-14.04.2-desktop-amd64.iso. After changing languge settings to finnish and installing all localization files I opened Firefox for the first time. Paper size in firefox was letter, not A4 as it is supposed to be.

Then I changed the variable print.postscript.paper_size to iso_a4 in Firefox config, closed and reopened Firefox and checked if the paper size change persisted. It did, also it was still A4.

After that I did sudo apt-get update followed by sudo apt-get upgrade. After that and restarting Firefox the paper size was still A4.

I think this proves my guess was wrong.

There is something else that changes the paper size _back_ to letter size from A4 because this happens to me quite often.

Revision history for this message
rpr nospam (rpr-nospam) wrote :

Elias, in you comment #175 you didn't wrote which version of Firefox you had when you run it for the first time.

Also, have you noticed that if you make a change in
Regional Formats in System Settings > Language > Language Support > Regional Formats
the change takes effect the next time you log in (see my comment #172).
Then check what you get when you run the locale command in the terminal window.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.