Thunderbird 52 prints blank pages

RESOLVED FIXED

Status

--
major
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: victor9v, Assigned: jorgk)

Tracking

({regression})

regression
Dependency tree / graph

Firefox Tracking Flags

(thunderbird_esr5254+ fixed, thunderbird54 affected, thunderbird55 affected, firefox55 fixed)

Details

(Whiteboard: [regression:TB49])

User Story

https://support.mozilla.org/en-US/questions/1157063  April 20 xony & PudelsKern
https://support.mozilla.org/en-US/questions/1157196  April 20 MDEF
https://support.mozilla.org/en-US/questions/1157425  PudelsKern
https://support.mozilla.org/en-US/questions/1157642
https://support.mozilla.org/en-US/questions/1158985
https://support.mozilla.org/en-US/questions/1158485 attachments and printing (German?)
https://support.mozilla.org/en-US/questions/1158481 (German, unresolved)
https://support.mozilla.org/en-US/questions/1159974 -1 helped
https://support.mozilla.org/en-US/questions/1160089 set a4, had defaulted to "letter"
https://support.mozilla.org/en-US/questions/1160055 a4 paper size won't stick

Firefox reference https://support.mozilla.org/en-US/kb/pages-appear-tiny-when-i-print-or-print-preview-firefox

Attachments

(2 attachments)

31.02 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document
Details
1011 bytes, patch
bobowen
: review+
Details | Diff | Splinter Review
(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170323105023

Steps to reproduce:

When trying to print HTML formatted messages the Print is producing many blank pages. Same in Print Preview. One page of HTML formatted message translates into 40 over blank pages.


Actual results:

It happened after upgrading to Thunderbird 52.0 


Expected results:

It should print the message as seen.
plain text messages print OK?
Do you have another OS you can try?
Component: Untriaged → Printing
Flags: needinfo?(victor9v)
Product: Thunderbird → MailNews Core
Summary: Print: Output → Thunderbird 52 prints blank pages
Version: 52 Branch → 52
(Reporter)

Comment 2

2 years ago
Hi

No, same for plain messages. I have just upgraded TB, less than an hour ago. All messages Print problem. Some messages causes TB to hang up.

I have only WIN 10 here.
Flags: needinfo?(victor9v)
(Reporter)

Comment 3

2 years ago
>>> "Some messages causes TB to hang up." - to be accurate - some messages cause hang up when trying Print Preview.
(Assignee)

Comment 4

2 years ago
This has been reported before, but no one ever got to the bottom of it: bug 1338542.

It won't be a great consolation, but printing works fine for me in both Daily TB 55 and TB 52, that's why I couldn't action bug 1338542.

Maybe it's a Windows 10 problem. Richard, can you print on Windows 10?
Flags: needinfo?(richard.marti)
See Also: → bug 1338542
What is printing in the time of paperless office? ;-)

Here it works with Win 10.
Flags: needinfo?(richard.marti)
(Reporter)

Comment 6

2 years ago
Roll back to 48.5 - no problem with printing. I guess there is nothing wrong with system.
Thanks for being sarcastic instead of some advise.
(Assignee)

Comment 7

2 years ago
No sarcasm intended, sorry. Does printing work in Firefox version 52?
(Reporter)

Comment 8

2 years ago
Yes, it does. Printing in FF 52.0 works fine.
(Assignee)

Updated

2 years ago
Duplicate of this bug: 1355013

Comment 10

2 years ago
Facing the same issue as reporter since update.
Failing - User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101
 Thunderbird/52.0
Last working - User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0

Appears to effect all messages, with and without externally loaded content.
Count of blank pages varies between 50 and 1000 approx.
Switching between real printer HP Laserjet 5L and virtual printer FreePDF has no effect.
Running Thunderbird in safe mode has no effect.
Affects multiple user profiles.
OS is Windows 7 Pro 64bit with German locale.

My workaround so far:
Save message as foo.eml.html
Open this file in Firefox ESR 45.8.0 and print it.
(Assignee)

Comment 11

2 years ago
I wish I could reproduce this. Windows 7 64bit Ultimate, en-US, FreePDF, TB 52. Opened an HTML e-mail, print preview, two pages, print to FreePDF, two pages.
(Reporter)

Comment 12

2 years ago
Hi Jorg

I dont know how to get through to the problem.

I am using WIN 10 Pro, ver 1607, Build 14393.969
DELL XPS 15, i7-6700HQ @2.6Ghz, RAM 16GB
en-US

TB 48.5 works great. TB52 generates multiple blank pages in Print Preview or Print to PDF, to local and network printer.
(Assignee)

Updated

2 years ago
Duplicate of this bug: 1355243

Comment 14

2 years ago
I am reporter of similar bug 1338542; it occurs both with windows7 and with windows10; I suspect that the relevant problem is that I am using a Compaq laptop and an HP laptop both with AMD cpu

Comment 15

2 years ago
I am using a PC with intel cpu and windows 10 pro and prints blank pages instead of the email.  I have gone back to 45.8 and turned off updates as it prints fine in 45.8.  Not ideal but until bug is found and fixed all I can do.
(Assignee)

Updated

2 years ago
tracking-thunderbird_esr52: --- → +
(Assignee)

Updated

2 years ago
Keywords: regression

Comment 16

2 years ago
We have identical problems with Thunderbird 52 on a Windows 7 Home Premium system with an AMD A4 processor. The problem arises with a pop server email account where we download the headers only. However, as a different user on the system using the same Thunderbird, print preview (and I assume print) works fine with an imap connection to a gmail account. I assume the bug ties in with the downloading headers. I'll experiment further with a pop server email account with the user where print with an imap email account works fine.

Updated

2 years ago
Duplicate of this bug: 1357032

Updated

2 years ago
Duplicate of this bug: 1357028
It will greatly help for someone (which at least 1 more than no one) to find a regression range using nightly builds and the tool at http://mozilla.github.io/mozregression/quickstart.html 

If the build at https://ftp.mozilla.org/pub/thunderbird/nightly/2016/09/2016-09-01-03-02-23-comm-central/ doesn't have the problem https://ftp.mozilla.org/pub/thunderbird/nightly/2016/09/2016-09-01-03-02-23-comm-central/thunderbird-51.0a1.en-US.win32.installer.exe ... then you can start the tool with 
  mozregression --good 2016-09-01
Keywords: regressionwindow-wanted
Whiteboard: [regression:TB52?]
From bug 1357028:
Setting print_paper_height and print_paper_width to -1 solved the issue.
(Assignee)

Comment 22

2 years ago
(In reply to Richard Marti (:Paenglab) from comment #20)
> From bug 1357028:
> Setting print_paper_height and print_paper_width to -1 solved the issue.
Equally:
From bug 1357032 comment #0:
> ... applied the following configuration change already reported in Firefox 47:
> Printer Settings:
> Assign print_paper_height and print_paper_width to -1.
> Bug corrected! I can print my mails.

Also:
https://support.mozilla.org/t5/Fix-slowness-crashing-error/Pages-appear-tiny-when-I-print-or-view-them-in-Print-Preview/ta-p/34056

Also:
Bug 1336657 comment #16 and bug 1336657 comment #17.

Comment 23

2 years ago
Whilst checking the values of print_paper_height and print_paper_width in our Firefox (already -1), I thought to check the printer setup that Thunderbird was using. Thunderbird with the upgrade to 52 had changed our printer's default page size from A4 to Letter. When I changed this default back to the correct A4, print preview and print worked correctly.

Comment 24

2 years ago
My Config Editor window doesn't have the parameters print_paper_etc. at all.  To get my printing done I'm going to follow the suggestion to go back to ver TB 45.
(Assignee)

Comment 25

2 years ago
There seem to be preferences for each printer, I have:
printer_FreePDF.print_paper_height
printer_Samsung_ML_1510.print_paper_height
etc.
(Assignee)

Updated

2 years ago
Duplicate of this bug: 1362332
(Assignee)

Updated

2 years ago
Duplicate of this bug: 1362336

Comment 29

2 years ago
current state for thunderbird 52.1.0 on windows10 and on windows 7
PRINT PREVIEW produces many pages of a fixed pattern (see attached screen print)
PRINT to local printer generates many pages which are not printed
PRINT to file PDF does not generate many pages
James,
Can you find a regression range using comment 19?
Flags: needinfo?(james)

Comment 32

2 years ago
for me it helps to delete the printer.printer preferences in about:config. I had over 50 entrys.

Updated

2 years ago
Duplicate of this bug: 1365201
(In reply to Cliff Addison from comment #23)
> Whilst checking the values of print_paper_height and print_paper_width in
> our Firefox (already -1), I thought to check the printer setup that
> Thunderbird was using. Thunderbird with the upgrade to 52 had changed our
> printer's default page size from A4 to Letter. When I changed this default
> back to the correct A4, print preview and print worked correctly.

This is also stated in https://support.mozilla.org/en-US/questions/1160089#answer-968325 by grahammorley
User Story: (updated)

Comment 35

2 years ago
My solution:
1. Open about:config
2. Look at setting print.printer to find <name> of selected printer, example value is "HP LaserJet 5L".
3. Replace spaces by underscore for further reference, so example <name> becomes "HP_LaserJet_5L".
4. Change value of print.printer_<name>.print_paper_height to "-1"
5. Change value of print.printer_<name>.print_paper_width to "-1"
6. Close about:config

Either immediately or latest after restart of Thunderbird, issue is gone.

When later looking at the changed settings, values are displayed as "-1,00".

Former values while the issue existed were "11,00" and "8,50", obviously the dimensions of the "US letter" format measured in inches (25,4 mm).  As being located in Germany, such a format was most likely never configured for the printer.

Worked for three profiles in total, all rather old ones that gathered a lot of print* settings over time and that show also that the structure of the settings changed at least once in the past, e.g. there is print.printer_<name>.* and printer_<name>.* with the first appearing to be the active one.

I would appreciate if this could fixed in a future update such that this issues disappears without manual edit in about:config.

Comment 36

2 years ago
Brilliant; comment 35 fixes both print and printpreview
Flags: needinfo?(james)
(Assignee)

Updated

2 years ago
Duplicate of this bug: 1365657

Comment 38

2 years ago
I was prompted to update my Thunderbird this morning after I back levelled it to TB45 about a month ago (Comment 24) and hoping the problem was fixed but found it wasn't.  It's now ver 52.1.1.  What's more the method in Comment 35 didn't work for me.  So I'm force to be fiddling with this damn problem when I have a lot of work to do!  Comment 32 talks about deleting a large number of printer.<printer> entries but I don't want to do that unless I can backup about:config.  How does one do that?  Comment 34 talked about default page size but I couldn't find that entry.  Where is it?

I updated Thunderbird on another computer to ver 52 and it doesn't have this problem.  But that 2nd computer isn't used much whereas my main computer is heavily used and has a long history.

Comment 39

2 years ago
My solution inspired by comment 35 was only changing the names of all printers to contain no spaces
This can be done by using ControlPanel Devices and printers then click on each printer with spaces in its name and then click on "Customize your printer" which facilitates name change
No need to edit print.printer
Thunderbird used to accept printers with spaces in their names; we look forward to restoration
>  Comment 34 talked about default page size but I couldn't find that entry.  Where is it?

Tools > Options > Advanced > General > Config Editor
(In reply to james from comment #39)
> My solution inspired by comment 35 was only changing the names of all
> printers to contain no spaces

Whic language/locale of Thunderbird are you using?
Flags: needinfo?(james)

Comment 42

2 years ago
I tried upgrading to V52 again.  It is version 52.1.1 and checked out my printer settings.  Like a previous comment my printer had been changed to letter size.  I changed it to A4 and now my emails will print.
Yay!!

Comment 43

2 years ago
(In reply to Wayne Mery (:wsmwk, NI for questions) from comment #40)
> >  Comment 34 talked about default page size but I couldn't find that entry.  Where is it?
> 
> Tools > Options > Advanced > General > Config Editor

I know how to access the config editor.  What I don't know is where the line about default page size is amongst the very large number of lines.

Comment 44

2 years ago
(In reply to Philipp from comment #32)
> for me it helps to delete the printer.printer preferences in about:config. I
> had over 50 entrys.

Deleting printer.<printer> preferences? (My angle brackets designates the second "printer" string is a variable depending on the particular printer <name> one is trying to address - what's the convention in postings here?  Brevity at the expense of clarity to someone like me who's not particularly interested in this technical area?)  How do you do that?  If I select a line and touch delete nothing happens.  If I right click a line there is no "Delete" in the popup, only "Modify".  What am I missing out on?

Comment 45

2 years ago
(In reply to Wayne Mery (:wsmwk, NI for questions) from comment #41)
> (In reply to james from comment #39)
> > My solution inspired by comment 35 was only changing the names of all
> > printers to contain no spaces
> 
> Whic language/locale of Thunderbird are you using?

Everything is in English.  I'm located in Australia Time Zone +10.  We have to put up with the American English spell checker when we use UK English spelling.
(Assignee)

Comment 46

2 years ago
(In reply to Victor Bien from comment #44)
> If I right click a line there is no
> "Delete" in the popup, only "Modify".  What am I missing out on?
"Reset" will delete non-standard settings, they will be gone after a restart of TB.

(In reply to Victor Bien from comment #45)
> Everything is in English.  I'm located in Australia Time Zone +10.  We have
> to put up with the American English spell checker when we use UK English
> spelling.
How so? Yon can install an en-GB dictionary:
https://addons.mozilla.org/en-US/thunderbird/addon/british-english-dictionary-2/
There is even an Australian one:
https://addons.mozilla.org/en-US/thunderbird/addon/english-australian-dictionary/
but the en-GB is better. I use it myself.

Comment 47

2 years ago
(In reply to Jorg K (GMT+2) from comment #46)
> (In reply to Victor Bien from comment #44)
> > If I right click a line there is no
> > "Delete" in the popup, only "Modify".  What am I missing out on?
> "Reset" will delete non-standard settings, they will be gone after a restart
> of TB.
> 
> (In reply to Victor Bien from comment #45)
> > Everything is in English.  I'm located in Australia Time Zone +10.  We have
> > to put up with the American English spell checker when we use UK English
> > spelling.
> How so? Yon can install an en-GB dictionary:
> https://addons.mozilla.org/en-US/thunderbird/addon/british-english-
> dictionary-2/
> There is even an Australian one:
> https://addons.mozilla.org/en-US/thunderbird/addon/english-australian-
> dictionary/
> but the en-GB is better. I use it myself.

OK thanks for the link to the British dictionary - never had time to chase that up on my own steam.

Clicking "Reset" to remove a line?  I have 280 lines relating to many printers clicking Reset for each one will be too hard.  My computer has been ported over from older operating systems more than once and my printers have changed but TB remembers them all!!  Is that part of my problem?  If so how am going to fix that - I'm not going to "Reset" 280 lines one line at a time!
(Assignee)

Comment 48

2 years ago
(In reply to Victor Bien from comment #47)
> I'm not going to "Reset" 280 lines one line at a time!
You can do it differently.

In TB, open Help > Troubleshooting information and then open your profile (Profile Folder, Open Folder).
Close TB - very important!
Make a backup of prefs.js.
Edit the file with an editor and remove those 280 lines.
You need to be very careful not to make any other undesired changes.

Comment 49

2 years ago
(In reply to Jorg K (GMT+2) from comment #48)
> (In reply to Victor Bien from comment #47)
> > I'm not going to "Reset" 280 lines one line at a time!
> You can do it differently.
> 
> In TB, open Help > Troubleshooting information and then open your profile
> (Profile Folder, Open Folder).
> Close TB - very important!
> Make a backup of prefs.js.
> Edit the file with an editor and remove those 280 lines.
> You need to be very careful not to make any other undesired changes.

Now it's fixed thanks!

When I re-opened TB and looked at about:config it showed all those print.printer_<printername>.x were gone (as expected).  Next I clicked print preview of the above message emailed from Bugzilla (as a sample to print) and voila it presented correctly (and not a vertical string of little pages)!  When I clicked to actually print it, it printed correctly (as expected) but about:config immediately displayed my current printer print.printer_HP_Officejet_Pro_8600_(Network).print_bgcolor;false and 36 other related lines.  The line print.printer_HP_Officejet_Pro_8600_(Network).print_paper_height; shows that -1.00 as discussed by others as did the one for width.  So that's what happens behind the scenes!

The ghosts of the printers I've used in the past Operating Systems lives numbered 4 and there were 3 print to PDF files printers and printing to the Officejet's Fax print.  That made a total of 9 "printers" banked up in my about:config!

Comment 50

2 years ago
Reply to comment 41 re comment 39

English uk on Windows 10
English us on windows 7

Changing printer names to space free cured both printpreview and print problems on both macines
Flags: needinfo?(james)
(Assignee)

Comment 51

2 years ago
Thanks so much for the feedback, mate (I have an Australian passport, too).

So cleaning out all the old printers is the key to success here. Good to know.

Comment 52

2 years ago
Just found this bug in V52.1.1 Same printing/preview gives huge number of blank pages. Using Win 7 x 64bit.

Fixed as suggested in Comment 35 above. You do not need to remove/reset ALL the printer settings !

This needs a fix, as you can't expect everyday users to find this thread (took me 20 mins to stumble on to it), then in fix it themselves !!! Do you guys not want 'normal' people to use TB ???

Also, another moan, the new GitHub login method is too lengthy, I nearly gave up trying to be able to post here - again try to be helpful !
nigel, you are correct we need a fix. 

To do that ... we need ... one of you fine bug reporters (but not less than one) to test so we get the regression range of when problem first appears in our code.  As mentioned in comment 19.  Or, another possibility...

does this work?  https://ftp.mozilla.org/pub/thunderbird/nightly/2016/12/2016-12-02-03-02-11-comm-central/thunderbird-53.0a1.en-US.win32.installer.exe

and this fail?  https://ftp.mozilla.org/pub/thunderbird/nightly/2016/12/2016-12-03-03-02-06-comm-central/thunderbird-53.0a1.en-US.win32.installer.exe

if so then the regressor is bug 1279699

Updated

2 years ago
Duplicate of this bug: 1367475

Comment 55

2 years ago
Hi Wayne,

Ok, firstly I undid the changes to -1 that fixed the issue, i.e. all ...print_paper_height back to 11.0 and ...print_paper_width back to 8.50

I then tried the first link: https://ftp.mozilla.org/pub/thunderbird/nightly/2016/12/2016-12-02-03-02-11-comm-central/thunderbird-53.0a1.en-US.win32.installer.exe

The problem is still there, I didn't try the second link, which you expected not to work anyway.

The 'Daily' version then offered to update to 55.0a0

Same problem there.

Save a screen shot of the PrintPreview: http://www.nigelbrooks.com/misc/BlankPages.png

With V55, then then checked the "-1 fix" above which still seems to work...

I then went back to V52.1.1 (as I had), I've managed to get Lightning working again, as the Daily disabled it, but I cannot get the "Classic TB2 Options" to work again :(((

I'm now stuck with the dumb new themes and really spread out folder pane... great
(In reply to N Brooks from comment #55)
> Hi Wayne,
> 
> Ok, firstly I undid the changes to -1 that fixed the issue, i.e. all
> ...print_paper_height back to 11.0 and ...print_paper_width back to 8.50
> 
> I then tried the first link:
> https://ftp.mozilla.org/pub/thunderbird/nightly/2016/12/2016-12-02-03-02-11-
> comm-central/thunderbird-53.0a1.en-US.win32.installer.exe
> 
> The problem is still there, I didn't try the second link, which you expected
> not to work anyway.

Fantastic!  So if you have time and someone doesn't beat you to it, please try comment 19.  A starting point is version 46 from way back in Dec 2015 https://archive.mozilla.org/pub/thunderbird/nightly/2015/12/2015-12-20-03-03-26-comm-central/

Comment 57

2 years ago
Hi Wayne,

ran the regression, nice tool, but doesn't say what to do with the results, so just copied the last few log lines here:

2017-05-25T16:41:45: INFO : Narrowed nightly regression window from [2016-05-11, 2016-05-14] (3 days) to [2016-05-11, 2016-05-12] (1 days) (~0 steps left)
2017-05-25T16:41:45: INFO : The bisection is done.
2017-05-25T16:41:45: INFO : Stopped

Hope this helps :)

Cheers
Nigel
(Assignee)

Comment 58

2 years ago
So basically a binary from 2016-05-11 works, and the one from the next day, 2016-05-12 doesn't that is, it prints the empty pages. Really?

So we need to check what happened around those dates:

C-C:
https://hg.mozilla.org/comm-central/pushloghtml?startdate=2016-05-11+00%3A00%3A00&enddate=2016-05-12+14%3A00%3A00
Nothing interesting there.

M-C:
https://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2016-05-11+00%3A00%3A00&enddate=2016-05-12+14%3A00%3A00

I think there we have our bug:
Bug 1271900 - Don't require a minimum page size when setting up DEVMODE from print settings. r=jimm
https://hg.mozilla.org/mozilla-central/rev/338091f5c27b

Bob and Jim, can you see any connection between the small tweak you did and the problem here that many TB user see lots of blank pages in the print preview or even print them?
Flags: needinfo?(jmathies)
Flags: needinfo?(bobowencode)
(In reply to Jorg K (GMT+2) from comment #58)
...
> Bob and Jim, can you see any connection between the small tweak you did and
> the problem here that many TB user see lots of blank pages in the print
> preview or even print them?

Yes this looks like a resurfacing of bug 1276717.

Which was caused by invalid printing prefs where we used to set a page size unit of millimetres, but left in the old inches dimensions in some cases when using specific page size codes in print_paper_data.
It didn't cause an issue before, because of another bug where we converted millimetres to tenths of millimetres by dividing by 10 instead of multiplying by 10.

We had an article in the Fx47 release notes about how to fix it:
https://support.mozilla.org/en-US/kb/pages-appear-tiny-when-i-print-or-print-preview-firefox

I also added a check to try and pick up the issue in 48, but it looks like it isn't picking up these issues for some reason.
It had to be a little careful, because in other circumstances (for example label printing) those dimensions could be correct.
Flags: needinfo?(jmathies)
Flags: needinfo?(bobowencode)
If we can get some details of the printing prefs people have that are causing this issue and there is a common theme, maybe we could expand that check a little.
(Assignee)

Comment 61

2 years ago
Hi Nigel, thanks for the bisecting, I know it's a lot of effort.

Can you open your profile (Help > Troubleshooting Information, Profile folder) and then close TB. In the profile folder, open prefs.js with a text editor and paste all the relevant preferences for the printer in question here. Search for "print." and you'll see the structure of the file. If there are too many lines, copy them to another text file and attach that here ("Attach File" above). Please don't attach the entire prefs.js since it contains personal information.

Comment 62

2 years ago
Hi Wayne, no problem, the tools was easy enough to leave running in the background, just made a copy of my profile folder first, then used that, so as not to mess up my 'good' copy.

I've copied the lines as requested below.

Just a quick thought, the 'quick fix' of setting all *.print_paper_height/*.print_paper_width to -1 ?

Have you checked these settings on your system. If they are already -1, then try changing them to the 11.0 / 8.50 that people with the issue seem to have.

prefs.js extract:

user_pref("print.printer_Lexmark_Black_and_White.print_bgcolor", false);
user_pref("print.printer_Lexmark_Black_and_White.print_bgimages", false);
user_pref("print.printer_Lexmark_Black_and_White.print_colorspace", "");
user_pref("print.printer_Lexmark_Black_and_White.print_command", "");
user_pref("print.printer_Lexmark_Black_and_White.print_downloadfonts", false);
user_pref("print.printer_Lexmark_Black_and_White.print_duplex", 0);
user_pref("print.printer_Lexmark_Black_and_White.print_edge_bottom", 0);
user_pref("print.printer_Lexmark_Black_and_White.print_edge_left", 0);
user_pref("print.printer_Lexmark_Black_and_White.print_edge_right", 0);
user_pref("print.printer_Lexmark_Black_and_White.print_edge_top", 0);
user_pref("print.printer_Lexmark_Black_and_White.print_evenpages", true);
user_pref("print.printer_Lexmark_Black_and_White.print_footercenter", "");
user_pref("print.printer_Lexmark_Black_and_White.print_footerleft", "&PT");
user_pref("print.printer_Lexmark_Black_and_White.print_footerright", "&D");
user_pref("print.printer_Lexmark_Black_and_White.print_headercenter", "");
user_pref("print.printer_Lexmark_Black_and_White.print_headerleft", "&T");
user_pref("print.printer_Lexmark_Black_and_White.print_headerright", "&U");
user_pref("print.printer_Lexmark_Black_and_White.print_in_color", true);
user_pref("print.printer_Lexmark_Black_and_White.print_margin_bottom", "0.5");
user_pref("print.printer_Lexmark_Black_and_White.print_margin_left", "0.5");
user_pref("print.printer_Lexmark_Black_and_White.print_margin_right", "0.5");
user_pref("print.printer_Lexmark_Black_and_White.print_margin_top", "0.5");
user_pref("print.printer_Lexmark_Black_and_White.print_oddpages", true);
user_pref("print.printer_Lexmark_Black_and_White.print_orientation", 0);
user_pref("print.printer_Lexmark_Black_and_White.print_page_delay", 50);
user_pref("print.printer_Lexmark_Black_and_White.print_paper_data", 9);
user_pref("print.printer_Lexmark_Black_and_White.print_paper_height", " 11.00");
user_pref("print.printer_Lexmark_Black_and_White.print_paper_name", "");
user_pref("print.printer_Lexmark_Black_and_White.print_paper_size_type", 0);
user_pref("print.printer_Lexmark_Black_and_White.print_paper_size_unit", 1);
user_pref("print.printer_Lexmark_Black_and_White.print_paper_width", "  8.50");
user_pref("print.printer_Lexmark_Black_and_White.print_plex_name", "");
user_pref("print.printer_Lexmark_Black_and_White.print_resolution", 0);
user_pref("print.printer_Lexmark_Black_and_White.print_resolution_name", "");
user_pref("print.printer_Lexmark_Black_and_White.print_reversed", false);
user_pref("print.printer_Lexmark_Black_and_White.print_scaling", "  0.60");
user_pref("print.printer_Lexmark_Black_and_White.print_shrink_to_fit", false);
user_pref("print.printer_Lexmark_Black_and_White.print_to_file", false);
user_pref("print.printer_Lexmark_Black_and_White.print_to_filename", "");
user_pref("print.printer_Lexmark_Black_and_White.print_unwriteable_margin_bottom", 0);
user_pref("print.printer_Lexmark_Black_and_White.print_unwriteable_margin_left", 0);
user_pref("print.printer_Lexmark_Black_and_White.print_unwriteable_margin_right", 0);
user_pref("print.printer_Lexmark_Black_and_White.print_unwriteable_margin_top", 0);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_bgcolor", false);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_bgimages", false);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_colorspace", "");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_command", "");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_downloadfonts", false);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_duplex", 0);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_edge_bottom", 0);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_edge_left", 0);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_edge_right", 0);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_edge_top", 0);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_evenpages", true);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_footercenter", "");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_footerleft", "&PT");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_footerright", "&D");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_headercenter", "");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_headerleft", "&T");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_headerright", "&U");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_in_color", true);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_margin_bottom", "0.5");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_margin_left", "0.5");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_margin_right", "0.5");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_margin_top", "0.5");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_oddpages", true);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_orientation", 0);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_page_delay", 50);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_paper_data", 9);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_paper_height", " 11.00");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_paper_name", "");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_paper_size_type", 0);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_paper_size_unit", 1);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_paper_width", "  8.50");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_plex_name", "");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_resolution", 0);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_resolution_name", "");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_reversed", false);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_scaling", "  0.60");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_shrink_to_fit", false);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_to_file", false);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_to_filename", "");
user_pref("print.printer_Lexmark_Universal_v2_XL.print_unwriteable_margin_bottom", 0);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_unwriteable_margin_left", 0);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_unwriteable_margin_right", 0);
user_pref("print.printer_Lexmark_Universal_v2_XL.print_unwriteable_margin_top", 0);
user_pref("print_printer", "Lexmark Black and White");
(Assignee)

Comment 63

2 years ago
Bob, yes, many people had 11.0/8.5 settings. Looking that the patch, those numbers are > 0 but less than 25.4, so they would trigger the unwanted behaviour.
(In reply to Jorg K (GMT+2) from comment #63)
> Bob, yes, many people had 11.0/8.5 settings. Looking that the patch, those
> numbers are > 0 but less than 25.4, so they would trigger the unwanted
> behaviour.

Thanks for those prefs.
Hmm, so I see there that the print_resolution is set to 0, which is why my check isn't picking this up.

On firefox this doesn't get initialised and I was using that fact to try and filter out the old invalid prefs from people who had deliberately set that page size.

Weird that thunderbird seems to be defaulting that to 0, is there a different compilation option or something?

Anyway, I guess we could just change the check at [1] to be iVal <= 0.
Not sure if this could just be done for thunderbird.

[1] https://hg.mozilla.org/mozilla-central/file/f81bcc23d37d7bec48f08b19a9327e93c54d37b5/widget/nsPrintOptionsImpl.cpp#l515

Updated

2 years ago
Blocks: 1276717
Severity: normal → major
status-thunderbird54: --- → affected
status-thunderbird55: --- → affected
Keywords: regressionwindow-wanted

Comment 65

2 years ago
FWIW, here's my excerpt from prefs.js, after undoing the -1/-1 fix (which fixed the problem):

user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_bgcolor", false);
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_bgimages", false);
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_evenpages", true);
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_footercenter", "");
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_footerleft", "&PT");
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_footerright", "&U");
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_headercenter", "");
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_headerleft", "&T");
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_headerright", "&D");
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_in_color", true);
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_margin_bottom", "0.5");
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_margin_left", "0.5");
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_margin_right", "0.5");
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_margin_top", "0.5");
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_oddpages", true);
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_orientation", 0);
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_page_delay", 50);
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_paper_data", 9);
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_paper_height", "11");
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_paper_name", "");
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_paper_size_type", 0);
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_paper_size_unit", 1);
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_paper_width", "8.5");
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_plex_name", "");
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_resolution", 131085);
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_resolution_name", "");
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_reversed", false);
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_scaling", "  0.30");
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_shrink_to_fit", true);
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_to_file", false);
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_to_filename", "");
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_unwriteable_margin_bottom", 0);
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_unwriteable_margin_left", 0);
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_unwriteable_margin_right", 0);
user_pref("print.printer_\\\\psrv\\HPcolorlaser.print_unwriteable_margin_top", 0);
(Assignee)

Updated

2 years ago
Duplicate of this bug: 1368445
(Assignee)

Comment 67

2 years ago
(In reply to Bob Owen (:bobowen) from comment #64)
> Thanks for those prefs.
> Hmm, so I see there that the print_resolution is set to 0, which is why my
> check isn't picking this up.
Yes, as per
https://hg.mozilla.org/mozilla-central/file/f81bcc23d37d7bec48f08b19a9327e93c54d37b5/widget/nsPrintOptionsImpl.cpp#l515

> On firefox this doesn't get initialised and I was using that fact to try and
> filter out the old invalid prefs from people who had deliberately set that
> page size.
I checked the printers I have and print_resolution is mostly not set, in one case I have 600 and in another (Foxit PDF printer) I have 152650992. Your check catches that.

> Weird that thunderbird seems to be defaulting that to 0, is there a
> different compilation option or something?
No, we're not setting it:
https://dxr.mozilla.org/comm-central/search?q=print_resolution&redirect=false
I have no idea where my two values came from.
 
> Anyway, I guess we could just change the check at [1] to be iVal <= 0.
Please do.

> Not sure if this could just be done for thunderbird.
Yes, it could since we have a special release branch on ESR52. However, I think, it would be best done in general, right?

Should I prepare a patch for you to approve?
Flags: needinfo?(bobowencode)
(Assignee)

Comment 68

2 years ago
Flags: needinfo?(bobowencode)
Attachment #8872875 - Flags: review?(bobowencode)
Attachment #8872875 - Flags: review?(bobowencode) → review+
(Assignee)

Comment 69

2 years ago
Tomcat, this is an M-C patch, please land.
Flags: needinfo?(cbook)
Keywords: checkin-needed
(Assignee)

Updated

2 years ago
Assignee: nobody → jorgk
Status: NEW → ASSIGNED

Comment 70

2 years ago
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/mozilla-central/rev/06d83f260f41
detect zero (0) as invalid resolution. r=bobowen a=tomcat
Keywords: checkin-needed

(In reply to Jorg K (GMT+2) from comment #69)
> Tomcat, this is an M-C patch, please land.


np, :) landed
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox55: --- → fixed
Flags: needinfo?(cbook)
Resolution: --- → FIXED

Updated

2 years ago
Whiteboard: [regression:TB52?] → [regression:TB49]
Jorg - by the way, I've come up with what I think should be a fix that will work for all cases of this problem.
It doesn't rely on the value of that uninitialised variable and instead on an old pref that was removed at the same time, but will exist in the prefs that exhibit the issue.

I'm going to land it in bug 1369386 and I'll push to get it uplifted to ESR52 and so I assume to Thunderbird.

Comment 73

2 years ago
So when will this 'fix' be pushed out to the release channel ? I've left my settings so the print out is still messed up, but I have a stack of emails that need printing, if this isn't going to get fixed properly, then I''l do the "-1" fixes, but wont then be able to confirm if the later fixes work !
(Assignee)

Comment 74

2 years ago
Within the next two weeks approximately.

Comment 75

2 years ago
(In reply to Tobias Becker from comment #35)
> My solution:
> 1. Open about:config
> 2. Look at setting print.printer to find <name> of selected printer, example
> value is "HP LaserJet 5L".
> 3. Replace spaces by underscore for further reference, so example <name>
> becomes "HP_LaserJet_5L".
> 4. Change value of print.printer_<name>.print_paper_height to "-1"
> 5. Change value of print.printer_<name>.print_paper_width to "-1"
> 6. Close about:config
> 
> Either immediately or latest after restart of Thunderbird, issue is gone.
> 
> When later looking at the changed settings, values are displayed as "-1,00".
> 
> Former values while the issue existed were "11,00" and "8,50", obviously the
> dimensions of the "US letter" format measured in inches (25,4 mm).  As being
> located in Germany, such a format was most likely never configured for the
> printer.
> 
> Worked for three profiles in total, all rather old ones that gathered a lot
> of print* settings over time and that show also that the structure of the
> settings changed at least once in the past, e.g. there is
> print.printer_<name>.* and printer_<name>.* with the first appearing to be
> the active one.
> 
> I would appreciate if this could fixed in a future update such that this
> issues disappears without manual edit in about:config.

Fantastic!!
Than you Tobias Becker , I solve my problem with your help.
(Assignee)

Updated

2 years ago
Duplicate of this bug: 1371327
(Assignee)

Comment 77

2 years ago
Landed that on Thunderbird release branch on M-B for TB 54 beta3
https://hg.mozilla.org/releases/mozilla-beta/rev/4ac128e4455e
(Assignee)

Comment 78

2 years ago
Landed that on Thunderbird release branch on M-ESR52 for TB 52.2:
https://hg.mozilla.org/releases/mozilla-esr52/rev/c41f37d913e205e08dac3f1a1f530d37c6b34e72

Comment 79

2 years ago
(In reply to Philipp from comment #32)
> for me it helps to delete the printer.printer preferences in about:config. I
> had over 50 entrys.

Thanks for this advice, this really helped me. I was so annoyed by this problem for months and it is so fine now to have it solved, finally! I edited the prefs.js file with notepad++ and deleted the corresponding lines which is a bit faster than deleting every single line in the about:config editor.
(Assignee)

Updated

2 years ago
status-thunderbird_esr52: affected → fixed
tracking-thunderbird_esr52: + → 54+
You need to log in before you can comment on or make changes to this bug.