Code base for converting html content to image