Closed Bug 134384 Opened 22 years ago Closed 22 years ago

Page Setup doesn't work for JavaScript window.print()

Categories

(Core :: Printing: Output, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 137739

People

(Reporter: matthias_haase, Assigned: rods)

References

()

Details

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020326
BuildID:    Mozilla 0.9.9 Gecko/20020326

The settings for
File->Page setup->Header/Footer doesn't have any effect for printing out pages
with JacaScript:window.print().

Reproducible: Always
Steps to Reproduce:
1. Disable printing of headers & footers (File->Page setup->Margins-> eader/Footer)
2. Print out any pages with File -> Print: No headers and footers are printed ouu.
3. Print the same page from JavaScript-Command window.print() instead.


Actual Results:  Although headers and footers are disabled they are always printed.

Expected Results:  Choosed settings should have effect.
I confirm this statement, I have a similar problem under Windows 2000 with moz1.0
(and preceding ones).
When using Ctrl-P or the print icon or menu, the print default is A4 format
(which is also the system default of the printers). When using the javascript
function
<a href="javascript:printWindow();">Print</a> (taken from www.viamichelin.com
in print view of a map), then the default is Letter. And there is no way to
change this default.
I would confirm this bug as well.  Using mozilla 1.0 (win32) I get the same results.

I did this by setting through a system like this:
<SCRIPT Language="Javascript1.1">
function printcommand()
{
    window.print()
}
</SCRIPT>
<BODY onload="printcommand()">
....
I can confirm it also in WinXP with Mozilla 1.0
the build is very old 0.9.9, this now works on the trunk, and the printing not
working in the onload handler is a dup.

*** This bug has been marked as a duplicate of 137739 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
No, the settings for header/footer doesn't have any effect for recent mozilla
1.0 linux (with window.print()).
I'm using a user.js file as currently as a workaround.

- begin user.js -
pref("print.print_headerleft", "");
pref("print.print_headercenter", "");
pref("print.print_headerright", "");
pref("print.print_footerleft", "");
pref("print.print_footercenter", "");
pref("print.print_footerright", "");
- end user.js -
It works on the trunk, maybe a fix didn't make it to the branch
bulk verification.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.