Closed Bug 123554 Opened 23 years ago Closed 22 years ago

[FIX]Print dialog does not pick up settings for printer from OS

Categories

(MailNews Core :: Printing, defect, P2)

x86
Windows 2000

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.0

People

(Reporter: iannbugzilla, Assigned: rods)

References

Details

(Keywords: intl, regression, Whiteboard: [adt2])

Attachments

(1 file, 2 obsolete files)

BuildID 2002013003
If you have configured a printer under the OS to say be monochrome with A4 paper
size and then start mozilla and try to print, mozilla will not have picked up
these settings.
Keywords: 4xp
Confirming on Windows 98, Build ID: 2002020208.

Actual behavior:  Mozilla is closed. In Control Panel | right click on {a
printer} | Properties. Change some setting, such as A4 paper or landscape
orientation. Click Ok. Open Mozilla. Go to File | Print | {same printer} |
Properties. The setting is the default, not what it was set to in Control Panel.

Expected behavior: Mozilla gets settings for printer from OS.

Old Summary: Print dialog does not pick up default settings for printer from OS
New Summary: Print dialog does not pick up settings for printer from OS

See also bug 83750.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Print dialog does not pick up default settings for printer from OS → Print dialog does not pick up settings for printer from OS
For non US people it is very important to remember that we use different 
paper. I don't want to keep changing to A4 every time I use mozilla.
*** Bug 123967 has been marked as a duplicate of this bug. ***
*** Bug 124349 has been marked as a duplicate of this bug. ***
Here is what I said in bug 124349, duped to this one :

France uses A4 format but Mozilla switches the properties of the printer by
default to Letter.

This bug should be considered as a blocker in corporate environments where a
printer can be shared by dozens of people and where printers are not loaded
with Letter paper because it does not exist locally : the printer often asks*
for confirmation, or change of format and all print tasks are deferred.

Our printer here at Nscp France is configured in A4 (because that's the only
paper format we use in this country), my local printer config says A4, and
Mozilla always switches to Letter.

=> Setting severity, priority and expected milestone.
Severity: normal → major
Priority: -- → P2
Target Milestone: --- → mozilla0.9.9
This referres not only to France but to Germany, too. This is really a blocker!
IIRC, the ISO paper sizes are widely used everywhere but North America.
This really is an internationalization issue too, so someone empowered enough
should add the keyword intl.
Nominating nsbeta1, adding intl kwd.
Keywords: intl, nsbeta1
Rod will investigate what it will take to Initialize PrintSettings from system
default.
Blocks: 118563
Attached patch patch (obsolete) — Splinter Review
In order to set the defaults we need to get a printer name, so the best thing
to do is to get the default printer's name.

This patch does the following:
1) On windows and OS/2 it implements IDL attr of "defaultPrinterName"
   (like Bug 118152)
2) Stubs this out on al other platforms
3) On Windows implmenets new method "InitPrintSettingsFromPrinter"
   which sets certain key values from the native devmode into the print
settings
4) Stubs this out on all other platforms
5) It also cleans up the nsDeviceContextSpecWin interface a little bit:
   It now has a single GetDevMode method that must be paired with a
UnlockDevMode
   method.
6) It moved GetDataFromPrinter into the public interface
7) Created a simple helper function for getting the default printer name.
Status: NEW → ASSIGNED
Summary: Print dialog does not pick up settings for printer from OS → [FIX]Print dialog does not pick up settings for printer from OS
Blocks: 125076
Blocks: 125078
Blocks: 118152
I opened new bugs for implementing the "InitPrintSettingsFromPrinter" OS2 and
GTK if it is possible, if not they can mark then "won't fix"
Marking nsbeta1+
Keywords: nsbeta1nsbeta1+
Comment on attachment 69085 [details] [diff] [review]
patch

sr=attinasi
Attachment #69085 - Flags: superreview+
first test with first patch alone => need to add second patch
second test on Win2K              => works fine, solves the bug :-)

BUT this bug also needs to be solved on Mac and Linux for the same reasons
explained above. Keeping 'Letter' default is definitely a blocker outside of North
America.
fixed
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
So should another bug be logged to get the same problem fixed on Linux and Mac
OSes or should this one be reopened?
no need to file bugs...we already have other bugs
see bug 125078 and bug 125236

so we can close this bug out right? marking verified.
if this bug is not fixed, then REOPEN.
Status: RESOLVED → VERIFIED
Ah, should have known 125078 was refering to Linux, 125236 wasn't in the
blocking though (but now is hopefully).
Blocks: 125236
*** Bug 125564 has been marked as a duplicate of this bug. ***
Blocks: 125824
Using buildID 2002021503

I still seem to have problems when I'm logged into Windows 2000 as user without
administrator rights. It picks up the wrong paper size (Letter instead of A4)
and when you click on cancel, it crashes Mozilla and produces a talkback
(TB3044781X)
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Additionally, even when you have administrator rights if you select two messages
to print at the same time, it picks up A4 for the first but uses letter for the
second.
If I set the default paper size as administrator, and then log into an account
without admin priv. This other account has it's own default for the printer
size. If I set the size to A4 as the default when I am that user and then print,
it picks up the correct default size.

Where are you when you press "Cancel" and it crashes?
Status: REOPENED → ASSIGNED
*** Bug 126378 has been marked as a duplicate of this bug. ***
Well, i don't get Mozilla crashing when exiting the "Print Page" dialog via
cancel, but the Mozilla window is put into the background when I press cancel.
This should not happen.
OS: Windows 2000
Build: 2002021803
If as a non-administrator, I check the paper size through the Start, Settings,
Printers, etc, it shows up as being A4. If I check through Mozilla, clicking on
Print, Properties it shows up as being Letter. If I then cancel out of those
dialog boxes it is at that point it crashes (TB30962520W) or if I cancel out of
just the main print dialog box (TB3095818Q). This only happens within mail,
printing on the browser side has the correct paper size and doesn't crash. Even
tried with a different printer/driver and still crashes when I cancel on the
print dialog box (TB3096676W).
Attached patch new patchSplinter Review
This patch:
1) Makes sure that when a PrintSettings is created it is initialized from the
default printer.
2) Mail now uses the nsIWebBrowserPrint interface to create the PrintSettings
object it caches and uses
3) Editor now creates and caches a PrintSettings object.
Attachment #69085 - Attachment is obsolete: true
Attachment #69228 - Attachment is obsolete: true
Ian, this patch fixes the mail (and Editor) problems. The crash is a mail issue,
when the windows closes and it is taering down the content and frames it crashes
in a recycler. I'll file a bug.
Comment on attachment 70307 [details] [diff] [review]
new patch

r=dcone
Attachment #70307 - Flags: review+
Comment on attachment 70307 [details] [diff] [review]
new patch

sr=attinasi
Attachment #70307 - Flags: superreview+
Comment on attachment 70307 [details] [diff] [review]
new patch

r=sspitzer on the mailnews parts of the last patch.
fixed
Status: ASSIGNED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
*** Bug 126608 has been marked as a duplicate of this bug. ***
Ian, does this work for you/everyone now? please verify..

let me know...thanks
Does now have A4 for a non-administrator user, but still crashes if you cancel
out of the print dialog box (TB3164610H). Do you want me to log a separate bug
on that?
Ah I see you logged bug 126427 on that.
marking this verified...if anyone is still having a problem 
with this, please REOPEN. thanks.
Status: RESOLVED → VERIFIED
*** Bug 127223 has been marked as a duplicate of this bug. ***
*** Bug 127529 has been marked as a duplicate of this bug. ***
Hm. The new print dialog now seems to use the papersize of the default-printer
and not always letter as papersize.
But: I have four printers installed on my W2K machine. I get four entries in the
combobox where I can select the destination printer. All four entries are named
the same.
I have this four printers:
- HP LaserJet 4000 Series PCL (Default printer)
- Acrobat Distiller
- Acrobar Writer
- Fax

I get four printer entries called "HP LaserJet 4000 Series PCL". I open a new
bug for this.
Sorry, I forgot the build-ID: 2002022503
The problem is still the same, but this time in the "Mail and Newsgroups" part
of mozilla.
Can it also be fixed there? :-)
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
This was originally to do with mail & news printing (I'm not sure how it changed
to browser printing) and it was fixed. This is a regression and I'll attempt to
mark as such.
Keywords: regression
Product: Browser → MailNews
Printing was working fine in the build from 22nd February but broken again by
1st March build. I'll see if I can narrow it down further.
Check checked in a minor fix that was intended to go into with Bug 131852, so
this is once again fixed. Check tomorrow's build or repull now.
Status: REOPENED → RESOLVED
Closed: 23 years ago22 years ago
Resolution: --- → FIXED
Ian, can you verify this fix? if it is fixed, then please
mark this bug verified-fixed...thanks!
forgot to mention, the fix just went in..so wait till the next build to verify
it.
Status: RESOLVED → VERIFIED
I can't test to see if it is fixed or not because whenever I try to print from
mail & news I get the following pop-up box entitled "Printer Error"

The browser cannot print right now. Please try again when the page has finished
loading.

Of course the page had finished loading before I tried to print and clicking on
print again just brings up the same error again.

Using buildID 2002032110 on Win XP Pro
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
I just backed out the fix for Bug 131174 that was causing mail not to print,
please retest and close this bug if it works.
Status: REOPENED → ASSIGNED
adt2 per adt triage, setting milestone to 1.0
Whiteboard: [adt2]
Target Milestone: mozilla0.9.9 → mozilla1.0
Tested on BuildID 2002032203 on Win XP and appears to be fixed again.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → FIXED
verified.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: