c# 2.0 - How to convert a html page to docx in .net 2.0 -
i need convert , download html page word(.docx) document. able convert doc format. conversion docx format getting corrupted file.
my code is
response.clearcontent(); response.buffer = false; response.contenttype = "application/vnd.word"; response.contentencoding = system.text.encoding.default; string date = datetime.now.tostring("hh-mm-ss"); response.addheader("content-disposition", "attachment; filename=newdoc.doc"); response.charset = ""; response.write("<html><head></head><body>"); response.write("my html data"); response.write("</body></html>"); response.clearcontent(); response.flush(); response.close(); response.end();
docx4j can convert xhtml docx.
that's java, can ikvm it.
Comments
Post a Comment