PHP does not directly interact with printers. Your options are to use a library to create a PDF for download which offers the most control or to use css to create a stylesheet for printer html pages, however in the case of print css you will not have control over headers and footers as that will be client side in the browser.
If you opt to go the PDF route the best pdf library for PHP is probably fpdf which is a free download from here
http://www.fpdf.org/[
^]
If you want to go the css route then you need to create a stylesheet for the print media type to find out more about that hit w3schools here
http://www.w3schools.com/css/css_mediatypes.asp[
^]
Hope that helps.