sort of got convertToHtml working