Closed Bug 220201 Opened 21 years ago Closed 21 years ago

no way to disable print headers/footers

Categories

(Camino Graveyard :: Printing, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 202014

People

(Reporter: jesboat, Assigned: mikepinkerton)

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1

Currently all the Mac Mozilla (or even Gecko-based) browsers, of which Camino is
the best, lack a way to disable printing headers.

Reproducible: Always

Steps to Reproduce:
1. Print
2.
3.

Actual Results:  
Headers

Expected Results:  
No Headers
*** This bug looks like a duplicate of Bug 66713 ***

The folowing lines can be added to the all.js file and should enable the user to
turn headers and footers on and of. Could some one test?

// Print header customization
// Use the following codes:
// &T - Title
// &U - Document URL
// &D - Date/Time
// &P - Page Number
// &PT - Page Number "of" Page total
// Set each header to a string containing zero or one of these codes
// and the code will be replaced in that string by the corresponding data
pref("print.print_headerleft", "&T");
pref("print.print_headercenter", "");
pref("print.print_headerright", "&U");
pref("print.print_footerleft", "&PT");
pref("print.print_footercenter", "");
pref("print.print_footerright", "&D");
pref("print.show_print_progress", true);
Sorry that had to be the user.js file!

I tested this and it seems the Moz code is still not excepting the prefernces on
the Mac.

*** This bug is a duplicate of Bug 66713 ***
Not that I think it'll solve your problem but that is the wrong syntax to add
something to user.js.  The lines should start "user_pref", not "pref"
This will (at least) read in the header & footer prefs when nsPrintSettingsX is
initialized - so whatever the print prefs are in all.js (or users.js) the first
time you try to print will apply to all subsequent print jobs until shutdown.

Notes: I haven't tried this on Mozilla - just Camino - so I don't know what the
effects will be there.	

Further notes: as mentioned in bug 66713, this should be part of the print
dialog, not some hidden pref.  That being the case, there really needs to be a
re-layout of the NIB file that's part of the PrintPDE.pbproj.  I think the
re-layout should do one of two things.	The first option involves minimal NIB
layout changes, the second more substantial.

1) Include a bool pref checkboxes for "print header" and "print footer".  If
the pref is checked "yes", then whatever's in the header/footer pref file gets
printed.  If not, no header/footer gets printed. 

2) Make enough space to add text fields to enter the desired header/footer text
strings.  You'd probably still want the bool pref checkboxes mentioned above. 
This might require an extra floating palette to make enough space.  

I played around with 2, but everything I did looked visually ugly.  Same with
1.  If somebody with a sense of style could lay out the NIB, getting the prefs
hooked up and talking to the UI elements won't be difficult.
Status: UNCONFIRMED → NEW
Ever confirmed: true
if you check the prefs at startup, you should register a callback so that if
they change, you'll be notified. Personally, i think it's ok to look up those
prefs at each print time rather than cache them. Printing is not something the
user expects to be done in 10msec, unlike new window.
Comment on attachment 134077 [details] [diff] [review]
a fix.  but not pretty

if you're gonna say "fix me" just go ahead and do it right :)
Attachment #134077 - Flags: review? → review-
Options added:
1) enable or disble header and footerprinting.
2) added simple input boxes to specify where (left, center, right) what (using
the codes) is printed.
So you can have a look at it.
Here's what I found in Panther, in Jaguar this may be different:

The Print dialog box (with the new NIB) seems to want to be the size of the box with the old NIB, so 
the header options overlap the Print/Cancel/SaveAsPDF/Fax buttons on the bottom of the box, the 
footer controls aren't even visible.
The controls are non-functioning.

Hope this helps,
Jonathan
It's really the same bug - I'm moving a proposed fix there.

*** This bug has been marked as a duplicate of 202014 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: