Print without header and footer

Talk about the native Mac OS X browser.

Moderator: Camino Developers

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

Print without header and footer

Post by robinmoz »

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
User avatar
cflawson
Posts: 4721
Joined: December 26th, 2004, 2:54 pm
Location: Flying over your house in a red, white, and blue jet
Contact:

Post by cflawson »

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
User avatar
Uncle Asad
Camino Developer
Posts: 3957
Joined: July 24th, 2004, 1:38 pm
Location: بين العالمين
Contact:

Post by Uncle Asad »

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 by robinmoz »

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 by tbrayshaw »

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'.
User avatar
cflawson
Posts: 4721
Joined: December 26th, 2004, 2:54 pm
Location: Flying over your house in a red, white, and blue jet
Contact:

Post by cflawson »

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 by robinmoz »

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 by tbrayshaw »

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.
User avatar
eccoana
Posts: 813
Joined: February 27th, 2004, 1:43 pm
Location: bavaria

Post by eccoana »

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

that works!

thank you, tim!
User avatar
Etnier
Posts: 234
Joined: November 19th, 2002, 8:05 am
Location: Cape Elizabeth ME
Contact:

Post by Etnier »

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.
User avatar
eccoana
Posts: 813
Joined: February 27th, 2004, 1:43 pm
Location: bavaria

Post by eccoana »

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
User avatar
Etnier
Posts: 234
Joined: November 19th, 2002, 8:05 am
Location: Cape Elizabeth ME
Contact:

Post by Etnier »

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 by tbrayshaw »

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.
Post Reply