The problem with printing in the browser is that what you see is not always what you get. People have different printer settings and resolutions, and what might fit perfectly on one user's paper may be completely off on another's. There is no foolproof way to do this in HTML.
The best way to make the printed document 100% perfect is to generate a PDF. There are many tools for creating PDF documents in PHP--a Google search will get you where you need to go.