For printing HTML with different margins, I'd recommend taking a look at
the CSS printing support (
more here). It enables you to write completely different style for printing, and at least the basic parts of it were well supported last time I checked (at least by IE 4+ and recent Mozilla and Konqueror browsers).
Example:
<LINK rel="stylesheet" type"text/css"
href="print.css" media="print">