Jump to content

Is there a way to not print Headers and Footers?


Matt Ridge

Recommended Posts

Right, if you are talking about the headers/footers that the browser inserts the answer is no since PHP has no ability to control what the browser does with the rendered page. However, if you are talking about headers/footers that YOU are putting on your web page and you don't want them displayed if the user prints the page. Then you can use the "@media" control within CSS to define different styles based upon whether the page is viewed in a browser or printed. Just set the display property to none within the "print" media type for those elements you do not want displayed in a printed page.

Link to comment
Share on other sites

Are you talking about the URL and page x of x that the browser adds when you print? If you are, every browser I've used has a setting to allow you to shut that off. As far as doing that in php, no you can't.

 

Dang, I'm getting a form to show to the Mgt. and honestly I don't need user error to print and show those headers and footers... as most people know the Mgt are the type of people that just don't know how to do the simplest of things unless they are IT, and even then...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.