How to convert any document to HTML format?