in reply to Printing a Html Page

You might want to check the open (as you do in the initial snippet).

-derby