1

I want to print a web page from IE without the header and footer that IE generates by default (in the footer there is the URL). Important this should be done by JavaScript or VBScript code and NOT the print settings for your web browser thank you in advance, best regards.

Davide
  • 11
  • 2

1 Answers1

1

If you're talking about the header and footer generated by the browser (i.e. page numbers, URL, etc.), then you cannot do it. These elements are generated outside the scope of the web page - and you have no control over them. They are part of user's configuration of their system and can only be manipulated by the user.

Aleks G
  • 56,435
  • 29
  • 168
  • 265
  • Are you sure? Are there no CSS3 rules that can control this? – Peter Bengtsson Mar 21 '13 at 17:13
  • @PeterBengtsson Yes, I am abslutely sure. Browser's header and footer are added as an overlay _after_ the page is laid out using CSS. – Aleks G Mar 21 '13 at 17:46
  • As of 2011/2012 almost all browsers have CSS3-based methods to control this behavior. Firefox added attributes to remove the print margin content. Basically everyone needs to go re-educate and continue demanding better support (and stop acting like it's just not an option. it is.) – Shaun Wilson Nov 06 '14 at 04:51
  • @ShaunWilson If you actually looked at the date of the answer, you'd notice that it was added mid-2011 when it was not supported yet. Yes, the support has been added since, albeit flaky. Instead of downvoting and criticizing an outdated answer, you could just add an answer of your own with the newer info. – Aleks G Nov 06 '14 at 08:01
  • If you looked at the date of the follow-up comment, you'd notice that it was reinforced Mar-2013. Hence my specification of dates. I was unclear, I apologize. I'll mark this question a dupe instead, though, thanks for the advice. – Shaun Wilson Nov 07 '14 at 16:23