• turn off header/footer on printing

    Home » Forums » Developers, developers, developers » Web design and development » turn off header/footer on printing

    Author
    Topic
    #425953

    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.

    Viewing 0 reply threads
    Author
    Replies
    • #982919

      (Edited by Jezza on 03-Nov-05 19:56. To add link)

      Hi Steve

      In a CSS file you could add:

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

      Have a look here Print CSS

      • #982934

        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.

        • #982942

          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?

          • #982950

            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… aflame

            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 bagman

            • #982956

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

            • #982960

              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.

            • #983061

              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…

            • #983112

              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.

            • #983133

              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.

              DaveA I am so far behind, I think I am First
              Genealogy....confusing the dead and annoying the living

    Viewing 0 reply threads
    Reply To: turn off header/footer on printing

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: