MozillaZine

Print without header and footer

Talk about the native Mac OS X browser.

Moderator: Camino Developers

robinmoz
 
Posts: 3
Joined: February 10th, 2005, 4:16 pm

Post Posted February 10th, 2005, 4:21 pm

This should be so easy to do but I can't find the setting at all. When I print a page I get a header and footer which means the print goes to 2 pages instead of one. If I print with Safari I don't get a top and tail and it all fits nicely on one page. Can I switch the header and footer off and on?
Regards
Robin

cflawson

User avatar
 
Posts: 4721
Joined: December 26th, 2004, 2:54 pm
Location: Flying over your house in a red, white, and blue jet

Post Posted February 10th, 2005, 8:28 pm

https://bugzilla.mozilla.org/show_bug.cgi?id=202014

No. :) Well, not yet. Not sure what the status is; I haven't talked to Conrad in about a month.

cl

Uncle Asad
Camino Developer

User avatar
 
Posts: 3957
Joined: July 24th, 2004, 1:38 pm
Location: بين العالمين

Post Posted February 10th, 2005, 10:34 pm

And also bugs 247652 and 66713!

But it was the one cflawson mentioned that I was initially remembering :-)

robinmoz
 
Posts: 3
Joined: February 10th, 2005, 4:16 pm

Post Posted February 11th, 2005, 6:53 am

Thanks for the replies, I got the print on one page by reducing the page setup scale so I'll have to use that as a workaround for now.

tbrayshaw
 
Posts: 4
Joined: February 11th, 2005, 10:53 am

Post Posted February 11th, 2005, 10:59 am

I've found that the headers and footers don't print when printing from javascript. I've added a bookmarklet to my Bookmarks bar with "javascript:window.print()" as the location and called it 'Print'.

cflawson

User avatar
 
Posts: 4721
Joined: December 26th, 2004, 2:54 pm
Location: Flying over your house in a red, white, and blue jet

Post Posted February 11th, 2005, 12:06 pm

Another workaround that has gotten me through printing files to PDF has been to use Safari. It's really the only thing I use Safari for any more ;)

cl

robinmoz
 
Posts: 3
Joined: February 10th, 2005, 4:16 pm

Post Posted February 11th, 2005, 1:50 pm

tbrayshaw wrote:I've found that the headers and footers don't print when printing from javascript. I've added a bookmarklet to my Bookmarks bar with "javascript:window.print()" as the location and called it 'Print'.


Are you sure because I have just tried this and I get the header and footer?

tbrayshaw
 
Posts: 4
Joined: February 11th, 2005, 10:53 am

Post Posted February 11th, 2005, 4:29 pm

robinmoz wrote:Are you sure because I have just tried this and I get the header and footer?


Just checked and I'd also added the following to my user.js file:

user_pref("print.print_footercenter","");
user_pref("print.print_footerleft","");
user_pref("print.print_footerright","");
user_pref("print.print_headerleft","");
user_pref("print.print_headercenter","");
user_pref("print.print_headerright","");

I'm pretty sure window.print() respects this, and "Menu>File>Print…" doesn't.

Cheers,

Tim.

eccoana

User avatar
 
Posts: 813
Joined: February 27th, 2004, 1:43 pm
Location: bavaria

Post Posted February 11th, 2005, 4:48 pm

tbrayshaw wrote:Just checked and I'd also added the following to my user.js file

that works!

thank you, tim!

Etnier

User avatar
 
Posts: 234
Joined: November 19th, 2002, 8:05 am
Location: Cape Elizabeth ME

Post Posted February 12th, 2005, 8:06 am

Are you sure it does? I just ran a test of that, and found the java-printed page left large margins, as if it were laying out the page the same way but just deleting the header/footer text.

eccoana

User avatar
 
Posts: 813
Joined: February 27th, 2004, 1:43 pm
Location: bavaria

Post Posted February 12th, 2005, 8:53 am

Etnier wrote:Are you sure it does?
I just did a test on this page. File/Print does print header and footers. The javascript function prints the page without headers and footers.
I don't know if this behaviour does occur on *every* page out there...

ciao
ecco

Etnier

User avatar
 
Posts: 234
Joined: November 19th, 2002, 8:05 am
Location: Cape Elizabeth ME

Post Posted February 12th, 2005, 8:57 am

My point is this:
When I print a page I get a header and footer which means the print goes to 2 pages instead of one. If I print with Safari I don't get a top and tail and it all fits nicely on one page.


If the margins and page layout are the same, this fix doesn't increase the amount of page view that prints to a given sheet.

tbrayshaw
 
Posts: 4
Joined: February 11th, 2005, 10:53 am

Post Posted February 12th, 2005, 3:05 pm

Etnier wrote:Are you sure it does? I just ran a test of that, and found the java-printed page left large margins, as if it were laying out the page the same way but just deleting the header/footer text.


You may be right – I think this replaces the headers and footers with blank strings, but leaves the layout the same. It's just a work-around I stumbled across.

Before discovering this hack though, I was having to guillotine the headers and footers off my print-outs. I couldn't always 'just print it from Safari' because Camino deals with tables with headers split across pages rather nicely compared to Safari. Camino repeats the <th> headers on each page, which Safari doesn't (although both need better support for CSS print features!).

Cheers,

Tim.

Return to Camino


Who is online

Users browsing this forum: No registered users and 1 guest