As you are printing on the client you need to provide the client with suitably formatted html (or other file type)
You can use a print style sheet (see
here[
^] for a good explanation.
Alternatively you can build (say) a PDF file server-side and provide it to the user to print.