Open Bug 445894 Opened 16 years ago Updated 2 years ago

Firefox 3 prints GetFirefox.com with large horizontal margins on WinXP, triggering page-scaling

Categories

(Core :: Printing: Output, defect)

x86
Windows XP
defect

Tracking

()

People

(Reporter: george.shreve+Bugzilla, Unassigned)

References

()

Details

Attachments

(13 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1 All of my printouts with Firefox 3 (3.0 and 3.0.1) have significantly smaller text than what is produced with Firefox 2 (and IE 7). Also, I am usually seeing huge left and right margins. I discussed this with Daniel Holbert earlier today (in bug 433373), and he asked me to open a new bug report for this problem. Reproducible: Always Steps to Reproduce: 1. Go to GetFirefox.com (http://www.mozilla.com/en-US/firefox/?from=getfirefox) 2. Print the whole page (print selection is not necessary to see the problem) Actual Results: Text output is significantly smaller relative to Firefox 2 and IE 7. I usually see huge left and right margins too. Expected Results: Similar print results to Firefox 2. Only in one case so far (that I discussed with Daniel Holbert earlier today in bug 433373) were the left and right margins normal; however, the text was really squished down so that everything would fit on one page. For the exact same data, Firefox 2 and IE 7 would take 2 pages and display everything in an easy-to-read font.
Component: General → Printing
Product: Firefox → Core
Version: unspecified → Trunk
Firefox 3.0.1 printout of GetFirefox.com shows small text and huge left and right margins.
Here is the expected behaviour that is produced with Firefox 2 (this attachment was produced with today's firefox-2.0.0.17pre.en-US.win32 build).
If it makes any difference, I am running Windows XP Service Pack 3.
As noted in bug 433373 comment 51 and bug 433373 comment 58, shrinking of text (and all other page content) is normal when the print engine thinks the content is too wide to fit on a page. So the underlying problem is the weird large margins (which make Firefox think the page is too wide and triggers the scaling). Updating summary to reflect this.
Summary: Firefox 3 prints with significantly smaller text and huge left and right margins (Firefox 2 does not have this problem) → Firefox 3 prints GetFirefox.com with large horizontal margins on WinXP, triggering page-scaling
Here's the printed output I get from Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1 Note that there are no weird margins or unnecessary scaling.
George: Can you try printing a plain text document in FF3.0.1, like this one: http://releases.mozilla.org/pub/mozilla.org/firefox/releases/README and post the PDF here for comparison? (I'm curious if you get weird margins everywhere, or if it's something special about getfirefox.com) Can you also try printing getfirefox.com in FF3.0.1 using a freshly-created profile? (It's possible that one of your about:config printing prefs is messed up, perhaps from upgrading your profile from Firefox 2 to 3. If that's the case, your profile would be broken, but a fresh profile would be fine.)
George: Also, do the weird margins on getfirefox.com show up in print-preview as well?
Daniel, yes, the weird Firefox 3 margins at getfirefox.com show when I try Print Preview and also when I print to a printer.
Daniel, here is the Firefox 3.0.1 printout you requested.
Firefox 2 prints text much larger. Firefox 2 has a left margin, but Firefox 3.0.1 does not have a left margin (or a very small left margin).
Daniel, I've created a brand new profile in Firefox 3.0.1. The text appears to be slightly larger than Firefox 2!! So upgrading from Firefox 2 to Firefox 3 must have damaged my profile somehow. How do I repair it?
Daniel, here is GetFirefox.com with a brand new profile. It is virtually identical to Firefox 2. How do I fix my Firefox 3 profile that worked fine when I was back on Firefox 2?
Here are my print settings. I typed "about:config" and then I filtered based on the word "print" (without the quotes). Is there anything wrong?
(In reply to comment #13) > about:config - filtered by "print" > [...] > Is there anything wrong? Nothing that I see right away, but I bet the problem's in there somewhere. You could try clearing all of your profile's custom print settings, and then restarting firefox, to see if that fixes it. (The easiest way to do that is to close Firefox and then edit [profile_dir]/prefs.js by hand, deleting all lines that mention "print") If that fixes it, I'd be interested to see the "print"-related lines that were in your prefs.js file. (I think the file you already attached includes many settings that still have their default values, so it's not as handy.)
(I'd make a backup of the prefs.js file before you edit it, in case you accidentally break it, and also so you can go back and see what the offending line was if editing the file fixes your problem.)
Here are all the "print" items from my prefs.js file. Does anything look wrong?
This looks bad: user_pref("print.printer_Adobe_PDF.print_scaling", " 0.66");
I removed all print items from my prefs.js file and printing GetFirefox.com prints the same as a brand new profile.
Cool, glad that fixed it. I'm guessing the print_scaling line from comment 17 was the culprit. Resolving as INVALID, as it doesn't look like there was a browser bug involved here.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
Daniel, I went back to my original pref.js and I removed the one line that you identified. Printing is behaving odd again.
So if I go back to removing all "print" items from my prefs.js file, is there any trouble that I might run into? That is, is it totally safe to remove all my "print" items from prefs.js?
(In reply to comment #20) > Daniel, I went back to my original pref.js and I removed the one line that you > identified. Printing is behaving odd again. You might try removing all print_scaling lines from prefs.js -- I noticed at least one other one in there. (In reply to comment #21) > That is, is it totally safe to remove all my > "print" items from prefs.js? Yes -- Firefox will just use the default values for those prefs, which should be completely safe.
Daniel, anyway it's strange that there are differences between Firefox 2 and Firefox 3. Does Firefox 2 not recognize the scaling pref and prints out the document normal?
Daniel, I removed all three print scaling lines in my original prefs.js file. As shown in the attachment: 1) text is now larger than expected (compare to 3.0.1 brand new profile and Firefox 2) 2) the left margin is now smaller than expected. It appears that the print scaling lines are necessary and should not be removed.
You're right, it is just slightly bigger than your fresh profile printout. That's interesting. In that case, I'd copy any print_scaling lines from your fresh profile's users.js into your broken profile. (If that doesn't work, maybe any other print_* lines that look relevant.) (In reply to comment #23) > Daniel, anyway it's strange that there are differences between Firefox 2 and > Firefox 3. Does Firefox 2 not recognize the scaling pref and prints out the > document normal? It's possible that Firefox 2 was reading a different print-scaling pref. (like your SnagIt_8 one, which has value 1.00)
OK, I copied the print_scaling from the brand new profile to my prefs.js (I don't have a user.js file). As you can see in the attachment, this is no different from simply removing print_scaling (in the previous attachment). So either removing print_scaling or setting it to 1.00 makes the text larger and reduces the left margin (compared to 3.0.1 new profile and Firefox 2).
For the past hour and a half, I've been playing around with different print settings such as print_scaling, print_shrink_to_fit, print_paper_size, print_margin_bottom, print_margin_left, print_margin_right, print_margin_top. Nothing seems to work. The only thing that worked was yesterday when I removed all print items from my prefs.js (comment 18).
Daniel, we should reopen the bug until it's clear what happens in this situation. George, could you please supply all the print settings from your prefs.js so I could also do a test? Thanks.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Henrik, all of my print settings in my prefs.js file are in attachment 9 [details] ("print" items from my prefs.js file).
Hmmm, saying "attachment 9 [details]" links to something not related to this problem at all. This is the URL for my attachment: https://bugzilla.mozilla.org/attachment.cgi?id=330167
I've been experimenting with the sets of printer_Adobe_PDF, printer_EPSON_Stylus_C80_Series, and printer_SnagIt_8 lines in my prefs.js file: 1) When I removed all SnagIt print lines, printing GetFirefox.com is broken (small text and large left/right margins 2) When I removed all SnagIt and Epson print lines, everything prints fine 3) When I removed all Epson print lines, everything prints fine 4) When I removed all Adobe_PDF and and SnagIt print lines, printing is broken. So the problem seems to be something specifically with the print lines in my prefs.js file for my physical Epson printer (even when I only print to an Adobe PDF file).
(In reply to comment #29) > Henrik, all of my print settings in my prefs.js file are in [...] (In reply to comment #30) > Hmmm, saying "[...]" links to something not related to this problem at > all. The correct link is attachment 330167 [details]. (You can get the ID from the URL of the attachment, or from the comment in which the attachment was created) (In reply to comment #31) > So the problem seems to be something specifically with the print lines in my > prefs.js file for my physical Epson printer (even when I only print to an Adobe > PDF file). That sounds familiar -- in the past, I think I've seen Firefox using preferences for the default printer instead of the selected printer, which seems to be what's happening here. (I'm assuming the Epson is your default printer -- is that right?)
Note also that the Epson settings include this line: user_pref("print.printer_EPSON_Stylus_C80_Series.print_scaling", " 0.66"); From comment 24, I'm guessing this isn't the entire source of the problem, but it's probably most of it.
> I'm assuming the Epson is your default printer -- is that right? Yes, that is correct. > Note also that the Epson settings include this line: > user_pref("print.printer_EPSON_Stylus_C80_Series.print_scaling", " 0.66"); > > From comment 24, I'm guessing this isn't the entire source of the problem, > but it's probably most of it. Correct, changing the physical printer's print_scaling from 0.66 to 1.00 does eliminate the large left and right margins. The left margin becomes smaller though, and consequently the text is larger (compared to Firefox 3.0.1 with a brand new profile and Firefox 2).
I've carefully compared the Epson print differences in my new profile's prefs.js vs. my original profile. Each of the following is independent of each other: 1) changing print_scaling from 0.66 to 1.00 and print_shrink_to_fit from false to true (to match the new profile) is the only change that made any difference. (But as stated in comment 34, the text is larger and the left margin is smaller than expected.) 2) removing my Epson print_printer line - still broken (small text, large left/right margins) 3) removing my Epson print_paper_size line - still broken 4) changing my Epson left, right, and bottom margins to be 0.5 - still broken 5) changing my Epson print_downloadfonts to false - still broken Those were the only Epson printer differences between my old profile and brand new profile. I didn't test any permutations of the five differences.
By George, I think I've got it!! (Any my name is George too :-) From comment 35, I changed my original prefs.js file so that it contained items 1 and 4 from a brand new 3.0.1 user profile. Now printing GetFirefox.com is identical to printing with a brand new profile. So in summary I changed the following lines in my prefs.js: 1) print.printer_EPSON_Stylus_C80_Series.print_scaling to 1.00 (was 0.66 in old) 2) print.printer_EPSON_Stylus_C80_Series.print_shrink_to_fit to true (was false) 3) print.printer_EPSON_Stylus_C80_Series.print_margin_bottom to 0.5 (was 0.600000023841858) 4) print.printer_EPSON_Stylus_C80_Series.print_margin_left to 0.5 (was 0.100000001490116) 5) print.printer_EPSON_Stylus_C80_Series.print_margin_right to 0.5 (was 0.100000001490116) But why can't I keep my old Epson printer margins?
(In reply to comment #36) > But why can't I keep my old Epson printer margins? Because apparently Firefox 3 always uses the margins for your default printer, regardless of which printer you're actually printing to. Firefox 2 was smarter about this, and respected the printer-specific margins. I just filed bug 446041 on the "Firefox 3 always uses the margins for your default printer" issue. George (or anyone using Windows), if you could follow my steps there to see if you can reproduce that bug, and then leave a comment there, that'd be much appreciated.
OK Daniel, I have updated bug 446041 as requested.
Confirming that one for now. We have to wait until bug 446041 gets fixed.
Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: general → printing
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: