Add printHtml method