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

VERIFIED DUPLICATE of bug 137739

Status

()

Core
Printing: Output
VERIFIED DUPLICATE of bug 137739
16 years ago
16 years ago

People

(Reporter: Matthias Haase, Assigned: rods (gone))

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

16 years ago
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.

Comment 1

16 years ago
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.

Comment 2

16 years ago
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()">
....

Comment 3

16 years ago
I can confirm it also in WinXP with Mozilla 1.0
(Assignee)

Comment 4

16 years ago
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
Last Resolved: 16 years ago
Resolution: --- → DUPLICATE
(Reporter)

Comment 5

16 years ago
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 -
(Assignee)

Comment 6

16 years ago
It works on the trunk, maybe a fix didn't make it to the branch

Comment 7

16 years ago
bulk verification.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.