Googleing came up with a few examples using ostreams. I haven't tested it but you could try this
http://www.reviewsonline.com/QA-C.HTM
I think for this to work the printer has to be connected over lpt.
Also I'm not sure printing an html document will work, nothing will parse that. You could try printing a postscript document or just do a plain text file.