Closed Bug 498115 Opened 15 years ago Closed 13 years ago

Printer preferences default to incorrect page size (A4 - Envelope) due to incorrect printer page size enumeration (assumption) and inability to set default page size in UI

Categories

(Firefox :: General, defect)

3.0 Branch
x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: bitminer, Unassigned)

Details

(Whiteboard: [CLOSEME 2011-05-30])

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729).  Inability to change page layout using page setup.


Firefox is incorrectly selecting defalut page size from printer enumeration of page sizes.  For Brother HL-1440 series, pages enumerate in: A4, Letter, Legal, Executive, A5, A6.  Therefore Firefox incorrectly assumes the first in the list is "Letter", but it is A4 so Firefox prints in A4 regardless of default printer settings set in control panel.  There is seemingly no way to set default page print layout in Firefox

Reproducible: Always

Steps to Reproduce:
1. Install on WinXP with printer where the printers enumerate with letter sizes where the 0 index is not Letter (such as A4)
2. go to google maps (type in any location)
3. Select print preview (or print) and page will print based on defalut 0 index page size for printer.
Actual Results:  
View of google maps shows layout printed in A4 with no way to change layout to correct page size.

Expected Results:  
Firfox should correctly select Letter ad default page size not simply zero index of page enumeration.  I also expect ability to change page type to print to to allow printing to other page types.

I believe ability to print is a Major feature.  Temporarily switching to Internet Explorer for printing until this is fixed.
Would setting "Letter" set as the default page size on your login help? (ie, go to Printers and Scanners page and set default paper size for your printer to Letter). Curious: how did you know the printer has this paper size order? Now I am curious as to how I can determine this on my printers. :-)
> Would setting "Letter" set as the default page size on your login help?  I do not think this is possible.  Only the default printer can be set, not default print settings for the default printer.

Regardless of the printer automatically selected by Firefox, Firefox should allow the user to select what page type to print to... so even if it did default to letter, and I wanted to print on a larger legal page size I should be allowed to do this.

> Curious: how did you know the printer has this paper size order? Now I
am curious as to how I can determine this on my printers. :-)

Answer: On Xp Start->Settings->Printers->Right Click Default Printer-> Go to Page size ... Now for the printer in question There was no Dropdown as there is in some printers which would allow me to select default page size for the printer, so partially this is a driver problem as this particular printer was defaulting to A4, the first in the list (the list which was a list box with none selected or selectable) - I know weird right?

For "normal printers" you should see a combo box which may be sorted alphabetically or in order of enumeration by index (which is what the printer driver in question did) and would normaly allow the person to select the default print page size (I have checked other printer drivers)


I tried printing in Firefox version:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1

Running on a different computer and this UI is as expected allowing user to change printer and page size to print to.
I have this problem but the other way around. Living in Europe I need to use A4 but Firefox refuse and always defaults to US Letter. 

I when bogus and tried Chromium too and found that it uses the same printer dialog. I am runing Linux (gentoo) and KDE and perhaps this issue belongs to GTK printer settings rather than firefox. 

Anyhow I found a workaround: I went into the about:config and changed all letter to a4 (and na_letter to na_a4) and this time I managed to print a page. 

It is really annoying that one cannot select paper size and rotation in the print dialog, at work we have printers taking both A3 and A4 and the choice depends on what I print.
I suspect Firefox merely uses the paper size that the printer driver hands it.  For example, when I print from Firefox, the Print Dialog window opens and one can select their printer of choice (eg, I have a Canon S820 and Win2PDF Pro). Next to that selection window is the Preferences button. That button brings up the printer manufacturer's print properties window wherein one selects paper size, orientation, etc., etc.. As you found, that printer properties window is the same no matter what application one is printing from because it is provided by the manufacturer of the printer. I've never seen a printer properties window that one could not select paper size on (the Canon S820 lists 18 metric and inch sizes plus a user-defined size). 

The reason for this two-step process is a very good one that dates back to the infancy of personal computers. Before there was a standardized printer interface, each software author had to write his own printer interface for each printer. If one wished to support 10 different printers, one had to write 10 different printer interface modules. Trust me, a former software author from the TRS-80 and MS-DOS days, this gets messy real quick.

The standard interface that present day Windows uses is a god-send for software authors; they only need to write code to the standard Windows output format. It is up to the printer manufacturer to properly interpret the code passed by Windows and adapt it to their printer driver / software.

The price for this convenience (and huge cost savings) is the two-step process: (1) the standard Windows print dialogue window and (2) the printer manufacturer's printer properties window. The price can be minimized if one selects the settings they use most often from the Printers and Faxes window (which normally becomes the default settings fed to any Windows program that tries to print). Once again, the capability to establish a default set of printer settings is up to the printer manufacturer.

Now. Having been tied to (spoiled by?) the Microsoft standard because of corporate requirements since before Windows even came out, I cannot speak to how the other operating systems (eg, Unix Linux KDE? etc) handle printers. But to be honest, IMHO they're nuts if they don't follow this same kind of two-step arrangement because otherwise it is every man for himself and chaos will reign (as it once did in the TRS-DOS and MS-DOS worlds as well I know).

@Brian: IMHO, if your printer manufacturer did not include a list of different paper sizes, I personally would look for another printer. You mentioned Brother HL-1440. I had the HL-5250DN. It was very nice, very fast, very unreliable and when I selected a paper size from the manufacturer's properties window under Printers and Faxes, it fed that paper size to every Windows app that tried to print thereafter. I am guessing the HL-1440 lack-of-a-list issue is just an anomaly or a mis-installation. I assume you installed the latest version of the driver from Brother's web site. If that isn't the cure, the only things to do are (1) to take it up with Brother tech support, or (2) buy another printer. Firefox does not dictate to the printer driver what size paper to use. It is the printer driver that tells Firefox what paper it has loaded to print on and Firefox merely formats it's output to the standard Windows printer interface to meet that size requirement. Firefox cannot tell the printer what size paper to use because every printer driver is different which would require Firefox to begin storing individual settings for each and every one of the thousands of supported printers (not to mention the version differences).

Sorry for verbosity. My only desire is to be as clear as mud at all times. :-)
Well in Gentoo-Linux using KDE it does not work that way. 

When I print I get a dialog allowing me to chose a printer and some generic settings (1 or 2 pages per paper side for example) not including the page size. There is no option to make printer configurations in this dialog. I have to close it and chose printer settings in the meny. This is a dialog not compying to any standard I have seen but I can chose the paper size (I chose A4) which is forgotten when I tries to print. 

The printer settings in CUPS are of course set to A4 and the printer is loaded with A4 and, given the error message on the printer when printing in US Letter, it is very aware of it. 

I use IPP as printing protocol and CUPS as printer manager. It is rare to have printer specific dialogs in Linux, most printers I have been using is either generic PCL or generic post script. There is a compatibility-hell in ordinary ink jets so I avoid them. Laser printers suites me so much better.

The most annoying thing is that the printer settings dialog in Firefox does not remember the page size settings. I had to go into about:config to make it apply. 

If I use the print preview it seems that I can chose size etc. The problem is that in this case I printed from a web map provider with it's own print-button and disabled menu-bar, thus no print preview was available.
(In reply to comment #5)
I am unsure if this is the same issue.
I suppose it could be called undetected page size change.

Again, Euro person using A4.

It's serious because the print queue halts if one printer is sent US Letter print jobs. Another carries on [perhaps because it's postscript and able to handles size discrepancies, which actually adds to the problem - it's the default paper printer and so a change from A4 to Letter can't reliably be detected and then accurately correlated with browsing history.]
The second default, 'print to file' prints a Letter size file without message or alert.
I've actually replaced a printer due to this. Unfortunately the new one also halts on page size discrepancy – my duh I suppose.

This only happens in Linux, this is not a window issue.
This one is: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.11) Gecko/20100714 SUSE/3.5.11-0.1.1 Firefox/3.5.11.

Steps to Reproduce:
Set paper size to A4 with file>Page Setup menu option.
Browse [and print?].

Symptoms:
Over time and without warning the A4 page size reverts to US Letter.
The only way I find this out is because the third printer halts and sends a change paper alert.
My only solution is to kill the print job and reprint [if I find the page, grr] after restoring A4 via Page Setup Menu. 
Printouts to postscript and file are undetected. 

This has been a consistent nuisance through a number of Firefox versions and I wish I could be more helpful in pinpointing the trigger.
My understanding is Firefox gets the paper size from the printer driver, applies the user-specified margins, constructs the page to fit within those margins, and sends the results along to the printer via the printer driver. If the user has set the factory printer drivers to default to a certain paper size (eg, A4), then the printer should never ask for any other size unless the software requests it.

I believe that both Erik and Tom are describing the same thing: inconsistent Linux printer drivers. Apparently the printer driver is reverting to a factory default setting either randomly (very bad news) or under a specific circumstance. Remember, software should only do what it is told to do. It shouldn't wander off to do something else. That's why we have 5-year-olds (to wander off to do something else!  LoL)

And this is exactly why Firefox cannot and should not get involved with paper size specification. How many printers are and have been on the market since 1980? Ten thousand? One hundred thousand? A million? How many will come out in the next five or ten years? Not to mention all the wacky paper / envelope / label / etc. sizes. To commit to keeping a default paper size would require that Firefox be programmed to recognize and handle ALL of these different printers (most of which are too stupid to know who they are, much less report it to an application) and paper sizes!

IMHO, it would be better to concentrate Firefox's printer interface folks on fixing the current printing problems (truncated pages, etc.).

What the Linux world needs is a reliable robust 2-step process printer driver / interface model (similar to that used by Windoze) that is open-source and universally required by the users. This is the "secret" behind Windoze success in this area. If the printer manufacturer has to issue a uniform printer driver to get a sale, you can be sure they will. If only because it benefits them in the long run in not having to "re-invent the wheel" every time they issue a new or revised printer / driver.

Erik mentioned CUPS whatever that is. Maybe these folks would like to partner with the user community to develop what is needed.

BTW, another problem here could be the file. Some formats store the original document size. This isn't a problem with Firefox per se. We used to get DOC and PDF files all the time from our home office in Switzerland. If one wasn't careful, one would find the printer waiting for A4 paper when one wandered down to the printer farm. So, you may have told the printer to default to A4 but then opened a document stating it is Letter which the application happily passed along to the printer driver when you're not looking!  :-)
(In reply to comment #7)
That's a series of very good observations with which one can't disagree (if there was any sense) - some things in linux are wilfully counterproductive - but I ain't going back and I use linux like I used windows i.e. for daily boring business and stuff like that

However I'm not entirely convinced that it's a driver issue in linux simply because no other app finds or creates this page size reversion. What I'm speculating is that this is a programming issue simply because Firefox is coded in Letter world and, it seems, seldom tested for routine and consistent A4 use. Forgive me if this is incorrect or offensive!

It is true that if Firefox left page formatting to the driver as it seems to do in wondows then the problem would not arise. At the same time perhaps Firefox must do this in linux for some reason. 

A note about CUPS. In my experience this was essential when the print to file option was not as good as it is now. I used it for a number of years and still do on a netbook simply for convenience [for the auto file name generation, fab formatting and straight to pdf without the blasted .ps that 'print to file' defaults to.] Unfortunately it seems to be quite problematic on x64 systems so perhaps you might try the default 'print to file' option. You do have to choose the right font as layout and kerning have yet to be perfected.
Hi Jim!

First of all, CUPS is a well working back end for printing in Linux. "CUPS is the standards-based, open source printing system developed by Apple Inc. for Mac OS® X and other UNIX®-like operating systems." Refer to http://www.cups.org/

The printer configuration along with  paper size is managed by CUPS and if not detected one can set it manually. I have made sure this is correct set.

In general printer dialogs are able to fetch page and printer settings from CUPS. It is only Firefox I am aware of that does not manage to read the information. 

My solution is normally to open the preference editor, search for letter, and change to a4. This works. 

The work around makes me think that the information is not read at all, or read but the preferences are not updated, or possibly read directly from the preferences. 

I have not noticed that paper size in the preferences are ever changed, so I actually assume that it is never read from the printer back end. Either it fails to fetch it or it fails to store it. 

If I change the size in printing format menu (uncertain of the name in English) it is not stored in the printer settings, though it is correctly retrieved when I set it manually. 

I think this is very easy to verify. 

Assuming you have a printer that will not print on wrong paper or warn before print. 

Print a page, you can probably print it. 

Change the paper size using the Printing Format menu to a paper format you not have. 

You can now confirm that the page is printed correct (i.e the wrong paper size is not used). 
You can use the preference editor (about:preferences or what ever) and see that the changes you made have not been stored. 

BR
Erik
One thing, perhaps I should start a new bug on this Linux issue. I vaguely remember that the printing dialogs look a lot different in Linux and Windows and this issue is actually affecting windows.
(In reply to comment #8)
correction:
My big duh. 
When I mentioned CUPS I did not mean CUPS, the 'Common UNIX Printing System'
but the PDF formatter and print to file utility CUPS-PDF - which isn't even
mentioned by anyone on this page, unless that is what someone means...
Reporter, are you still seeing this issue with Firefox 4.0.1 or later in safe mode or a fresh profile? If not, please close. These links can help you in your testing.
http://support.mozilla.com/kb/Safe+Mode
http://support.mozilla.com/kb/Managing+profiles
Whiteboard: [CLOSEME 2011-05-30]
Version: unspecified → 3.0 Branch
(In reply to comment #12)
Please do not close this.
I am able to replicate the phenomenon in pretty much all version 3 firefox. 
It is very disruptive because some printers stall without sending an error message when sent the 'wrong' paper size

It would be nice if mozilla looked at some non North-American problems. 
Do you think this fault would be this fallow if random printouts silently defaulted to A4 rather than Legal?

..and thirdly openSuse repositories do not provide version 4 yet so I can't tell if the issue has finally gone after all these years...

Thank you
(In reply to comment #13)
..and to the best of my knowledge the fault is specific to linux and cannot be replicated in windows. 

I see that the description box has Platform: 	x86 Windows XP 
This is incorrect.
The fault is specific to linux
No reply, INCOMPLETE. Please retest with Firefox 4 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). Also, ensure you have the most up to date graphics drivers, operating system updates, and plugin versions (flash, java, etc). If you continue to see this issue with the newest Firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INCOMPLETE
Do not close this.
This continues to be an issue
I don't have 4 - it's not on the repos last time I checked.

Please read the stuff. 
It might help [given that the problem is about 4 years old]
Why so quick to dispose of a bug that no-one's looked at?
no one cares about trees evidently...
Please pay some attention to this issue - the world is quite large and despite quaint and parochial impressions most of the people in it do not use 'Letter' size paper.

This is to confirm that version 5.0 has the same idiocy that persisted in version 3 and version 4.


Build identifier: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0
Reference Comment 4. Enter "about:config" and filter on "print". ALL printer settings used by Firefox are here. Notice that most are USER SET (Status column). If your CUPS / IPP / whatever puts wrong information here then you're already behind the 8-ball. NOTE that, as far as I can tell, the settings are only saved AFTER you print. So changing margins or paper size then closing the print dialogue without printing anything does not help you (according to WPrime on a Ubantu forum). Also, documents that store their own printer settings (PDF, DOC, XLS, etc.) WILL OVERRIDE Firefox settings (as they should since it is assumed they are the last best information source).

To attack this problem properly, one should create a new user (so there is a clean user profile). Firefox will create a set of parameters for each printer it finds in the operating system's printer list. Then set a preferred printer and print something. This will set "print.print_printer" to that printer. Then use the Firefox and printer print dialog boxes to set your default settings and print something. This should set the "print.printer_[your printername]" parameters. Check "about:config" to see what was set and saved. Now it's time to play with those settings (as several in the Ubantu forums have reported) AND the "print.save_print_settings" and "print.use_global_printsettings".

This bug entry (NOT the actual problem) is dead due to too much detritus. Best to do the homework, find out what is, and what is NOT, being saved vis-á-vis the print configuration settings, and start a new bug (mention this bug in the intro for reference) documenting what is actually happening. This will require someone with time, troubleshooting and technical skills, and Linux experience so regular users should just refrain from clogging up the channel with lots of whining about the "problem" (eh, Tom?). Sorry I can't help more. I have no Linux experience. Supporting family and the job search eats up most of my time. But I know that there are more than a few gifted folks in the Linux world that can handle this so I am not worried. It just takes a methodical approach. anon
(In reply to comment #18)

..and the purpose of your post might be...

This problem is persistent; it was reported years ago and symptoms now span three versions. 

What do you think I've done in the intervening years? Nothing?
Fiddled with profiles? No. Changed printers? Nah. 
What makes you think I did nothing to isolate an issue for three years....
I mean, how could I conceivably be using Firefox 5 three years ago?
The saintly hints and tips that might have been remotely useful two and a half years ago are now merely cruft.

I like your bit:
“This bug entry (NOT the actual problem) is dead due to too much detritus.”
I might be less tetchy had I found the problem last week. 
What is the bigger issue here; a person's rudeness or the parochialism [or institutionalised racism, if you like headline text] of an open source organisation?

For the last time - replication: 
[I refer to menu command File > Page Setup]
Set up A4 paper ecosystem on Linux [Linpus, OpenSUSE but no Ubantu [sic]]
Install any recent Firefox browser, set paper size to A4 and use for an unknown but extended period.
Print as required [the issue of printers is moot, problem can be replicated using print to file]
At some as yet unidentified point the paper size changes to Letter.
[don't forget that printers halt on paper size mismatches]
I am responsible for a number of Linux user desktops and the problem pervades every installation [and I don't use Ubantu, fanx]
saintly hints and tips?
racism?

Are you sure you are on the right site? I can't even tell you where Mozilla is. For all I know they're headquartered in the UK and measure everything in millimeters all the while muttering about those d*** colonists and their inches. LoL

So far I've only heard you complain about how the printer settings don't "stick". That actually isn't helpful after the first mention. What's needed are facts based on a clean sheet (and you know this ... I can tell) using a step-by-step process carefully documenting as one goes. In other words, one needs facts to continue.

What are the print. settings (1) after a new profile is established, (2) after a default printer is selected USING the OS default printer selection NOT Firefox, (3) after default print settings are selected USING the OS printer setup NOT Firefox, (4) after starting Firefox and printing using the default printer settings defined OUTSIDE of Firefox, (5) after changing a printer setting IN Firefox, (6) do the print. settings stay put after a print job? (7) do the print. settings stay put after re-starting Firefox? (8) do the print. settings stay put after re-starting the OS. Do the print. settings change when one uses File/Page Setup (which on Windows only allows one to change margins and header/footer text, essentially)? Do print. settings change if one selects a different paper size AND THEN PRINTS? 

At some point, the print. settings won't respond and then we can examine the logic and say, "Should they change here? If so, why didn't they? If not, why do we think they should? etc etc".

I still think Firefox merely reads the default printer settings when it starts and then records some printer settings you make on the fly via the print dialog. In the Windows world, not all settings "stick". On purpose. For example, if I print page 1 only of a four page web site, the next time I print it defaults back to all pages. You really want it that way. For example, if I decide to print this document double-sided, I don't want that to lock in and it doesn't. But when I have a lot of documents I'm doing double-sided, I use the OS's printer dialogue to set double-sided as the default and voilá, every program opened thereafter prints documents double-sided. Something to note: Firefox print. settings only address physical size; in other words Firefox only retains a size (eg, 11 inches by 8.5 inches). In other words, Firefox doesn't know A4 from letter from anything else. If the printer doesn't respond with proper numbers for Firefox to record ... well, that's a printer driver problem. If one lies to the cops, one can hardly be put out when they act on what they're told.

I'm a design engineer. I deal in facts. I don't care if a document is A2, 8.5x5.5, A3, 8.5x11, A4, 11x17 etc etc etc. In fact, I worked in an office for 14 years where documents came all different sizes because some offices were in the US, some in Sweden and some in Germany (not to mention the offices in South America). The only problem I ever had was when someone would nick the A4 paper out of the alternate tray and the printer would hang when I sent it an A4 document. I'm not much of a M$ fan (but the companies I work far are) but I see now I was fortunate on two accounts: Windows doesn't seem to suffer this issue and that Canon ImageRunner all-in-one must have been auto-selecting when it came to paper size.

BTW, you think this issue is persistent? The print preview / print formatting problem has been around for a decade I think. The date April 2001 sticks in my head for some reason but I'm note sure without a lot of searching and I used my free time on this verbose response. LoL 

P.S. Aren't Linux, Unix, Ubantu, Red Hat, etc. etc. just different flavors of the same base OS? I got that impression a while back.
Tom, Jim, if you don't keep this mature and on focus, read (https://bugzilla.mozilla.org/page.cgi?id=etiquette.html) then I'll be forced to have Gerv moderate and possibly ban you. Keep the conversation civil, both of you.
(In reply to comment #21)

ban away....
I can't really care. In my own way I've tried to help...
After I could not resolve the problem myself I reported a pervasive problem that's been a major impediment to use. 
The report has been mishandled, misdocumented, misfiled [as a windows bug] and in fact ignored.
The most activity there has been is a routine closure warning...

How is a ban going to suppress or stifle my chances to get what I think is a bug resolved when you'd already killed the bug report months beforehand and marked it as 'RESOLVED INCOMPLETE' 

What is the point of this bug reporting site when there has not been a single sane or sensible response or enquiry to the Linux specific bug report?
Hi Tyler ... this is precisely what I am talking about ... we need facts to work this out ... not threats and complaints about stuff that doesn't work. 

I've pointed out that this thread is technically closed. I've suggested that the problem needs to be researched in more detail and a new bug report filed, presumably with the proper OS called out. I've pointed out what Firefox variables need to be checked. I've pointed out a process by which said facts can be determined. I've called for reason over rancor albeit I tend toward verbosity. I think I have gone above and beyond considering I am not a Linux user and lack the time and money to become one; not to mention all my employers have been solidly stuck in the M$ camp so all my tools and experience are M$ related. I cannot help anyone here any further. I have dragged the proverbial horse to water but I cannot force it to imbibe. Cheers.
Jim, first, this bug has not been closed forever, it can always be reopened. Second, the operating system was set by the person who originally reported the issue. if you are seeing this with Linux and NOT windows, then it may be possible you are seeing a totally different issue, which in that case means you should create a fresh report.
You need to log in before you can comment on or make changes to this bug.