Results 1 to 10 of 10
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    turn off header/footer on printing

    Is there a way to either turn off or customize the header/footer info IE defaults with on printing a webpage? thru, mayhap, CSS? I'm googling on this BTW, just haven't found anything yet so thought I'd ask youse guys.

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: turn off header/footer on printing

    <P ID="edit" class=small>(Edited by Jezza on 03-Nov-05 19:56. To add link)</P>Hi Steve

    In a CSS file you could add:

    /* Page Footer */
    .footer { display:none; }


    Have a look here Print CSS
    Jerry

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: turn off header/footer on printing

    I have something very similar:

    #navigation, #footer, .noprint {
    display: none;
    }

    That, of course, does not work. I think it is meant to not display a 'footer' in the webpage, not the footer IE tacks on. In my googling, I have found a consistent answer to this question: it is not possible to do this (effect IE settings in CSS). You can do something hackish re. registry settings but that is not a good solution IMVHO

    Ah well... we will be meeting tomorrow to look at what I have so far and if people want something more professional-quality I will have to go the route of RTF or PDF.

  4. #4
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: turn off header/footer on printing

    Sorry Steve

    Misunderstood you slightly there. Do you mean that after publishing a web site, a citizen may click on the page and print it and after doing so have a printed page without the page title in the header and the URL in the footer?

    Or are you going to print it on behalf of the client....if so why not change the Page set up and delete the details in the Header and footer text boxes?
    Jerry

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: turn off header/footer on printing

    no i want the user to have a nice looking printer friendly webpage to print. I have that done with the exception of IE's draconian decision that all users must want the standard header/footer info.

    Apparently Bill Gates doesn't want us programmers to question his decrees in this case... <img src=/S/aflame.gif border=0 alt=aflame width=16 height=16>

    Makes me wonder if the IE header/footer settings aren't some kind of hook in the OS to do things like, i dunno, make Macs crash <img src=/S/bagman.gif border=0 alt=bagman width=27 height=27>

  6. #6
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: turn off header/footer on printing

    >> Apparently Bill Gates doesn't want us programmers to question his decrees in this case...

    Could it not be argued that it is you who is trying to over-ride the viewer's choice in the matter? If I have set the page layout the way I want it and I want the footer printed, who are you to say I shouldn't have it? (Similarly, I find web pages that force full-screen mode irritating in the extreme, and usually close them immediately.)

    With all the other limitations found in IE's page layout such as margins etc., I think you would find you have far more control over what is printed by going the .pdf route.

  7. #7
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: turn off header/footer on printing

    Of course I am trying to set a formatting choice! That's the whole point.

    And, FWIW, if I was able to do that, I would definately put in the necessary code to re-set the header/footer info that was previously in place.

    This issue is a little irritating to me because, frankly, there's a lot of neat things you can do with the header/footer code and it would be nice to manipulate it programmatically. As it is, it's not the kind of thing most people will change as it's weird looking:

    &w&bPage &p of &P <-- this is the code for the header stuff in IE. I don't expect Aunt Gladys to touch something like that... So, I am not too sure that most people even manage to customize that kind of thing.

    As for the PDF option, hmm well...yuck. I have something called ActivePDF that does work fairly well, but it isn't easy to handle arbitrarily long text box entries, AFAIK. I may try and do an output to RTF before wandering back into on-the-fly PDF production, unless They want pdf. Well, we'll see.

  8. #8
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: turn off header/footer on printing

    It's interesting that many people want the web browser to be all things with HTML - a user interface host for applications, reporting interface, and even a web browser. Thankfully, the application host and web browsing does work well with HTML (and scripting), but reporting is still something that needs a separate format (at least under today's HTML schema).

    I agree with Leif on this - header and footer in the browser are there for printing web pages; not to be used as a custom header/footer for reports.

    Your best bet will be to use some kind of reporting tool. One of my favorites is ActiveReports.NET. It's not cheap, but VERY powerful. There are certainly a host of other tools out there - including Microsoft's own Reporting Services.

    Hope this helps...

  9. #9
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: turn off header/footer on printing

    Oh yeah i keep forgetting about MS Reporting Services. I'll have to surf over and get it...

    As for the issue of expectations re. HTML and printing, if MS doesn't provide a method for changing the IE settings, so be it. I happen to think it would real nice to be able to adjust the header/footer content; margins and page break settings are accessible in CSS so it doesn't seem unreasonable to have a hook into the header/footer settings -- especially if you can do interesting things with the options.

    In My Ideal World (that is, what I'd like, not what is *there*) if you want to print something fairly simple (ie no graphs/charts, no footnotes, headers, no extensive handling of page breaks, etc.). HTML should be perfectly adequate, and it would be...if I could turn off the header and footer settings! Ah well, so it goes.

  10. #10
    Super Moderator
    Join Date
    Dec 2000
    Location
    Renton, Washington, USA
    Posts
    12,560
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Re: turn off header/footer on printing

    Here is another point, from a users view.

    I do NOT like any webmaster messing with my machine and or settings. They seem to forget to reset things back the way the user had them and in most cases it is NOT the IE default.

    There are several websites I refuse to return to for this reason. However I do let the webmaster know my thoughts.

    Now running HP Pavilion a6528p, with Win7 64 Bit OS.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •